diff options
author | Richard Levitte <levitte@openssl.org> | 2017-03-21 10:58:46 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-03-21 16:12:29 +0100 |
commit | 7e46e56acaa27933663a455cf819d841d4dbc436 (patch) | |
tree | a8b42adecbdd45bcba0a081490044b905d179ddc /test/recipes/80-test_ssl_old.t | |
parent | OpenSSL::Test: add a statusvar option for run with capture => 1 (diff) | |
download | openssl-7e46e56acaa27933663a455cf819d841d4dbc436.tar.xz openssl-7e46e56acaa27933663a455cf819d841d4dbc436.zip |
Adapt 80-test_ssl_old.t to use statusvar
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3004)
Diffstat (limited to 'test/recipes/80-test_ssl_old.t')
-rw-r--r-- | test/recipes/80-test_ssl_old.t | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/test/recipes/80-test_ssl_old.t b/test/recipes/80-test_ssl_old.t index a790d9be2a..8b6f538eeb 100644 --- a/test/recipes/80-test_ssl_old.t +++ b/test/recipes/80-test_ssl_old.t @@ -424,11 +424,17 @@ sub testssl { push @protocols, "-ssl3" unless $no_ssl3; my $protocolciphersuitecount = 0; my %ciphersuites = (); + my %ciphersstatus = (); foreach my $protocol (@protocols) { - $ciphersuites{$protocol} = - [ map { s|\R||; split(/:/, $_) } - run(app(["openssl", "ciphers", "-s", $protocol, - "ALL:$ciphers"]), capture => 1) ]; + my $ciphersstatus = undef; + my @ciphers = run(app(["openssl", "ciphers", "-s", $protocol, + "ALL:$ciphers"]), + capture => 1, statusvar => \$ciphersstatus); + $ciphersstatus{$protocol} = $ciphersstatus; + if ($ciphersstatus) { + $ciphersuites{$protocol} = [ map { s|\R||; split(/:/, $_) } + @ciphers ]; + } $protocolciphersuitecount += scalar @{$ciphersuites{$protocol}}; } @@ -437,7 +443,12 @@ sub testssl { # The count of protocols is because in addition to the ciphersuits # we got above, we're running a weak DH test for each protocol - plan tests => $protocolciphersuitecount + scalar(keys %ciphersuites); + plan tests => scalar(@protocols) + $protocolciphersuitecount + + scalar(keys %ciphersuites); + + foreach my $protocol (@protocols) { + ok($ciphersstatus{$protocol}, "Getting ciphers for $protocol"); + } foreach my $protocol (sort keys %ciphersuites) { note "Testing ciphersuites for $protocol"; |