Enable tlsv2 when TLS is used#309
Merged
darrachequesne merged 1 commit intosocketio:2.xfrom Jun 11, 2021
Merged
Conversation
pklapperich
reviewed
Aug 9, 2021
| client_impl::context_ptr client_impl::on_tls_init(connection_hdl conn) | ||
| { | ||
| context_ptr ctx = context_ptr(new asio::ssl::context(asio::ssl::context::tlsv1)); | ||
| context_ptr ctx = context_ptr(new asio::ssl::context(asio::ssl::context::tlsv12)); |
There was a problem hiding this comment.
Isn't this forcing TLSv1.2 even if the server supports TLS v1.3?
Usually client libraries are permissive and connect using the most secure connection the server will allow, but there's a good argument for blacklisting ciphers and handshakes that are no longer considered secure to prevent downgrade attacks. Is it possible to choose "any TLS other than v1.0 or v1.1"? If not, I think just permitting all TLS handshakes supported by the server is probably better than hardcoding to v1.2 (eg: asio::ssl::context::tls).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Most endpoint now deprecate TLSv1 support. Thus we need to enable TLSv2.