diff --git a/include/libtorrent/ssl_stream.hpp b/include/libtorrent/ssl_stream.hpp index 0a7468ef6..f2a225e4e 100644 --- a/include/libtorrent/ssl_stream.hpp +++ b/include/libtorrent/ssl_stream.hpp @@ -69,7 +69,7 @@ public: void set_verify_callback(T const& fun, error_code& ec) { m_sock.set_verify_callback(fun, ec); } -#if BOOST_VERSION > 104600 +#if BOOST_VERSION >= 104700 SSL* native_handle() { return m_sock.native_handle(); } #endif diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index c727720c5..fb7a9030f 100644 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -955,7 +955,7 @@ namespace libtorrent #ifdef TORRENT_USE_OPENSSL boost::shared_ptr m_ssl_ctx; -#if BOOST_VERSION > 104600 +#if BOOST_VERSION >= 104700 bool verify_peer_cert(bool preverified, boost::asio::ssl::verify_context& ctx); #endif diff --git a/src/http_connection.cpp b/src/http_connection.cpp index ec8be150f..2b56c710b 100644 --- a/src/http_connection.cpp +++ b/src/http_connection.cpp @@ -42,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/debug.hpp" #endif -#if defined TORRENT_USE_OPENSSL && BOOST_VERSION > 104600 +#if defined TORRENT_USE_OPENSSL && BOOST_VERSION >= 104700 #include #endif @@ -340,7 +340,7 @@ void http_connection::start(std::string const& hostname, std::string const& port } } -#if defined TORRENT_USE_OPENSSL && BOOST_VERSION > 104600 +#if defined TORRENT_USE_OPENSSL && BOOST_VERSION >= 104700 // for SSL connections, make sure to authenticate the hostname // of the certificate #define CASE(t) case socket_type_int_impl >::value: \ diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 86775142b..c1fd71ac0 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -537,7 +537,7 @@ namespace aux { int session_impl::logging_allocator::allocated_bytes = 0; #endif -#if defined TORRENT_USE_OPENSSL && BOOST_VERSION > 104600 +#if defined TORRENT_USE_OPENSSL && BOOST_VERSION >= 104700 // when running bittorrent over SSL, the SNI (server name indication) // extension is used to know which torrent the incoming connection is // trying to connect to. The 40 first bytes in the name is expected to @@ -684,7 +684,7 @@ namespace aux { error_code ec; #ifdef TORRENT_USE_OPENSSL m_ssl_ctx.set_verify_mode(asio::ssl::context::verify_none, ec); -#if BOOST_VERSION > 104600 +#if BOOST_VERSION >= 104700 SSL_CTX_set_tlsext_servername_callback(m_ssl_ctx.native_handle(), servername_callback); SSL_CTX_set_tlsext_servername_arg(m_ssl_ctx.native_handle(), this); #endif // BOOST_VERSION diff --git a/src/torrent.cpp b/src/torrent.cpp index a44eea55a..c9ddc54b8 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -85,7 +85,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifdef TORRENT_USE_OPENSSL #include "libtorrent/ssl_stream.hpp" #include -#if BOOST_VERSION > 104600 +#if BOOST_VERSION >= 104700 #include #include #endif // BOOST_VERSION @@ -1289,7 +1289,7 @@ namespace libtorrent #ifdef TORRENT_USE_OPENSSL -#if BOOST_VERSION > 104600 +#if BOOST_VERSION > 104700 bool torrent::verify_peer_cert(bool preverified, boost::asio::ssl::verify_context& ctx) { // if the cert wasn't signed by the correct CA, fail the verification @@ -1392,7 +1392,7 @@ namespace libtorrent TORRENT_ASSERT(RAND_status() == 1); -#if BOOST_VERSION > 104600 +#if BOOST_VERSION >= 104700 // create the SSL context for this torrent. We need to // inject the root certificate, and no other, to // verify other peers against @@ -4606,7 +4606,7 @@ namespace libtorrent str->set_dst_name(hostname); } -#if defined TORRENT_USE_OPENSSL && BOOST_VERSION > 104600 +#if defined TORRENT_USE_OPENSSL && BOOST_VERSION >= 104700 // for SSL connections, make sure to authenticate the hostname // of the certificate #define CASE(t) case socket_type_int_impl >::value: \ @@ -5495,7 +5495,7 @@ namespace libtorrent (void)ret; TORRENT_ASSERT(ret); -#if defined TORRENT_USE_OPENSSL && BOOST_VERSION > 104600 +#if defined TORRENT_USE_OPENSSL && BOOST_VERSION >= 104700 if (is_ssl_torrent()) { // for ssl sockets, set the hostname @@ -5646,7 +5646,7 @@ namespace libtorrent // INVARIANT_CHECK; #ifdef TORRENT_USE_OPENSSL -#if BOOST_VERSION > 104600 +#if BOOST_VERSION >= 104700 if (is_ssl_torrent()) { // if this is an SSL torrent, don't allow non SSL peers on it