diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-04-27 00:36:20 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-04-27 00:36:20 +0000 |
commit | b64f825671861144e1c24f2a5498a95a083021cd (patch) | |
tree | 96633569d2d6416f56fea9037fe35e80b5ebe469 /crypto/x509v3 | |
parent | 73d2257d978c7a201d6a914dc141ea1484d9aa6f (diff) |
Add PKCS#12 documentation and new option in x509 to add certificate extensions.
Diffstat (limited to 'crypto/x509v3')
-rw-r--r-- | crypto/x509v3/v3_alt.c | 1 | ||||
-rw-r--r-- | crypto/x509v3/v3_prn.c | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/crypto/x509v3/v3_alt.c b/crypto/x509v3/v3_alt.c index 99026fc8bc..e66a0748fd 100644 --- a/crypto/x509v3/v3_alt.c +++ b/crypto/x509v3/v3_alt.c @@ -96,6 +96,7 @@ STACK *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, gen = sk_GENERAL_NAME_value(gens, i); ret = i2v_GENERAL_NAME(method, gen, ret); } + if(!ret) return sk_GENERAL_NAME_new_null(); return ret; } 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"); } |