From: Jacob Hoffman-Andrews Date: Mon, 13 Jul 2020 22:04:04 +0000 (-0700) Subject: Prefix crlNumber output with 0x. X-Git-Tag: openssl-3.0.0-alpha8~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6be235a0927473a2fddad83dd30ce4474ae53880;p=thirdparty%2Fopenssl.git Prefix crlNumber output with 0x. When the crlNumber field contains only 0-9 digits, the output is ambiguous as to what base it's in, which can be confusing. Adding this prefix makes it explicit that it's in hex. CLA: trivial Reviewed-by: Dmitry Belyavskiy Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/12434) --- diff --git a/apps/crl.c b/apps/crl.c index d417642ccea..4cb1bcc2c33 100644 --- a/apps/crl.c +++ b/apps/crl.c @@ -288,6 +288,7 @@ int crl_main(int argc, char **argv) crlnum = X509_CRL_get_ext_d2i(x, NID_crl_number, NULL, NULL); BIO_printf(bio_out, "crlNumber="); if (crlnum) { + BIO_puts(bio_out, "0x"); i2a_ASN1_INTEGER(bio_out, crlnum); ASN1_INTEGER_free(crlnum); } else