fix: support non-RSA certificates in decoder (EC, Ed25519, etc.)#7
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Replace node-forge with @peculiar/x509 library which properly supports all certificate types including RSA, EC, Ed25519, Ed448, etc. The previous implementation using node-forge failed with 'Cannot read public key. OID is not RSA' when decoding certificates using non-RSA key algorithms. - Replace node-forge with @peculiar/x509 for certificate parsing - Cleaner, simpler implementation with proper TypeScript types - Display key algorithm (RSA, Ed25519, etc.) alongside the public key - Add tests for RSA and Ed25519 certificate parsing - Update tools.config.tsx to reference new dependency
30df17e to
c614b09
Compare
Add full extension details including: - critical flag for all extensions - subjectKeyIdentifier value - authorityKeyIdentifier keyIdentifier - subjectAltName altNames list - keyUsage flags (digitalSignature, keyEncipherment, etc.) - extKeyUsage purposes (serverAuth, clientAuth, etc.) - basicConstraints cA flag and pathLength - authorityInfoAccess OCSP and CA issuer URLs
The @peculiar/x509 library's PublicKey class has a proper toString(format) method that returns PEM-encoded strings, but ESLint's no-base-to-string rule doesn't recognize it.
Show the OID in parentheses next to the extension name when it differs from the friendly name (e.g., 'authorityInfoAccess (1.3.6.1.5.5.7.1.1)')
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.
Summary
Fixes certificate decoder failing with "Cannot read public key. OID is not RSA" when decoding certificates using non-RSA key algorithms (EC, Ed25519, Ed448, etc.).
Changes
Testing