Skip to content

Commit f7895f7

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

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

verifier/verifier.go

+6
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,12 @@ 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+
}
10731079
if !timestamp.BoundedAfter(cert.NotBefore) {
10741080
return fmt.Errorf("timestamp can be before certificate %q validity period, it will be valid from %q", cert.Subject, cert.NotBefore.Format(time.RFC1123Z))
10751081
}

0 commit comments

Comments
 (0)