From d23241b8cd46dc5bf4bd94e9cd9a97d7a23f0e24 Mon Sep 17 00:00:00 2001 From: Dirk Date: Wed, 13 Jun 2018 14:30:35 +0200 Subject: [PATCH] Fix to-be-expired-soon certificate The certificate from self-signed.badssl.com was about to expire which raises a MEDIUM type issue in testssl. This commit does a workaround for this, so that those certificates will be ok in Travis CI. (Same problem exists in 2.9.5) --- t/31_badssl.com.t | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/t/31_badssl.com.t b/t/31_badssl.com.t index 81a5db4..716e64b 100755 --- a/t/31_badssl.com.t +++ b/t/31_badssl.com.t @@ -39,7 +39,7 @@ 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 Validity \(UTC\)\s+\d+/,"The certificate should not be expired"); $tests++; +unlike($out, qr/Certificate Validity \(UTC\)s+expired/,"The certificate should not be expired"); $tests++; $json = json('tmp.json'); unlink 'tmp.json'; $found = 0; @@ -47,8 +47,7 @@ foreach my $f ( @$json ) { if ( $f->{id} eq "cert_expiration_status" ) { $found = 1; like($f->{finding},qr/days/,"Finding doesn't read expired."); $tests++; -# hope they don't come below 60days: - is($f->{severity}, "OK", "Severity should be ok"); $tests++; + isnt($f->{severity}, "HIGH", "Severity should be OK or MEDIUM"); $tests++; last; } }