diff options
author | Tomas Mraz <tmraz@fedoraproject.org> | 2019-02-01 14:32:36 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-02-11 15:24:12 +0100 |
commit | 9d5560331d86c6463e965321f774e4eed582ce0b (patch) | |
tree | 0c03c2a56ff2047a8632dc35f10b96eaa700f8a5 /crypto/conf | |
parent | 2beb004b24ff524d1f27e71994cdcfffb85d7075 (diff) | |
download | openssl-new-9d5560331d86c6463e965321f774e4eed582ce0b.tar.gz |
Allow the syntax of the .include directive to optionally have '='
If the old openssl versions not supporting the .include directive
load a config file with it, they will bail out with error.
This change allows using the .include = <filename> syntax which
is interpreted as variable assignment by the old openssl
config file parser.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8141)
Diffstat (limited to 'crypto/conf')
-rw-r--r-- | crypto/conf/conf_def.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index 8a34218748..594f7c5e5a 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -348,10 +348,15 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) psection = section; } p = eat_ws(conf, end); - if (strncmp(pname, ".include", 8) == 0 && p != pname + 8) { + if (strncmp(pname, ".include", 8) == 0 + && (p != pname + 8 || *p == '=')) { char *include = NULL; BIO *next; + if (*p == '=') { + p++; + p = eat_ws(conf, p); + } trim_ws(conf, p); if (!str_copy(conf, psection, &include, p)) goto err; |