Skip to content

Commit faaa289

Browse files
committed
updated logs
Signed-off-by: Patrick Zheng <[email protected]>
1 parent a6f87d4 commit faaa289

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

verifier/verifier.go

+3-6
Original file line numberDiff line numberDiff line change
@@ -1070,18 +1070,15 @@ func verifyTimestamp(ctx context.Context, policyName string, trustStores []strin
10701070
logger.Debug("Checking the timestamp against the signing certificate chain...")
10711071
logger.Debugf("Timestamp range: %s", timestamp.Format(time.RFC3339))
10721072
for _, cert := range signerInfo.CertificateChain {
1073-
if timeOfVerification.Before(cert.NotBefore) {
1074-
logger.Debugf("Certificate %q is not valid yet. It will be valid from %q", cert.Subject, cert.NotBefore.Format(time.RFC1123Z))
1075-
}
1076-
if timeOfVerification.After(cert.NotAfter) {
1077-
logger.Debugf("Certificate %q expired at %q", cert.Subject, cert.NotAfter.Format(time.RFC1123Z))
1078-
}
10791073
if !timestamp.BoundedAfter(cert.NotBefore) {
10801074
return fmt.Errorf("timestamp can be before certificate %q validity period, it will be valid from %q", cert.Subject, cert.NotBefore.Format(time.RFC1123Z))
10811075
}
10821076
if !timestamp.BoundedBefore(cert.NotAfter) {
10831077
return fmt.Errorf("timestamp can be after certificate %q validity period, it was expired at %q", cert.Subject, cert.NotAfter.Format(time.RFC1123Z))
10841078
}
1079+
if timeOfVerification.After(cert.NotAfter) {
1080+
logger.Debugf("Certificate %q expired at %q, but timestamp is within certificate validity period", cert.Subject, cert.NotAfter.Format(time.RFC1123Z))
1081+
}
10851082
}
10861083

10871084
// 5. Perform the timestamping certificate chain revocation check

0 commit comments

Comments
 (0)