boulder/ra/proto
Aaron Gable 2a2629493d
Enable administrative revocation of malformed certs (#5813)
Today, the revocation codepaths involve parsing the to-be-revoked
certificate multiple times: inside `admin-revoker` itself, inside the
RA's `AdministrativelyRevokeCertificate` method, and again in its helper
`revokeCertificate`. In addition, we use the fact that we have the full
certificate multiple times: to log various attributes of it, to compute
its `IssuerNameID`, and more. All of this will fail if we ever issue a
cert that is malformed to the point that it cannot be parsed.

Add a new argument to the `AdministrativelyRevokeCertificateRequest`
that allows the certificate to be identified by serial only, instead of
by full certificate bytes. Add support for this in the gRPC handler by
using the serial to construct a dummy in-memory Certificate object.
Support this in the `revokeCertificate` codepath by checking to see if
the passed-in cert has any underlying raw DER bytes, and if not,
triggering the new codepath that does everything via the serial.

In order to support this, unfortunately we have to add a second
in-memory map to the RA, so that it can look up issuer certs by either
name ID or old-style ID, as the IDs gleaned from the database (instead
of from the cert itself) may still be old-style. This will be removed
when the old-style Issuer IDs have aged out.

Fixes #5759
2021-11-29 11:28:19 -08:00
..
ra.pb.go Enable administrative revocation of malformed certs (#5813) 2021-11-29 11:28:19 -08:00
ra.proto Enable administrative revocation of malformed certs (#5813) 2021-11-29 11:28:19 -08:00
ra_grpc.pb.go Use google.protobuf.Empty instead of core.Empty (#5454) 2021-06-03 14:17:41 -07:00