-
Notifications
You must be signed in to change notification settings - Fork 18
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
Read Public Keys from a pemfile #51
Conversation
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.
Thanks, this mostly looks good!
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.
Seems reasonable, but I had a couple of questions.
@@ -0,0 +1,14 @@ | |||
-----BEGIN PUBLIC KEY----- |
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.
Out of curiosity, how was this generated?
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.
Using openssl rsa -in private_key.pem -pubout -out public_key.pem
d59dad1
to
527921f
Compare
|
This PR supports reading SPKI from a pemfile, which aids the implementation of RFC 7250 (Raw Public Key support) in rustls.
Main changes:
public_key()
andpublic_keys()
. Thepublic_key()
function returns the firstSubjectPublicKeyInfoDer
it encounters in a pemfile, whilepublic_keys()
returns an iterator over all the public keys within a pemfile. Does it ever happen that we have a pemfile with multiple public keys? If not I'll remove this function.SubjectPublicKeyInfoDer
pki-types is bumped up from version 1.3 to 1.7.Contributors:
This PR is made in collaboration with @aochagavia.