diff options
author | tb <> | 2024-08-28 06:17:06 +0000 |
---|---|---|
committer | tb <> | 2024-08-28 06:17:06 +0000 |
commit | de1c20338c8303d97973d7ccd003ff3d04a96c2a (patch) | |
tree | 13dfad166a5c724aa2725339e55b84713d0f148a /src/lib/libcrypto/ec/ec_print.c | |
parent | 0769c03c9ac155717446eb09c6440b513c1af085 (diff) | |
download | openbsd-de1c20338c8303d97973d7ccd003ff3d04a96c2a.tar.gz openbsd-de1c20338c8303d97973d7ccd003ff3d04a96c2a.tar.bz2 openbsd-de1c20338c8303d97973d7ccd003ff3d04a96c2a.zip |
Avoid polluting the error stack when printing certificates
For a certificate serial number between LONG_MAX and ULONG_MAX, the call to
ASN1_INTEGER_get() fails and leaves an error on the stack because the check
bs->length <= sizeof(long) doesn't quite do what it's supposed to do (bs is
probably for bitstring, although the more common reading would be adequate,
too.)
Fix this by checking for non-negativity and using ASN1_INTEGER_get_uint64()
and add a lengthy comment to explain the nonsense per beck's request.
discussed with jsing
ok beck
Diffstat (limited to 'src/lib/libcrypto/ec/ec_print.c')
0 files changed, 0 insertions, 0 deletions