Fixes #21258
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/21282)
CONF *conf = NULL;
int ret = 0, diagnostics = 0;
+ ERR_set_mark();
+
if (filename == NULL) {
file = CONF_get1_default_config_file();
if (file == NULL)
goto err;
+ if (*file == '\0') {
+ /* Do not try to load an empty file name but do not error out */
+ ret = 1;
+ goto err;
+ }
} else {
file = (char *)filename;
}
- ERR_set_mark();
conf = NCONF_new_ex(libctx, NULL);
if (conf == NULL)
goto err;