Skip to content

Enable tlsv2 when TLS is used #309

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

Merged
merged 1 commit into from
Jun 11, 2021
Merged

Conversation

taste1981
Copy link
Contributor

Most endpoint now deprecate TLSv1 support. Thus we need to enable TLSv2.

@darrachequesne darrachequesne merged commit 6b9f5fb into socketio:2.x Jun 11, 2021
@@ -577,10 +577,9 @@ namespace sio
#if SIO_TLS
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));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

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.

3 participants