Commit 74c95b7
authored
Simplify IssueCertificate into straight-line code (#8424)
The issuePrecertificate, issuePrecertificateInner, and
issueCertificateForPrecertificate helpers were originally necessary
because the RA made two separate gRPC calls to the CA, before and after
acquiring SCTs. Now, the CA handles acquiring SCTs itself, and there's
only one gRPC entrypoint: ca.IssueCertficate. This means that the layers
of abstraction represented by those old helpers are no longer necessary,
and we can significantly simplify the CA's core logic.
Inline the contents of issuePrecertificate, issuePrecertificateInner,
and issueCertificateForPrecertificate directly into IssueCertificate.
Remove the sa.GetCertificate check, because it is now impossible for the
final-certificate issuance code to have been reached except by
progressing through the precert issuance code. Remove the need to derive
an issuer and a profile from the precert, because we are still holding
onto the exact same issuer and profile that were used to issue the
precert.
Delete the unit tests which were only testing the underlying
issuePrecertificate and issueCertificateForPrecertificate helpers. As of
#8422, those tests were
redundant. Move some helpers which were shared by the old and new tests
to new homes closer to their now-sole callers.
Part of #83901 parent 29b3b06 commit 74c95b7
1 file changed
+213
-279
lines changed
0 commit comments