Skip to content

Commit

Permalink
fix: update
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
  • Loading branch information
JeyJeyGao committed Sep 13, 2024
1 parent e2b246d commit 982561e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions revocation/internal/crl/crl.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ func CertCheckStatus(ctx context.Context, cert, issuer *x509.Certificate, opts C
// point with one CRL URI, which will be cached, so checking all the URIs is
// not a performance issue.
var (
serverResults []*result.ServerResult
serverResults = make([]*result.ServerResult, len(cert.CRLDistributionPoints))
lastErr error
crlURL string
)
for _, crlURL = range cert.CRLDistributionPoints {
for i, crlURL := range cert.CRLDistributionPoints {
baseCRL, err := download(ctx, crlURL, opts.HTTPClient)
if err != nil {
lastErr = fmt.Errorf("failed to download CRL from %s: %w", crlURL, err)
Expand All @@ -119,7 +119,7 @@ func CertCheckStatus(ctx context.Context, cert, issuer *x509.Certificate, opts C
}
}

serverResults = append(serverResults, crlResult)
serverResults[i] = crlResult
}

if lastErr != nil {
Expand Down

0 comments on commit 982561e

Please sign in to comment.