TLS: Validate the hostname of the server certificate#864
TLS: Validate the hostname of the server certificate#864mkauf wants to merge 1 commit intoredis:masterfrom
Conversation
Avoid MITM attacks by checking whether the server's certificate contains the server's hostname. Currently this works only with OpenSSL 1.1.0 or newer.
|
Hi, thanks for the PR! The code looks fine to me. The only question I have is whether users are going to want to make the check optional (as opposed to always happening with OpenSSL >= 1.1.0 when they specify Is the problem that @yossigo Any thoughts? |
Yes, it only sets the SNI hostname. This name is not used to validate the server certificate. |
|
@mkauf Thanks for this PR for raising this issue in the first place! Technically this is a breaking change because anyone who's using SNI but don't have compatible certs would experience connection errors. As hiredis 1.0.0 was just released I think we may be okay with that, but would like to raise two points:
@michael-grunder Does this make sense to you? |
Avoid MITM attacks by checking whether the server's certificate contains the server's hostname.
Currently this works only with OpenSSL 1.1.0 or newer.