提交 7e46e56a 编写于 作者: R Richard Levitte

Adapt 80-test_ssl_old.t to use statusvar

Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3004)
上级 34a6a9b1
......@@ -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";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册