Remove legacy CertDER codepath from orphan-finder (#5387)

This commit is contained in:
Aaron Gable 2021-04-12 12:20:52 -07:00 committed by GitHub
parent b246d9cc45
commit bba0747700
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 13 deletions

View File

@ -379,19 +379,6 @@ func (opf *orphanFinder) parseDER(derPath string, regID int64) {
// generateOCSP asks the CA to generate a new OCSP response for the given cert.
func (opf *orphanFinder) generateOCSP(ctx context.Context, cert *x509.Certificate) ([]byte, error) {
if opf.issuers == nil || len(opf.issuers) == 0 {
// TODO(#5149): Remove this legacy codepath
ocspResponse, err := opf.ca.GenerateOCSP(ctx, &capb.GenerateOCSPRequest{
CertDER: cert.Raw,
Status: string(core.OCSPStatusGood),
Reason: 0,
RevokedAt: 0,
})
if err != nil {
return nil, err
}
return ocspResponse.Response, nil
}
issuer, ok := opf.issuers[issuance.GetIssuerNameID(cert)]
if !ok {
return nil, errors.New("unrecognized issuer for orphan")