diff options
author | Eric Hameleers <alien@slackware.com> | 2012-06-03 15:07:22 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2012-06-03 15:07:22 +0000 |
commit | e61a8c10a22a47eed2fad7e7cae9f1ba428d3dfc (patch) | |
tree | 37b0ea257bf5d58d5221173bdebae5c539781d0e /libtorrent-rasterbar/build/libtorrent-rasterbar_boost_asio.diff | |
parent | 21e43b5a24fb138dd9ef3e3394b9b3c39bf12f39 (diff) | |
download | asb-e61a8c10a22a47eed2fad7e7cae9f1ba428d3dfc.tar.gz asb-e61a8c10a22a47eed2fad7e7cae9f1ba428d3dfc.tar.xz |
Initial revision
Diffstat (limited to 'libtorrent-rasterbar/build/libtorrent-rasterbar_boost_asio.diff')
-rw-r--r-- | libtorrent-rasterbar/build/libtorrent-rasterbar_boost_asio.diff | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/libtorrent-rasterbar/build/libtorrent-rasterbar_boost_asio.diff b/libtorrent-rasterbar/build/libtorrent-rasterbar_boost_asio.diff new file mode 100644 index 00000000..7d17f601 --- /dev/null +++ b/libtorrent-rasterbar/build/libtorrent-rasterbar_boost_asio.diff @@ -0,0 +1,78 @@ +Index: src/torrent.cpp +=================================================================== +--- src/torrent.cpp (revision 6508) ++++ src/torrent.cpp (working copy) +@@ -85,9 +85,11 @@ + #ifdef TORRENT_USE_OPENSSL + #include "libtorrent/ssl_stream.hpp" + #include <boost/asio/ssl/context.hpp> ++#if BOOST_VERSION > 104700 + #include <boost/asio/ssl/rfc2818_verification.hpp> + #include <boost/asio/ssl/verify_context.hpp> +-#endif ++#endif // BOOST_VERSION ++#endif // TORRENT_USE_OPENSSL + + #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING + #include "libtorrent/struct_debug.hpp" +@@ -1287,6 +1289,7 @@ + + #ifdef TORRENT_USE_OPENSSL + ++#if BOOST_VERSION > 104600 + 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 +@@ -1372,6 +1375,7 @@ + + return false; + } ++#endif // BOOST_VERSION + + void torrent::init_ssl(std::string const& cert) + { +@@ -1388,6 +1392,7 @@ + + TORRENT_ASSERT(RAND_status() == 1); + ++#if BOOST_VERSION > 104600 + // create the SSL context for this torrent. We need to + // inject the root certificate, and no other, to + // verify other peers against +@@ -1469,9 +1474,12 @@ + #endif + // if all went well, set the torrent ssl context to this one + m_ssl_ctx = ctx; +- + // tell the client we need a cert for this torrent + alerts().post_alert(torrent_need_cert_alert(get_handle())); ++#else ++ set_error(asio::error::not_supported, "x.509 certificate"); ++ pause(); ++#endif + } + + #endif // TORRENT_OPENSSL +Index: include/libtorrent/torrent.hpp +=================================================================== +--- include/libtorrent/torrent.hpp (revision 6508) ++++ include/libtorrent/torrent.hpp (working copy) +@@ -47,6 +47,7 @@ + #include <boost/enable_shared_from_this.hpp> + #include <boost/scoped_ptr.hpp> + #include <boost/intrusive_ptr.hpp> ++#include <boost/version.hpp> + + #ifdef _MSC_VER + #pragma warning(pop) +@@ -954,7 +955,10 @@ + #ifdef TORRENT_USE_OPENSSL + boost::shared_ptr<asio::ssl::context> m_ssl_ctx; + ++#if BOOST_VERSION > 104600 + bool verify_peer_cert(bool preverified, boost::asio::ssl::verify_context& ctx); ++#endif ++ + void init_ssl(std::string const& cert); + #endif + |