aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/x509v3/v3_prn.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/x509v3/v3_prn.c')
-rw-r--r--crypto/x509v3/v3_prn.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/crypto/x509v3/v3_prn.c b/crypto/x509v3/v3_prn.c
index 06a4f6964f..08e6e2cc6e 100644
--- a/crypto/x509v3/v3_prn.c
+++ b/crypto/x509v3/v3_prn.c
@@ -71,13 +71,16 @@ void X509V3_EXT_val_prn(BIO *out, STACK *val, int indent, int ml)
int i;
CONF_VALUE *nval;
if(!val) return;
- if(!ml) BIO_printf(out, "%*s", indent, "");
+ if(!ml || !sk_num(val)) {
+ BIO_printf(out, "%*s", indent, "");
+ if(!sk_num(val)) BIO_puts(out, "<EMPTY>\n");
+ }
for(i = 0; i < sk_num(val); i++) {
if(ml) BIO_printf(out, "%*s", indent, "");
else if(i > 0) BIO_printf(out, ", ");
nval = (CONF_VALUE *)sk_value(val, i);
- if(!nval->name) BIO_printf(out, "%s", nval->value);
- else if(!nval->value) BIO_printf(out, "%s", nval->name);
+ if(!nval->name) BIO_puts(out, nval->value);
+ else if(!nval->value) BIO_puts(out, nval->name);
else BIO_printf(out, "%s:%s", nval->name, nval->value);
if(ml) BIO_puts(out, "\n");
}