mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
openssl spkac: Fix reading SPKAC data from stdin
Fixes #15367 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15593)
This commit is contained in:
parent
7d69c07ddf
commit
18d9c9bf96
@ -404,14 +404,18 @@ CONF *app_load_config_verbose(const char *filename, int verbose)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user