diff options
author | Pauli <paul.dale@oracle.com> | 2020-08-07 04:59:49 +0200 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-08-11 00:08:24 +0200 |
commit | 33b4f731451bcd7321ddae002c7945cd83d52f78 (patch) | |
tree | 533ea3ce2489b02acd656dbadbd1df2f806d32f0 /crypto/conf/conf_mod.c | |
parent | Remove a TODO from evp_test (diff) | |
download | openssl-33b4f731451bcd7321ddae002c7945cd83d52f78.tar.xz openssl-33b4f731451bcd7321ddae002c7945cd83d52f78.zip |
conf: add an error if the openssl_conf section isn't found.
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/12602)
Diffstat (limited to 'crypto/conf/conf_mod.c')
-rw-r--r-- | crypto/conf/conf_mod.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c index 64473417e9..aebf38292a 100644 --- a/crypto/conf/conf_mod.c +++ b/crypto/conf/conf_mod.c @@ -107,8 +107,13 @@ int CONF_modules_load(const CONF *cnf, const char *appname, OSSL_TRACE1(CONF, "Configuration in section %s\n", vsection); values = NCONF_get_section(cnf, vsection); - if (!values) + if (values == NULL) { + if (!(flags & CONF_MFLAGS_SILENT)) { + CONFerr(0, CONF_R_OPENSSL_CONF_REFERENCES_MISSING_SECTION); + ERR_add_error_data(2, "openssl_conf=", vsection); + } return 0; + } for (i = 0; i < sk_CONF_VALUE_num(values); i++) { vl = sk_CONF_VALUE_value(values, i); |