Skip to content

unsigned: implement RFC 9925 - #8901

Open
jsha wants to merge 2 commits into
mainfrom
unsigned
Open

unsigned: implement RFC 9925#8901
jsha wants to merge 2 commits into
mainfrom
unsigned

Conversation

@jsha

@jsha jsha commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

unsigned.Design removes the signature from an x509.Certificate and optionally replaces the signature algorithm with id-alg-unsigned (which makes it a true RFC 9925 unsigned certificate).

This is useful for (a) generating MTC CA certificates and (b) reducing the size of lint certs that we store in the database.

We don't want to replace the signature algorithm when storing lint certs, because we will later verify that all fields of a CA-signed precertificate match all fields of a lint final certificate, and swapping out signature algorithm would cause that check to break.

These certificates can be parsed with x509.ParseCertificate, but of course they can't be verified.

(Bikeshedding very welcome on the package and function name! :D)

unsigned.Design removes the signature from an x509.Certificate and
optionally replaces the signature algorithm with id-alg-unsigned
(which makes it a true RFC 9925 unsigned certificate).

This is useful for (a) generating MTC CA certificates and (b)
reducing the size of lint certs that we store in the database.

We don't want to replace the signature algorithm when storing lint certs,
because we will later verify that all fields of a CA-signed precertificate
match all fields of a lint final certificate, and swapping out
signature algorithm would cause that check to break.

These certificates can be parsed with `x509.ParseCertificate`, but
of course they can't be verified.
@jsha
jsha marked this pull request as ready for review July 24, 2026 04:36
@jsha
jsha requested a review from a team as a code owner July 24, 2026 04:36
@jsha
jsha requested a review from beautifulentropy July 24, 2026 04:36
Comment thread linter/linter.go Outdated

@beautifulentropy beautifulentropy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just a couple nits.

Comment thread test/certs/genmtpki/genmtpki.go Outdated
Comment thread unsigned/unsigned.go Outdated
@aarongable
aarongable requested a review from ezekiel July 30, 2026 18:16

@ezekiel ezekiel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good - I'd go with more aggressive camel-casing in the exported .DeSign() and the feature bool UnSignLintCerts to make it clearer, but this is great as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants