x509_print_ex: Remove unused setting when XN_FLAG_COMPAT is set

Calling X509_NAME_print_ex with XN_FLAG_COMPAT falls back to calling
X509_NAME_print().  The obase parameter to X509_NAME_print() is not
used, so setting it to a different value has no effect.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/19963)
This commit is contained in:
Damian Hobson-Garcia 2022-12-22 17:15:55 -05:00 committed by Matt Caswell
parent 2b5e028a2f
commit 2126ca3dba
2 changed files with 2 additions and 6 deletions

View File

@ -49,10 +49,8 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,
nmindent = 12;
}
if (nmflags == XN_FLAG_COMPAT) {
nmindent = 16;
if (nmflags == XN_FLAG_COMPAT)
printok = 1;
}
if (!(cflag & X509_FLAG_NO_HEADER)) {
if (BIO_write(bp, "Certificate Request:\n", 21) <= 0)

View File

@ -65,10 +65,8 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags,
nmindent = 12;
}
if (nmflags == XN_FLAG_COMPAT) {
nmindent = 16;
if (nmflags == XN_FLAG_COMPAT)
printok = 1;
}
if (!(cflag & X509_FLAG_NO_HEADER)) {
if (BIO_write(bp, "Certificate:\n", 13) <= 0)