diff options
author | Richard Levitte <levitte@openssl.org> | 2021-06-22 10:38:55 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-06-26 06:43:08 +0200 |
commit | ed0bd67d4b7a61e864e9f71fbb62ba2a9dff0c28 (patch) | |
tree | 72e49d69265d076f54b5aed895210b82bfd7dda5 | |
parent | bb4f826272712b7c57edefa9b920e9f7c31778d8 (diff) |
test/recipes/80-test_ca.t: Don't force quotes around the config file in $cnf
However, when passing it through the OPENSSL_CONFIG environment
variable, we still need the quotes, just to make sure.
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15823)
-rw-r--r-- | test/recipes/80-test_ca.t | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/recipes/80-test_ca.t b/test/recipes/80-test_ca.t index c1e09032de..eb025f4d59 100644 --- a/test/recipes/80-test_ca.t +++ b/test/recipes/80-test_ca.t @@ -20,7 +20,7 @@ setup("test_ca"); $ENV{OPENSSL} = cmdstr(app(["openssl"]), display => 1); -my $cnf = '"' . srctop_file("test","ca-and-certs.cnf") . '"';; +my $cnf = srctop_file("test","ca-and-certs.cnf"); my $std_openssl_cnf = '"' . srctop_file("apps", $^O eq "VMS" ? "openssl-vms.cnf" : "openssl.cnf") . '"'; @@ -30,19 +30,19 @@ rmtree("demoCA", { safe => 0 }); plan tests => 15; SKIP: { my $cakey = srctop_file("test", "certs", "ca-key.pem"); - $ENV{OPENSSL_CONFIG} = '-config ' . $cnf; + $ENV{OPENSSL_CONFIG} = qq(-config "$cnf"); skip "failed creating CA structure", 4 if !ok(run(perlapp(["CA.pl","-newca", "-extra-req", "-key $cakey"], stdin => undef)), 'creating CA structure'); my $eekey = srctop_file("test", "certs", "ee-key.pem"); - $ENV{OPENSSL_CONFIG} = '-config ' . $cnf; + $ENV{OPENSSL_CONFIG} = qq(-config "$cnf"); skip "failed creating new certificate request", 3 if !ok(run(perlapp(["CA.pl","-newreq", '-extra-req', "-outform DER -section userreq -key $eekey"])), 'creating certificate request'); - $ENV{OPENSSL_CONFIG} = '-rand_serial -inform DER -config '.$std_openssl_cnf; + $ENV{OPENSSL_CONFIG} = qq(-rand_serial -inform DER -config "$std_openssl_cnf"); skip "failed to sign certificate request", 2 if !is(yes(cmdstr(perlapp(["CA.pl", "-sign"]))), 0, 'signing certificate request'); @@ -54,7 +54,7 @@ plan tests => 15; if disabled("ct"); my $eekey2 = srctop_file("test", "certs", "ee-key-3072.pem"); - $ENV{OPENSSL_CONFIG} = '-config ' . $cnf; + $ENV{OPENSSL_CONFIG} = qq(-config "$cnf"); ok(run(perlapp(["CA.pl", "-precert", '-extra-req', "-section userreq -key $eekey2"], stderr => undef)), 'creating new pre-certificate'); } |