Allow SignCert callers to override CSR signature checks (#27914)

- We are leveraging this new feature flag to ignore the CSR's
   signature as we are constructing a CSR based on the information
   from a CMPv2 message.
This commit is contained in:
Steven Clark
2024-07-30 12:20:10 -04:00
committed by GitHub
parent 4f6c215a65
commit 7049424c16
6 changed files with 131 additions and 10 deletions

View File

@@ -1186,9 +1186,10 @@ func signCertificate(data *CreationBundle, randReader io.Reader) (*ParsedCertBun
return nil, errutil.UserError{Err: "nil csr given to signCertificate"}
}
err := data.CSR.CheckSignature()
if err != nil {
return nil, errutil.UserError{Err: "request signature invalid"}
if !data.Params.IgnoreCSRSignature {
if err := data.CSR.CheckSignature(); err != nil {
return nil, errutil.UserError{Err: "request signature invalid"}
}
}
result := &ParsedCertBundle{}