chriskohlhoff/asio — pull request #33 by martinknafve (2014-10-22 11:25:43+00:00)
Title: Add support for disabling TLS v1.1 and TLS v1.2

Previously it has been possible to call asio::ssl::context::set_options to disable SSL v2.0, SSL v3.0 and TLS v1.0. Since TLS v1.1 and TLS v1.2 will be considered insecure sooner or later, it makes sense for applications to give end-users the possibility to disable these protocols.

Personally I wanted to add this to my own software which relies on Asio. To do this today, I had to access the context::native_handle() and call SSL_CTX_set_options myself.

This very small patch makes it possible to disable TLSv1.1 and TLSv1.2 without having to call OpenSSL as mentioned above.

I've tested the patch and confirmed that it works as intended.