From 2367238ced66d5da07e104aa9d8ab1e1eae64ec4 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Wed, 6 Jan 2021 11:49:36 +0100 Subject: [PATCH] X509_REQ_print_ex(): Correct indentation of extensions, which are attributes Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/13711) --- crypto/x509/t_req.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto/x509/t_req.c b/crypto/x509/t_req.c index 24e2044503e..5e26db9c4e5 100644 --- a/crypto/x509/t_req.c +++ b/crypto/x509/t_req.c @@ -166,14 +166,14 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, if (!(cflag & X509_FLAG_NO_EXTENSIONS)) { exts = X509_REQ_get_extensions(x); if (exts) { - if (BIO_printf(bp, "%8sRequested Extensions:\n", "") <= 0) + if (BIO_printf(bp, "%12sRequested Extensions:\n", "") <= 0) goto err; for (i = 0; i < sk_X509_EXTENSION_num(exts); i++) { ASN1_OBJECT *obj; X509_EXTENSION *ex; int critical; ex = sk_X509_EXTENSION_value(exts, i); - if (BIO_printf(bp, "%12s", "") <= 0) + if (BIO_printf(bp, "%16s", "") <= 0) goto err; obj = X509_EXTENSION_get_object(ex); if (i2a_ASN1_OBJECT(bp, obj) <= 0) @@ -181,8 +181,8 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, critical = X509_EXTENSION_get_critical(ex); if (BIO_printf(bp, ": %s\n", critical ? "critical" : "") <= 0) goto err; - if (!X509V3_EXT_print(bp, ex, cflag, 16)) { - if (BIO_printf(bp, "%16s", "") <= 0 + if (!X509V3_EXT_print(bp, ex, cflag, 20)) { + if (BIO_printf(bp, "%20s", "") <= 0 || ASN1_STRING_print(bp, X509_EXTENSION_get_data(ex)) <= 0) goto err; -- 2.47.3