From 452f4333c07312d8aca021e04eb1d74f87e9afdd Mon Sep 17 00:00:00 2001 From: Dirk Date: Wed, 13 Jun 2018 15:02:08 +0200 Subject: [PATCH] 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. --- t/31_badssl.com.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/31_badssl.com.t b/t/31_badssl.com.t index 01ca476..5147772 100755 --- a/t/31_badssl.com.t +++ b/t/31_badssl.com.t @@ -39,15 +39,15 @@ is($found,1,"We had a finding for this in the JSON output"); $tests++; # Self signed and not-expired pass("Running testssl against self-signed.badssl.com"); $tests++; $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'); unlink 'tmp.json'; $found = 0; foreach my $f ( @$json ) { if ( $f->{id} eq "expiration" ) { $found = 1; - like($f->{finding},qr/^Certificate Expiration \: \d+/,"Finding doesn't read expired."); $tests++; - is($f->{severity}, "OK", "Severity should be ok"); $tests++; + unlike($f->{finding},qr/^Certificate Expiration\s+expired\!/,"Finding doesn't read expired."); $tests++; + isnt($f->{severity}, "CRITICAL", "Severity should be OK or MEDIUM"); $tests++; last; } }