mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-10 18:50:58 +01:00
The certificate from self-signed.badssl.com was about to expire
which raises a MEDIUM type issue in testssl.sh . This commit does a workaround for this, so that those certificates will be ok in Travis CI.
This commit is contained in:
parent
af8b0855b6
commit
452f4333c0
@ -39,15 +39,15 @@ is($found,1,"We had a finding for this in the JSON output"); $tests++;
|
|||||||
# Self signed and not-expired
|
# Self signed and not-expired
|
||||||
pass("Running testssl against self-signed.badssl.com"); $tests++;
|
pass("Running testssl against self-signed.badssl.com"); $tests++;
|
||||||
$out = `./testssl.sh -S --jsonfile tmp.json --color 0 self-signed.badssl.com`;
|
$out = `./testssl.sh -S --jsonfile tmp.json --color 0 self-signed.badssl.com`;
|
||||||
like($out, qr/Certificate Expiration\s+\d+/,"The certificate should not be expired"); $tests++;
|
unlike($out, qr/Certificate Expiration\s+expired\!/,"The certificate should not be expired"); $tests++;
|
||||||
$json = json('tmp.json');
|
$json = json('tmp.json');
|
||||||
unlink 'tmp.json';
|
unlink 'tmp.json';
|
||||||
$found = 0;
|
$found = 0;
|
||||||
foreach my $f ( @$json ) {
|
foreach my $f ( @$json ) {
|
||||||
if ( $f->{id} eq "expiration" ) {
|
if ( $f->{id} eq "expiration" ) {
|
||||||
$found = 1;
|
$found = 1;
|
||||||
like($f->{finding},qr/^Certificate Expiration \: \d+/,"Finding doesn't read expired."); $tests++;
|
unlike($f->{finding},qr/^Certificate Expiration\s+expired\!/,"Finding doesn't read expired."); $tests++;
|
||||||
is($f->{severity}, "OK", "Severity should be ok"); $tests++;
|
isnt($f->{severity}, "CRITICAL", "Severity should be OK or MEDIUM"); $tests++;
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user