summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3/v3_conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_conf.c')
-rw-r--r--src/lib/libcrypto/x509v3/v3_conf.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_conf.c b/src/lib/libcrypto/x509v3/v3_conf.c
index bb06c18536..78ff19808b 100644
--- a/src/lib/libcrypto/x509v3/v3_conf.c
+++ b/src/lib/libcrypto/x509v3/v3_conf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_conf.c,v 1.22 2018/05/13 17:49:02 tb Exp $ */ 1/* $OpenBSD: v3_conf.c,v 1.23 2018/05/18 19:34:37 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -411,27 +411,23 @@ X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
411/* Config database functions */ 411/* Config database functions */
412 412
413char * 413char *
414X509V3_get_string(X509V3_CTX *ctx, char *name, char *section) 414X509V3_get_string(X509V3_CTX *ctx, const char *name, const char *section)
415{ 415{
416 if (!ctx->db || !ctx->db_meth || !ctx->db_meth->get_string) { 416 if (!ctx->db || !ctx->db_meth || !ctx->db_meth->get_string) {
417 X509V3error(X509V3_R_OPERATION_NOT_DEFINED); 417 X509V3error(X509V3_R_OPERATION_NOT_DEFINED);
418 return NULL; 418 return NULL;
419 } 419 }
420 if (ctx->db_meth->get_string) 420 return ctx->db_meth->get_string(ctx->db, name, section);
421 return ctx->db_meth->get_string(ctx->db, name, section);
422 return NULL;
423} 421}
424 422
425STACK_OF(CONF_VALUE) * 423STACK_OF(CONF_VALUE) *
426X509V3_get_section(X509V3_CTX *ctx, char *section) 424X509V3_get_section(X509V3_CTX *ctx, const char *section)
427{ 425{
428 if (!ctx->db || !ctx->db_meth || !ctx->db_meth->get_section) { 426 if (!ctx->db || !ctx->db_meth || !ctx->db_meth->get_section) {
429 X509V3error(X509V3_R_OPERATION_NOT_DEFINED); 427 X509V3error(X509V3_R_OPERATION_NOT_DEFINED);
430 return NULL; 428 return NULL;
431 } 429 }
432 if (ctx->db_meth->get_section) 430 return ctx->db_meth->get_section(ctx->db, section);
433 return ctx->db_meth->get_section(ctx->db, section);
434 return NULL;
435} 431}
436 432
437void 433void