Skip to content

Commit

Permalink
log
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
  • Loading branch information
Two-Hearts committed Sep 24, 2024
1 parent 6bc17bf commit acc446b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion verifier/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,14 @@ func revocationFinalResult(certResults []*revocationresult.CertRevocationResult,
}
for _, serverResult := range certResult.ServerResults {
if serverResult.Error != nil {
// log the revocation error
// log individual server errors
if certResult.RevocationMethod == revocationresult.RevocationMethodOCSPFallbackCRL && serverResult.RevocationMethod == revocationresult.RevocationMethodOCSP {
// when the final revocation method is OCSPFallbackCRL,
// the OCSP server results should not be logged as an error
// since the CRL revocation check can succeed.
logger.Debugf("Certificate #%d in chain with subject %v encountered an error for revocation method %s at URL %q: %v", (i + 1), cert.Subject.String(), revocationresult.RevocationMethodOCSP, serverResult.Server, serverResult.Error)
continue
}
logger.Errorf("Certificate #%d in chain with subject %v encountered an error for revocation method %s at URL %q: %v", (i + 1), cert.Subject.String(), serverResult.RevocationMethod, serverResult.Server, serverResult.Error)
}
}
Expand Down

0 comments on commit acc446b

Please sign in to comment.