Pretty-print large INTEGERs and ENUMERATEDs in hex.
authorDavid Benjamin <davidben@google.com>
Fri, 24 Nov 2017 17:56:32 +0000 (12:56 -0500)
committerRichard Levitte <levitte@openssl.org>
Sat, 25 Nov 2017 15:43:12 +0000 (16:43 +0100)
commit6ac9fda415c822cc5dd8c845893c6048c34492e0
tree8c5dd8b4b7dbb99d84743cb558e6d0e94ae31387
parent5d612d3715cc5065988b49d688f425eef63a3d01
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)

(cherry picked from commit 10a3195fcf7d04ba519651cf12e945a8fe470a3c)
crypto/x509v3/v3_utl.c
crypto/x509v3/v3err.c
include/openssl/x509v3.h