Skip to content

Commit

Permalink
bug fix:OCSP missing values (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunKoyalwar authored Dec 15, 2022
1 parent 477cee6 commit c9831d8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/tlsx/clients/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,12 @@ func IsTLSRevoked(cert *x509.Certificate) bool {

// IsZTLSRevoked returns true if the certificate has been revoked
func IsZTLSRevoked(cert *zx509.Certificate) bool {
OCSPisRevoked, _, OCSPerr := zverifier.CheckOCSP(context.TODO(), cert, nil)
var OCSPisRevoked bool = false
var OCSPerr error
// TODO : Verify Upstream Patch and remove extra condition when fixed
if len(cert.IssuingCertificateURL) > 0 && len(cert.OCSPServer) > 0 {
OCSPisRevoked, _, OCSPerr = zverifier.CheckOCSP(context.TODO(), cert, nil)
}
if len(cert.CRLDistributionPoints) != 0 {
CRLisRevoked, _, CRLerr := zverifier.CheckCRL(context.TODO(), cert, nil)

Expand Down

0 comments on commit c9831d8

Please sign in to comment.