Skip to content

Commit

Permalink
Addressing newest PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Kody Kimberl <[email protected]>
  • Loading branch information
kody-kimberl committed Apr 20, 2023
1 parent cc04997 commit dfccf1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions verifier/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ func verifyRevocation(outcome *notation.VerificationOutcome, r revocation.Revoca
authenticSigningTime, err := outcome.EnvelopeContent.SignerInfo.AuthenticSigningTime()
if err != nil {
logger.Debugf("not using authentic signing time due to error retrieving AuthenticSigningTime, err: %v", err)
authenticSigningTime = time.Time{}
}
certResults, err := r.Validate(outcome.EnvelopeContent.SignerInfo.CertificateChain, authenticSigningTime)
if err != nil {
Expand All @@ -577,14 +578,13 @@ func verifyRevocation(outcome *notation.VerificationOutcome, r revocation.Revoca
Type: trustpolicy.TypeRevocation,
Action: outcome.VerificationLevel.Enforcement[trustpolicy.TypeRevocation],
}

finalResult := revocationresult.ResultUnknown
numOKResults := 0
var problematicCertSubject string
revokedFound := false
var revokedCertSubject string
for i := len(certResults) - 1; i >= 0; i-- {
if certResults[i].ServerResults[0].Error != nil {
if len(certResults[i].ServerResults) > 0 && certResults[i].ServerResults[0].Error != nil {
logger.Debugf("error for certificate #%d in chain with subject %v for server %q: %v", (i + 1), outcome.EnvelopeContent.SignerInfo.CertificateChain[i].Subject.String(), certResults[i].ServerResults[0].Server, certResults[i].ServerResults[0].Error)
}

Expand Down

0 comments on commit dfccf1f

Please sign in to comment.