Fix build with boost < 1.73

This commit is contained in:
loonycyborg 2021-02-23 11:52:20 +03:00
parent d89fc738d8
commit 6732bf1e4d
No known key found for this signature in database
GPG key ID: 6E8233FAB8F26D61
2 changed files with 8 additions and 1 deletions

View file

@ -167,7 +167,11 @@ void connection::handle_handshake(const boost::system::error_code& ec)
boost::asio::ssl::verify_fail_if_no_peer_cert
);
#if BOOST_VERSION >= 107300
socket.set_verify_callback(boost::asio::ssl::host_name_verification(host_));
#else
socket.set_verify_callback(boost::asio::ssl::rfc2818_verification(host_));
#endif
socket.async_handshake(boost::asio::ssl::stream_base::client, [this](const boost::system::error_code& ec) {
if(ec) {

View file

@ -23,7 +23,6 @@
#include <boost/asio/connect.hpp>
#include <boost/asio/read.hpp>
#include <boost/asio/write.hpp>
#include <boost/asio/ssl/host_name_verification.hpp>
#include <cstdint>
#include <deque>
@ -207,7 +206,11 @@ void wesnothd_connection::handle_handshake(const error_code& ec)
boost::asio::ssl::verify_fail_if_no_peer_cert
);
#if BOOST_VERSION >= 107300
socket.set_verify_callback(boost::asio::ssl::host_name_verification(host_));
#else
socket.set_verify_callback(boost::asio::ssl::rfc2818_verification(host_));
#endif
socket.async_handshake(boost::asio::ssl::stream_base::client, [this](const error_code& ec) {
if(ec) {