summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/conf/conf_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/conf/conf_lib.c')
-rw-r--r--src/lib/libcrypto/conf/conf_lib.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/libcrypto/conf/conf_lib.c b/src/lib/libcrypto/conf/conf_lib.c
index 7d426d56b2..863e1c9475 100644
--- a/src/lib/libcrypto/conf/conf_lib.c
+++ b/src/lib/libcrypto/conf/conf_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_lib.c,v 1.24 2024/08/31 09:50:52 tb Exp $ */ 1/* $OpenBSD: conf_lib.c,v 1.25 2025/03/08 09:35:53 tb Exp $ */
2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -131,6 +131,8 @@ LCRYPTO_ALIAS(NCONF_load_bio);
131STACK_OF(CONF_VALUE) * 131STACK_OF(CONF_VALUE) *
132NCONF_get_section(const CONF *conf, const char *section) 132NCONF_get_section(const CONF *conf, const char *section)
133{ 133{
134 CONF_VALUE *v;
135
134 if (conf == NULL) { 136 if (conf == NULL) {
135 CONFerror(CONF_R_NO_CONF); 137 CONFerror(CONF_R_NO_CONF);
136 return NULL; 138 return NULL;
@@ -141,7 +143,10 @@ NCONF_get_section(const CONF *conf, const char *section)
141 return NULL; 143 return NULL;
142 } 144 }
143 145
144 return _CONF_get_section_values(conf, section); 146 if ((v = _CONF_get_section(conf, section)) == NULL)
147 return NULL;
148
149 return (STACK_OF(CONF_VALUE) *)v->value;
145} 150}
146LCRYPTO_ALIAS(NCONF_get_section); 151LCRYPTO_ALIAS(NCONF_get_section);
147 152