diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-04-19 01:21:03 +0200 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-04-19 01:21:03 +0200 |
commit | 41b731f2f883a583554566d4e702cc51298ee9e1 (patch) | |
tree | e615e3efe269cf2359cb3e4a2139b119f71900a2 /crypto/x509v3/v3_conf.c | |
parent | Fix const declarations. (diff) | |
download | openssl-41b731f2f883a583554566d4e702cc51298ee9e1.tar.xz openssl-41b731f2f883a583554566d4e702cc51298ee9e1.zip |
Initial support for Certificate Policies extension: print out works but setting
isn't fully implemented (yet).
Diffstat (limited to 'crypto/x509v3/v3_conf.c')
-rw-r--r-- | crypto/x509v3/v3_conf.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/crypto/x509v3/v3_conf.c b/crypto/x509v3/v3_conf.c index 0427a3071e..54ee2a53ca 100644 --- a/crypto/x509v3/v3_conf.c +++ b/crypto/x509v3/v3_conf.c @@ -149,6 +149,12 @@ char *value; /* Value */ if(!ext_struc) return NULL; } else if(method->s2i) { if(!(ext_struc = method->s2i(method, ctx, value))) return NULL; + } else if(method->r2i) { + if(!ctx->db) { + X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_NO_CONFIG_DATABASE); + return NULL; + } + if(!(ext_struc = method->r2i(method, ctx, value))) return NULL; } else { X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED); ERR_add_error_data(2, "name=", OBJ_nid2sn(ext_nid)); @@ -287,15 +293,6 @@ X509_CRL *crl; return 1; } -/* Just check syntax of config file as far as possible */ -int X509V3_EXT_check_conf(conf, section) -LHASH *conf; -char *section; -{ - static X509V3_CTX ctx_tst = { CTX_TEST, NULL, NULL, NULL, NULL }; - return X509V3_EXT_add_conf(conf, &ctx_tst, section, NULL); -} - /* Config database functions */ char * X509V3_get_string(ctx, name, section) @@ -317,18 +314,20 @@ char *section; return NULL; } -void X509V3_free_string(ctx, str) +void X509V3_string_free(ctx, str) X509V3_CTX *ctx; char *str; { + if(!str) return; if(ctx->db_meth->free_string) return ctx->db_meth->free_string(ctx->db, str); } -void X509V3_free_section(ctx, section) +void X509V3_section_free(ctx, section) X509V3_CTX *ctx; STACK *section; { + if(!section) return; if(ctx->db_meth->free_section) return ctx->db_meth->free_section(ctx->db, section); } |