diff -up openssl-3.0.0-alpha16/apps/lib/apps.c.spkac openssl-3.0.0-alpha16/apps/lib/apps.c --- openssl-3.0.0-alpha16/apps/lib/apps.c.spkac 2021-06-04 09:28:48.162316896 +0200 +++ openssl-3.0.0-alpha16/apps/lib/apps.c 2021-06-04 09:32:53.911795489 +0200 @@ -403,14 +403,18 @@ CONF *app_load_config_verbose(const char CONF *app_load_config_internal(const char *filename, int quiet) { - BIO *in = NULL; /* leads to empty config in case filename == "" */ + BIO *in; CONF *conf; - if (*filename != '\0' - && (in = bio_open_default_(filename, 'r', FORMAT_TEXT, quiet)) == NULL) - return NULL; - conf = app_load_config_bio(in, filename); - BIO_free(in); + if (filename == NULL || *filename != '\0') { + if ((in = bio_open_default_(filename, 'r', FORMAT_TEXT, quiet)) == NULL) + return NULL; + conf = app_load_config_bio(in, filename); + BIO_free(in); + } else { + /* Return empty config if filename is empty string. */ + conf = NCONF_new_ex(app_libctx, NULL); + } return conf; }