mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
FIX #431
This commit is contained in:
parent
b0923a1833
commit
424cf233d1
@ -13,7 +13,7 @@ my (
|
|||||||
$found,
|
$found,
|
||||||
);
|
);
|
||||||
# OK
|
# OK
|
||||||
pass("Running testssl.sh against badssl.com to craete a baseline (may take 2~3 minutes)"); $tests++;
|
pass("Running testssl.sh against badssl.com to create a baseline (may take 2~3 minutes)"); $tests++;
|
||||||
my $okout = `./testssl.sh -S -e -U --jsonfile tmp.json --color 0 badssl.com`;
|
my $okout = `./testssl.sh -S -e -U --jsonfile tmp.json --color 0 badssl.com`;
|
||||||
my $okjson = json('tmp.json');
|
my $okjson = json('tmp.json');
|
||||||
cmp_ok(@$okjson,'>',10,"We have more then 10 findings"); $tests++;
|
cmp_ok(@$okjson,'>',10,"We have more then 10 findings"); $tests++;
|
||||||
@ -50,16 +50,16 @@ foreach my $f ( @$json ) {
|
|||||||
}
|
}
|
||||||
is($found,1,"We had a finding for this in the JSON output"); $tests++;
|
is($found,1,"We had a finding for this in the JSON output"); $tests++;
|
||||||
|
|
||||||
#like($out, qr/Chain of trust.*?NOT ok.*\(self signed\)/,"Chain of trust should fail because of self signed"); $tests++;
|
like($out, qr/Chain of trust.*?NOT ok.*\(self signed\)/,"Chain of trust should fail because of self signed"); $tests++;
|
||||||
#$found = 0;
|
$found = 0;
|
||||||
#foreach my $f ( @$json ) {
|
foreach my $f ( @$json ) {
|
||||||
# if ( $f->{id} eq "chain_of_trust" ) {
|
if ( $f->{id} eq "chain_of_trust" ) {
|
||||||
# $found = 1;
|
$found = 1;
|
||||||
# like($f->{finding},qr/^All certificate trust checks failed/,"Finding says certificate cannot be trusted."); $tests++;
|
like($f->{finding},qr/^All certificate trust checks failed/,"Finding says certificate cannot be trusted."); $tests++;
|
||||||
# is($f->{severity}, "NOT ok", "Severity should be NOT ok"); $tests++;
|
is($f->{severity}, "NOT ok", "Severity should be NOT ok"); $tests++;
|
||||||
# last;
|
last;
|
||||||
# }
|
}
|
||||||
#}
|
}
|
||||||
is($found,1,"We had a finding for this in the JSON output"); $tests++;
|
is($found,1,"We had a finding for this in the JSON output"); $tests++;
|
||||||
|
|
||||||
like($okout, qr/Chain of trust[^\n]*?Ok/,"Chain of trust should be ok"); $tests++;
|
like($okout, qr/Chain of trust[^\n]*?Ok/,"Chain of trust should be ok"); $tests++;
|
||||||
|
Loading…
Reference in New Issue
Block a user