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

Fix TLS connections not verified by default #900

Merged
merged 1 commit into from May 1, 2020

Conversation

bpo
Copy link
Contributor

@bpo bpo commented Apr 25, 2020

If you specify an SSL URL for your client but do not specify some values in ssl_params, you'll end up with a connection that does not actually verify the certificate. This is surprising: usually network clients using TLS would use VERIFY_PEER with a system certificate store. This probably went undetected because domain verification still happens by default - it's just the certificate chain that is skipped.

SSLContext#set_params is the step in SSL connection establishment that
merges user-provided SSL parameters with "saner defaults".

Previously SSLContext#set_params was only being called when
ssl_params was provided to the SSLConnection, so the SSLContexet was
left unconfigured. This leads to the surprising default verify_mode of
nil, resulting in SSL connections verifying hostnames but never
verifying certificate trust.

`SSLContext#set_params` is the step in SSL connection establishment that
merges user-provided SSL parameters with "saner defaults".

Previously `SSLContext#set_params` was only being called when
`ssl_params` was provided to the SSLConnection, so the SSLContexet was
left unconfigured. This leads to the surprising default `verify_mode` of
`nil`, resulting in SSL connections verifying hostnames but never
verifying certificate trust.
@byroot byroot merged commit 67a59b4 into redis:master May 1, 2020
@byroot
Copy link
Collaborator

byroot commented May 1, 2020

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants