PKI: Do not load revoked certificates if CRL has been disabled (#17385)
* PKI: Do not load revoked certificates if CRL has been disabled - Restore the prior behavior of not reading in all revoked certificates if the CRL has been disabled as there might be performance issues if a customer had or is still revoking a lot of certificates. * Add cl
This commit is contained in:
parent
9542cffa65
commit
bb1d36f401
|
@ -828,13 +828,19 @@ func buildAnyCRLs(sc *storageContext, forceNew bool, isDelta bool) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Next, we load and parse all revoked certificates. We need to assign
|
var unassignedCerts []pkix.RevokedCertificate
|
||||||
// these certificates to an issuer. Some certificates will not be
|
var revokedCertsMap map[issuerID][]pkix.RevokedCertificate
|
||||||
// assignable (if they were issued by a since-deleted issuer), so we need
|
|
||||||
// a separate pool for those.
|
// If the CRL is disabled do not bother reading in all the revoked certificates.
|
||||||
unassignedCerts, revokedCertsMap, err := getRevokedCertEntries(sc, issuerIDCertMap, isDelta)
|
if !globalCRLConfig.Disable {
|
||||||
if err != nil {
|
// Next, we load and parse all revoked certificates. We need to assign
|
||||||
return fmt.Errorf("error building CRLs: unable to get revoked certificate entries: %v", err)
|
// these certificates to an issuer. Some certificates will not be
|
||||||
|
// assignable (if they were issued by a since-deleted issuer), so we need
|
||||||
|
// a separate pool for those.
|
||||||
|
unassignedCerts, revokedCertsMap, err = getRevokedCertEntries(sc, issuerIDCertMap, isDelta)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("error building CRLs: unable to get revoked certificate entries: %v", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := augmentWithRevokedIssuers(issuerIDEntryMap, issuerIDCertMap, revokedCertsMap); err != nil {
|
if err := augmentWithRevokedIssuers(issuerIDEntryMap, issuerIDCertMap, revokedCertsMap); err != nil {
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:bug
|
||||||
|
secrets/pki: Do not read revoked certificates from backend when CRL is disabled
|
||||||
|
```
|
Loading…
Reference in New Issue