diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-11-01 11:25:53 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-11-01 11:25:53 +0200 |
commit | 35dbb3be330059f4965b33a35ea431a499b8514a (patch) | |
tree | 86b21a508b6b3d36c105c0a16b044ade826dcaf2 /contrib | |
parent | Merge pull request #2703 (diff) | |
parent | cmake: epee: use var from FindOpenSSL.cmake (diff) | |
download | monero-35dbb3be330059f4965b33a35ea431a499b8514a.tar.xz |
Merge pull request #2663
4b228dd3 cmake: epee: use var from FindOpenSSL.cmake (redfish)
29497f79 epee: use boost type for SSL error code (redfish)
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/epee/include/net/net_helper.h | 10 | ||||
-rw-r--r-- | contrib/epee/src/CMakeLists.txt | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/contrib/epee/include/net/net_helper.h b/contrib/epee/include/net/net_helper.h index 34d223d17..ee0e13fc1 100644 --- a/contrib/epee/include/net/net_helper.h +++ b/contrib/epee/include/net/net_helper.h @@ -36,6 +36,7 @@ #include <istream> #include <ostream> #include <string> +#include <boost/version.hpp> #include <boost/asio.hpp> #include <boost/asio/ssl.hpp> #include <boost/asio/steady_timer.hpp> @@ -576,7 +577,14 @@ namespace net_utils m_io_service.run_one(); } // Ignore "short read" error - if (ec.category() == boost::asio::error::get_ssl_category() && ec.value() != ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ)) + if (ec.category() == boost::asio::error::get_ssl_category() && + ec.value() != +#if BOOST_VERSION >= 106200 + boost::asio::ssl::error::stream_truncated +#else // older Boost supports only OpenSSL 1.0, so 1.0-only macros are appropriate + ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ) +#endif + ) MDEBUG("Problems at ssl shutdown: " << ec.message()); } diff --git a/contrib/epee/src/CMakeLists.txt b/contrib/epee/src/CMakeLists.txt index af3c6ca5f..3b41f415e 100644 --- a/contrib/epee/src/CMakeLists.txt +++ b/contrib/epee/src/CMakeLists.txt @@ -49,6 +49,5 @@ target_link_libraries(epee easylogging ${Boost_FILESYSTEM_LIBRARY} PRIVATE - ssl - crypto + ${OPENSSL_LIBRARIES} ${EXTRA_LIBRARIES}) |