Pretty-print large INTEGERs and ENUMERATEDs in hex.
authorDavid Benjamin <davidben@google.com>
Fri, 24 Nov 2017 17:56:32 +0000 (12:56 -0500)
committerDavid Benjamin <davidben@google.com>
Sat, 25 Nov 2017 14:23:34 +0000 (09:23 -0500)
commit10a3195fcf7d04ba519651cf12e945a8fe470a3c
treeab5dc02edbedf7dcb0d3138ccb7c086f092c986a
parentd807db26a403b4de69d7846656362e70f5083428
Pretty-print large INTEGERs and ENUMERATEDs in hex.

This avoids taking quadratic time to pretty-print certificates with
excessively large integer fields. Very large integers aren't any more
readable in decimal than hexadecimal anyway, and the i2s_* functions
will parse either form.

Found by libFuzzer.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4790)
crypto/err/openssl.txt
crypto/x509v3/v3_utl.c
crypto/x509v3/v3err.c
include/openssl/x509v3err.h