summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3/v3_conf.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>1999-02-21 01:46:45 +0000
committerDr. Stephen Henson <steve@openssl.org>1999-02-21 01:46:45 +0000
commitaa066b9e6e44297a00e641e200bf48b5728ae5c3 (patch)
treefceb166c14070cc27c1da8156f3bf78c042bfc24 /crypto/x509v3/v3_conf.c
parenta67a9694f7fb5cf96cf0c370f3494111a05770be (diff)
Add more functionality to issuer alt name and subject alt name. New options
to include email addresses from DN and copy details from issuer certificate. Include examples in openssl.cnf, update Win32 ordinals.
Diffstat (limited to 'crypto/x509v3/v3_conf.c')
-rw-r--r--crypto/x509v3/v3_conf.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/crypto/x509v3/v3_conf.c b/crypto/x509v3/v3_conf.c
index a87af95f26..22ad348dee 100644
--- a/crypto/x509v3/v3_conf.c
+++ b/crypto/x509v3/v3_conf.c
@@ -85,10 +85,16 @@ char *value; /* Value */
{
int crit;
int ext_type;
+ X509_EXTENSION *ret;
crit = v3_check_critical(&value);
if((ext_type = v3_check_generic(&value)))
return v3_generic_extension(name, value, crit, ext_type);
- return do_ext_conf(conf, ctx, OBJ_sn2nid(name), crit, value);
+ ret = do_ext_conf(conf, ctx, OBJ_sn2nid(name), crit, value);
+ if(!ret) {
+ X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_ERROR_IN_EXTENSION);
+ ERR_add_error_data(4,"name=", name, ", value=", value);
+ }
+ return ret;
}
X509_EXTENSION *X509V3_EXT_conf_nid(conf, ctx, ext_nid, value)
@@ -120,9 +126,12 @@ char *value; /* Value */
char *ext_der, *p;
int ext_len;
ASN1_OCTET_STRING *ext_oct;
- if(ext_nid == NID_undef) return NULL;
+ if(ext_nid == NID_undef) {
+ X509V3err(X509V3_F_DO_EXT_CONF,X509V3_R_UNKNOWN_EXTENSION_NAME);
+ return NULL;
+ }
if(!(method = X509V3_EXT_get_nid(ext_nid))) {
- /* Add generic extension support here */
+ X509V3err(X509V3_F_DO_EXT_CONF,X509V3_R_UNKNOWN_EXTENSION);
return NULL;
}
/* Now get internal extension representation based on type */