-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
fix(ext/node): add alternative RSA OID #22511
Conversation
let private_key = | ||
rsa::pkcs1::RsaPrivateKey::from_der(pk_info.private_key)?; | ||
let modulus_length = private_key.modulus.as_bytes().len() * 8; |
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.
Currently encountering error:
Error: unexpected ASN.1 DER tag: expected SEQUENCE, got INTEGER
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.
The OID has .3.1
ending hence so I'm pretty sure that's not related to RSA
http://oid-info.com/get/1.2.840.113549.1.3.1
This is the object identifier for dhKeyAgreement
defined in PKCS #3: Diffie-Hellman KeyAgreement Standard (1993). PDF
The key material in the PEM is DH private key.
This has been superseded by #22891. |
While working on #22489, I noticed that this private key was unable to be created using
crypto.createPrivateKey()
. This is because it uses an RSA OID,1.2.840.113549.1.3.1
, which is less commonly used than the currently used one,1.2.840.113549.1.1.1
. This change adds the lesser-used RSA OID.CC @littledivy