Skip to content
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

socket: Support all private keys OpenSSL supports #2487

Merged
merged 2 commits into from
Jul 10, 2019

Conversation

mmussomele
Copy link
Contributor

@mmussomele mmussomele commented Jul 9, 2019

When creating a TLS socket, the helpers only attempted to parse an RSA
key with OpenSSL::PKey::RSA.new. By using the higher level
OpenSSL::PKey::read, OpenSSL will determine and parse the proper key
type, adding support for EC and DSA keys.

Signed-off-by: Matthew Mussomele matt@nefeli.io

Which issue(s) this PR fixes:
Fixes #2486

What this PR does / why we need it:

This adds support for using any private keys that OpenSSL supports to the socket helper. I looked for existing tests around the TLS socket to augment, but failed to find any, but offline tested that the changes snippet properly loads other key types.

Docs Changes:
None

Release Note:

When creating a TLS socket, the helpers only attempted to parse an RSA
key with `OpenSSL::PKey::RSA.new`. By using the higher level
`OpenSSL::PKey::read`, OpenSSL will determine and parse the proper key
type, adding support for EC and DSA keys.

Signed-off-by: Matthew Mussomele <matt@nefeli.io>
@repeatedly repeatedly added the enhancement Feature request or improve operations label Jul 9, 2019
Signed-off-by: Matthew Mussomele <matt@nefeli.io>
@mmussomele
Copy link
Contributor Author

I looked at the failing tests but they seem unrelated to my changes. I may be mistaken, as I am not experienced with ruby though. Any help would be much appreciated.

@repeatedly repeatedly merged commit d1ba31a into fluent:master Jul 10, 2019
@repeatedly
Copy link
Member

Thanks for the patch. Other ruby developer, naruse-san, also confirmed this patch looks good :)

@mmussomele mmussomele deleted the support-keys branch July 10, 2019 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request or improve operations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support abitrary private keys for TLS sockets
2 participants