Repository navigation
Copy certificate subject names exactly when re-issuing certificates - #8627
Draft
Max (maxtropets) wants to merge 5 commits into
Draft
Max (maxtropets) wants to merge 5 commits into
Max (maxtropets) wants to merge 5 commits into
Conversation
Service certificate renewal, disaster recovery and receipt endorsements of previous service identities re-issued a certificate from the printed subject name of the existing certificate, which the subject name parser cannot read back once it has more than one RDN, or contains characters that printing escapes. Transport the subject as its DER encoding instead. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…overload Its only production caller now passes the subject as DER; the two tests using it move to the valid_from/valid_to overload. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Max (maxtropets)
force-pushed
the
maxtropets-cert-subject-name-der
branch
from
October 23, 2026 15:12
9ee053a to
e34bcb4
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Service certificate renewal, recovery and previous-identity endorsements rebuilt the subject name from the existing certificate's printed form, which
parse_name()cannot read back once there is more than one RDN (", "separator, escaped/and+, reordering). They now copy the subject's DER bytes instead, as is already done for the issuer name.Before
After
Single-RDN subjects such as the default
CN=CCF Servicealready round-tripped, so their certificates are unchanged byte for byte; mixed-version networks are unaffected.New API:
Verifier::subject_der(), DER overloads ofECKeyPair::create_csr()andself_sign()(pure virtuals, so out-of-tree implementers must add them).get_subject_name()is kept.Tests: unit round trip of
O=Last / CN=Smith, John / OU=https://a.b / OU=x+ythrough self-signed, renewed and endorsed certificates, plus rejection of malformed DER; e2e renewal and three recoveries with a two-RDN subject.