]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix ERR_print_errors so that it matches the documented format in doc/man3/ERR_error_s...
authorShane Lontis <shane.lontis@oracle.com>
Tue, 26 May 2020 02:44:36 +0000 (12:44 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Tue, 26 May 2020 02:44:36 +0000 (12:44 +1000)
commitf32af93c924dca25728d8e7b85b8e4b660154e12
treecd3011c4dfe565e6fd4950d47db7d30bfadd7953
parent1bdd86fb1ca40dd3536abf16b6273230c15537b6
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)
crypto/err/err_prn.c
crypto/o_str.c
include/internal/cryptlib.h
test/build.info
test/errtest.c
test/hexstr_test.c [new file with mode: 0644]
test/recipes/04-test_hexstring.t [new file with mode: 0644]