Skip to content

Commit

Permalink
Use previously formatted serial in error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
stevendpclark committed Jul 4, 2024
1 parent d714a98 commit 086c94b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/helper/ocsp/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ func (c *Client) VerifyLeafCertificate(ctx context.Context, subject, issuer *x50
if results.code == ocspStatusRevoked {
return fmt.Errorf("certificate with serial number %s has been revoked", serialHex)
} else if conf.OcspFailureMode == FailOpenFalse {
return fmt.Errorf("unknown OCSP status for cert with serial number %s", strings.TrimSpace(certutil.GetHexFormatted(serial.Bytes(), ":")))
return fmt.Errorf("unknown OCSP status for cert with serial number %s", serialHex)
} else {
c.Logger().Warn("could not validate OCSP status for cert, but continuing in fail open mode", "serial", serialHex)
}
Expand Down

0 comments on commit 086c94b

Please sign in to comment.