-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for ECDSA and DSA keys CSR to Parse CSR operation #1828
Add support for ECDSA and DSA keys CSR to Parse CSR operation #1828
Conversation
9691851
to
ae03e34
Compare
src/core/operations/ParseCSR.mjs
Outdated
if (extension.msSGC) usage.push("Microsoft Server Gated Crypto"); | ||
if (extension.msEFS) usage.push("Microsoft Encrypted File System"); | ||
if (extension.nsSGC) usage.push("Netscape Server Gated Crypto"); | ||
const ekuIdentifierToName = new Map([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the advantage of using a map here, over a simple object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing really, refactored the code to use Object instead.
Woah, this is some really impressive work! I'm going to need to find some time to really properly review this, as it's a rather major change to one of our fundamental operations. A quick once-over doesn't suggest any major issues. Just one query above about your usage of |
Thanks Robin! This is an amazing PR to improve our CSR parsing capabilities. |
Description
Updated
Parse CSR
operation to use jsrsasign package instead of node-forge for parsing CSR's because with current package this operation is limited to CSRs with RSA keys. With the changes in this PR,Parse CSR
now supports parsing CSRs with ECDSA and DSA keys.I have also updated the output format of this operation, which mainly includes removing the
Version
field and re-ordering some sections of the CSR attributes and extensions in the output box.Side Effect
Unfortunately I couldn't find any way to parse version number from the CSRs, but I feel that can be considered as an acceptable trade-off since there's only one universally used value for that field i.e. 0 defined in RFC#2986.
Type of change
Please select the option that best describes the change:
How Has This Been Tested?
Tested locally on my machine with various CSRs. Following are some outputs from those tests:
Checklist: