forked from letsencrypt/boulder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable administrative revocation of malformed certs (letsencrypt#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 letsencrypt#5759
- Loading branch information
1 parent
6184ad5
commit 2a26294
Showing
6 changed files
with
298 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.