Boost C++ Libraries: Ticket #7609: Add support for TLS 1.1 and TLS 1.2 to boost::asio::ssl https://svn.boost.org/trac10/ticket/7609 <p> boost::asio::ssl is based on OpenSSL library. Boost allow to create ssl::stream that will be using SSL or TLS 1.0, but OpenSSL supports also TLS 1.1 and TLS 1.2 and all that is missing from asio::ssl are several constants. Here is a simple patch that enabled TLS 1.1 and 1.2 client and server modes. </p> <pre class="wiki">+++ asio/ssl/context_base.hpp 2012-10-30 18:29:03.892959799 +0200 @@ -57,9 +58,21 @@ public: /// TLS version 1 client. tlsv1_client, + /// TLS version 1.1 client. + tlsv1_1_client, + + /// TLS version 1.2 client. + tlsv1_2_client, + /// TLS version 1 server. tlsv1_server, + /// TLS version 1.1 server. + tlsv1_1_server, + + /// TLS version 1.2 server. + tlsv1_2_server, + /// Generic SSL/TLS. sslv23, </pre><pre class="wiki">+++ asio/ssl/impl/context.ipp 2012-10-30 18:03:44.036986053 +0200 @@ -72,9 +72,21 @@ context::context(context::method m) case context::tlsv1_client: handle_ = ::SSL_CTX_new(::TLSv1_client_method()); break; + case context::tlsv1_1_client: + handle_ = ::SSL_CTX_new(::TLSv1_1_client_method()); + break; + case context::tlsv1_2_client: + handle_ = ::SSL_CTX_new(::TLSv1_2_client_method()); + break; case context::tlsv1_server: handle_ = ::SSL_CTX_new(::TLSv1_server_method()); break; + case context::tlsv1_1_server: + handle_ = ::SSL_CTX_new(::TLSv1_1_server_method()); + break; + case context::tlsv1_2_server: + handle_ = ::SSL_CTX_new(::TLSv1_2_server_method()); + break; case context::sslv23: handle_ = ::SSL_CTX_new(::SSLv23_method()); break; @@ -475,6 +487,36 @@ int context::verify_callback_function(in return 0; } </pre><pre class="wiki">+++ asio/ssl/old/detail/openssl_context_service.hpp 2012-10-30 18:20:34.328968995 +0200 @@ -100,9 +101,21 @@ public: case context_base::tlsv1_client: impl = ::SSL_CTX_new(::TLSv1_client_method()); break; + case context_base::tlsv1_1_client: + impl = ::SSL_CTX_new(::TLSv1_1_client_method()); + break; + case context_base::tlsv1_2_client: + impl = ::SSL_CTX_new(::TLSv1_2_client_method()); + break; case context_base::tlsv1_server: impl = ::SSL_CTX_new(::TLSv1_server_method()); break; + case context_base::tlsv1_1_server: + impl = ::SSL_CTX_new(::TLSv1_1_server_method()); + break; + case context_base::tlsv1_2_server: + impl = ::SSL_CTX_new(::TLSv1_2_server_method()); + break; case context_base::sslv23: impl = ::SSL_CTX_new(::SSLv23_method()); break; </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7609 Trac 1.4.3 chris_kohlhoff Sat, 25 May 2013 12:48:39 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7609#comment:1 https://svn.boost.org/trac10/ticket/7609#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed on trunk in <a class="changeset" href="https://svn.boost.org/trac10/changeset/84320" title="Support for creation of TLSv1.1 and TLSv1.2 contexts. Thanks go to ...">[84320]</a>. </p> <p> Merged to release in <a class="changeset" href="https://svn.boost.org/trac10/changeset/84388" title="Merge from trunk. ...">[84388]</a>. </p> Ticket anonymous Mon, 05 Aug 2013 10:53:58 GMT <link>https://svn.boost.org/trac10/ticket/7609#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7609#comment:2</guid> <description> <p> Using tlsv1_2_server will work with SSL clients ? Is it similar to 'sslv23' which understands SSLv2, SSLv3 and TLSv1 ? </p> </description> <category>Ticket</category> </item> </channel> </rss>