aboutsummaryrefslogtreecommitdiffstats
path: root/test/recipes
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-05-26 12:44:36 +1000
committerShane Lontis <shane.lontis@oracle.com>2020-05-26 12:44:36 +1000
commitf32af93c924dca25728d8e7b85b8e4b660154e12 (patch)
treecd3011c4dfe565e6fd4950d47db7d30bfadd7953 /test/recipes
parent1bdd86fb1ca40dd3536abf16b6273230c15537b6 (diff)
downloadopenssl-f32af93c924dca25728d8e7b85b8e4b660154e12.tar.gz
Fix ERR_print_errors so that it matches the documented format in doc/man3/ERR_error_string.pod
Fixes #11743 The ouput format had 2 issues that caused it not to match the expected documented format: (1) At some point the thread id printing was changed to use the OPENSSL_hex2str method which puts ':' between hex bytes. An internal function that skips the seperator has been added. (2) The error code no longer exists. So this was completely removed from the string. It is now replaced by :: As an example: 00:77:6E:52:14:7F:00:00:error:asn1 encoding routines:asn1_check_tlen:wrong tag:crypto/asn1/tasn_dec.c:1135: Is now: 00776E52147F0000:error::asn1 encoding routines:asn1_check_tlen:wrong tag:crypto/asn1/tasn_dec.c:1135: Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11789)
Diffstat (limited to 'test/recipes')
-rw-r--r--test/recipes/04-test_hexstring.t15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/recipes/04-test_hexstring.t b/test/recipes/04-test_hexstring.t
new file mode 100644
index 0000000000..664868fe60
--- /dev/null
+++ b/test/recipes/04-test_hexstring.t
@@ -0,0 +1,15 @@
+#! /usr/bin/env perl
+# Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the Apache License 2.0 (the "License"). You may not use
+# this file except in compliance with the License. You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
+use strict;
+use OpenSSL::Test;
+use OpenSSL::Test::Simple;
+
+setup("test_hexstring");
+
+simple_test("test_hexstring", "hexstr_test");