-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
New proposed SSL API #813
Comments
Looks great to me. I assume when initiating SSL via |
Right! It's really just a wrapper around |
Draft implementation in #821 |
Closing via #821 |
Raising this here as a last chance to address it before 1.0.0 is released and we'll want to avoid breaking API changes.
Currently there are two ways to use SSL connections with hiredis:
redisInitiateSSL()
and provide anSSL *
object.This offers the greatest flexibility but the user needs to take care of everything -- initialize OpenSSL, create an
SSL_CTX *
, configure it in a safe and secure way and with consideration to the OpenSSL version in use, etc.redisSecureConnection()
which handles all of the above.While easier to use, this approach does have a fair share of limitations and pitfalls:
SSL_CTX *
per connection and re-configures it, which is not very performent, depends on cert/key files to exist over time, etc.The proposal is to abandon the
redisSecureConnection()
mechanism, stay withredisInitiateSSL()
and add a new option that serves as a compromise - users have greater control over initialization, context lifetime, etc. but still don't have to work directly with OpenSSL for simple stuff.Here's a first draft of how such API may look like:
The text was updated successfully, but these errors were encountered: