Skip to content

Commit

Permalink
Return cert whem OCSP test failed.
Browse files Browse the repository at this point in the history
  • Loading branch information
FabienChaynes committed Apr 21, 2020
1 parent 1511899 commit 66f6e59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ssl-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def self.test url, open_timeout: 5, read_timeout: 5, redirection_limit: 5
begin
http.start { }
failed, revoked, message, revocation_date = test_ocsp_revocation(cert, chain, open_timeout: open_timeout, read_timeout: read_timeout, redirection_limit: redirection_limit)
return [nil, "OCSP test failed: #{message}"] if failed
return [nil, "OCSP test failed: #{message}", cert] if failed
return [false, "SSL certificate revoked: #{message} (revocation date: #{revocation_date})", cert] if revoked
return [true, "OCSP test couldn't be performed: #{message}", cert] if message
return [true, nil, cert]
Expand Down

0 comments on commit 66f6e59

Please sign in to comment.