summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDamian Hobson-Garcia <dhobsong@igel.co.jp>2022-12-22 16:36:05 -0500
committerMatt Caswell <matt@openssl.org>2023-10-26 15:49:58 +0100
commit0e3872ac7ecfcbec5c37277fb000544ca6c0579a (patch)
tree36ef8ca88d0b28481b2ebd7b95f273c741b4866a /crypto
parentf82407a4218ed017de9a855b5747af51e0ebdbca (diff)
x509_print_ex:Use correct constant for nmflag comparison
The X509_FLAG_COMPAT constant is defined as a value of the X509_print_ex() cflags argument, and so it should not be used to compare against values for use with X509_NAME_print flags. Use XN_FLAG_COMPAT, which has the same value, instead. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/19963) (cherry picked from commit da2dd3b51ddd69aae0fd840c0d23afa954c24ded)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/x509/t_req.c2
-rw-r--r--crypto/x509/t_x509.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/crypto/x509/t_req.c b/crypto/x509/t_req.c
index 095c165100..f9cbbecd36 100644
--- a/crypto/x509/t_req.c
+++ b/crypto/x509/t_req.c
@@ -49,7 +49,7 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,
nmindent = 12;
}
- if (nmflags == X509_FLAG_COMPAT)
+ if (nmflags == XN_FLAG_COMPAT)
nmindent = 16;
if (!(cflag & X509_FLAG_NO_HEADER)) {
diff --git a/crypto/x509/t_x509.c b/crypto/x509/t_x509.c
index 46311377f5..d407b44c75 100644
--- a/crypto/x509/t_x509.c
+++ b/crypto/x509/t_x509.c
@@ -60,7 +60,7 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags,
nmindent = 12;
}
- if (nmflags == X509_FLAG_COMPAT) {
+ if (nmflags == XN_FLAG_COMPAT) {
nmindent = 16;
printok = 1;
}