diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 60d17dee3e..1eb6348f5b 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -703,8 +703,8 @@ void ThreadRPCServer(void* parg) } // Forward declaration required for RPCListen -template -static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor > acceptor, +template +static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor > acceptor, ssl::context& context, bool fUseSSL, AcceptedConnection* conn, @@ -713,8 +713,8 @@ static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor -static void RPCListen(boost::shared_ptr< basic_socket_acceptor > acceptor, +template +static void RPCListen(boost::shared_ptr< basic_socket_acceptor > acceptor, ssl::context& context, const bool fUseSSL) { @@ -724,7 +724,7 @@ static void RPCListen(boost::shared_ptr< basic_socket_acceptorasync_accept( conn->sslStream.lowest_layer(), conn->peer, - boost::bind(&RPCAcceptHandler, + boost::bind(&RPCAcceptHandler, acceptor, boost::ref(context), fUseSSL, @@ -735,8 +735,8 @@ static void RPCListen(boost::shared_ptr< basic_socket_acceptor -static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor > acceptor, +template +static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor > acceptor, ssl::context& context, const bool fUseSSL, AcceptedConnection* conn, @@ -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); @@ -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 @@ -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 sslStream(io_service, context); SSLIOStreamDevice d(sslStream, fUseSSL);