diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-01-06 11:49:36 +0100 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-01-20 15:59:22 +0100 |
commit | 2367238ced66d5da07e104aa9d8ab1e1eae64ec4 (patch) | |
tree | 72941334e402ad9c4338ac2d3e2207719adb6e6f /crypto/x509/t_req.c | |
parent | X509_REQ_print_ex(): Replace weird 'a0:00' output on empty attributes by '(no... (diff) | |
download | openssl-2367238ced66d5da07e104aa9d8ab1e1eae64ec4.tar.xz openssl-2367238ced66d5da07e104aa9d8ab1e1eae64ec4.zip |
X509_REQ_print_ex(): Correct indentation of extensions, which are attributes
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13711)
Diffstat (limited to 'crypto/x509/t_req.c')
-rw-r--r-- | crypto/x509/t_req.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/x509/t_req.c b/crypto/x509/t_req.c index 24e2044503..5e26db9c4e 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; |