[openssl] master update
tomas at openssl.org
tomas at openssl.org
Thu Jun 3 16:08:11 UTC 2021
The branch master has been updated
via 18d9c9bf96d54948790fd59068e8d46f6194439e (commit)
from 7d69c07ddf7a27bf4dca250c8a37b8f929d33100 (commit)
- Log -----------------------------------------------------------------
commit 18d9c9bf96d54948790fd59068e8d46f6194439e
Author: Tomas Mraz <tomas at openssl.org>
Date: Wed Jun 2 17:01:41 2021 +0200
openssl spkac: Fix reading SPKAC data from stdin
Fixes #15367
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15593)
-----------------------------------------------------------------------
Summary of changes:
apps/lib/apps.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/apps/lib/apps.c b/apps/lib/apps.c
index 3d6588ba23..8604c75251 100644
--- a/apps/lib/apps.c
+++ b/apps/lib/apps.c
@@ -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;
}
More information about the openssl-commits
mailing list