-
Notifications
You must be signed in to change notification settings - Fork 225
Add JS endpoint for RSA key generation #2293
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 JS endpoint for RSA key generation #2293
Conversation
cwinter_js_gen_rsa@20307 aka 20210311.29 vs main ewma over 20 builds from 19970 to 20289 |
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.
LGTM but please consider documenting the growing JS API in Sphinx.
Co-authored-by: Amaury Chamayou <[email protected]>
0281865
to
3a3a459
Compare
Yes, I agree, we should start documenting this properly. I have trouble seeing where exactly "the JS API" begins and ends and what shape or form the documentation should take. Should there be a general |
See also #1765 |
prv_pub_der = prv.public_key().public_bytes( | ||
Encoding.DER, PublicFormat.SubjectPublicKeyInfo | ||
) | ||
pub_der = pub.public_bytes(Encoding.DER, PublicFormat.SubjectPublicKeyInfo) | ||
return prv_pub_der == pub_der |
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.
prv_pub_der = prv.public_key().public_bytes( | |
Encoding.DER, PublicFormat.SubjectPublicKeyInfo | |
) | |
pub_der = pub.public_bytes(Encoding.DER, PublicFormat.SubjectPublicKeyInfo) | |
return prv_pub_der == pub_der | |
return prv.public_key() == pub |
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.
That's not right; that comparison is always false because it compares two different key objects (which hold the same key). I initially tried the same and then had to add the complicated conversion to make it work.
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.
Really? I could have sworn I used that in the past, hmm..
EDIT: works for x509 certs but not for keys...
Looks good to me, let's tackle the docs in a separate PR. |
Co-authored-by: Maik Riechert <[email protected]>
Yeah, I agree, the docs can go into a separate PR. |
No description provided.