Skip to content

pki: return an error for schemes without an object identifier - #700

Merged
bwesterb merged 1 commit into
cloudflare:mainfrom
lenamonj:pki-marshal-without-oid
Sep 7, 2026
Merged

pki: return an error for schemes without an object identifier#700
bwesterb merged 1 commit into
cloudflare:mainfrom
lenamonj:pki-marshal-without-oid

Conversation

@lenamonj

@lenamonj lenamonj commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

The four pki marshal functions asserted scheme.(CertificateScheme) to reach an object identifier, and MarshalPKIXPrivateKey asserted sk.(sign.Seeded) for ML-DSA. A scheme without an OID panicked instead of returning the error the signature declares. Dilithium and SLH-DSA are registered in sign/schemes without one, so this is reachable with the library's own keys.

Each site now returns an error. The new test marshals a key of every registered scheme that lacks an OID through all four functions; on main it panics.


Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@bwesterb
bwesterb self-requested a review September 7, 2026 12:39
@bwesterb

bwesterb commented Sep 7, 2026

Copy link
Copy Markdown
Member

Thanks!

@bwesterb
bwesterb merged commit 9ca6fed into cloudflare:main Sep 7, 2026
13 checks passed
@lenamonj
lenamonj deleted the pki-marshal-without-oid branch September 7, 2026 12:43
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.

2 participants