Skip to content

Commit

Permalink
Merge pull request #800 from denravonska/boost-1.66
Browse files Browse the repository at this point in the history
Fix boost-1.66 incompatibilities.
  • Loading branch information
denravonska authored Jan 7, 2018
2 parents 161071c + 14c5880 commit d53f4ba
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/bitcoinrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,8 @@ void ThreadRPCServer(void* parg)
}

// Forward declaration required for RPCListen
template <typename Protocol, typename SocketAcceptorService>
static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
template <typename Protocol>
static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
ssl::context& context,
bool fUseSSL,
AcceptedConnection* conn,
Expand All @@ -713,8 +713,8 @@ static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol,
/**
* Sets up I/O resources to accept and handle a new connection.
*/
template <typename Protocol, typename SocketAcceptorService>
static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
template <typename Protocol>
static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
ssl::context& context,
const bool fUseSSL)
{
Expand All @@ -724,7 +724,7 @@ static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketA
acceptor->async_accept(
conn->sslStream.lowest_layer(),
conn->peer,
boost::bind(&RPCAcceptHandler<Protocol, SocketAcceptorService>,
boost::bind(&RPCAcceptHandler<Protocol>,
acceptor,
boost::ref(context),
fUseSSL,
Expand All @@ -735,8 +735,8 @@ static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketA
/**
* Accept and handle incoming connection.
*/
template <typename Protocol, typename SocketAcceptorService>
static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
template <typename Protocol>
static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
ssl::context& context,
const bool fUseSSL,
AcceptedConnection* conn,
Expand Down Expand Up @@ -813,7 +813,7 @@ void ThreadRPCServer2(void* parg)
assert(rpc_io_service == NULL);
rpc_io_service = new asio::io_service();

ssl::context context(*rpc_io_service, ssl::context::sslv23);
ssl::context context(ssl::context::sslv23);
if (fUseSSL)
{
context.set_options(ssl::context::no_sslv2);
Expand All @@ -829,7 +829,7 @@ void ThreadRPCServer2(void* parg)
else printf("ThreadRPCServer ERROR: missing server private key file %s\n", pathPKFile.string().c_str());

string strCiphers = GetArg("-rpcsslciphers", "TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH");
SSL_CTX_set_cipher_list(context.impl(), strCiphers.c_str());
SSL_CTX_set_cipher_list(context.native_handle(), strCiphers.c_str());
}

// Try a dual IPv6/IPv4 socket, falling back to separate IPv4 and IPv6 sockets
Expand Down Expand Up @@ -1125,7 +1125,7 @@ Object CallRPC(const string& strMethod, const Array& params)
// Connect to localhost
bool fUseSSL = GetBoolArg("-rpcssl");
asio::io_service io_service;
ssl::context context(io_service, ssl::context::sslv23);
ssl::context context(ssl::context::sslv23);
context.set_options(ssl::context::no_sslv2);
asio::ssl::stream<asio::ip::tcp::socket> sslStream(io_service, context);
SSLIOStreamDevice<asio::ip::tcp> d(sslStream, fUseSSL);
Expand Down

0 comments on commit d53f4ba

Please sign in to comment.