Skip to content

Commit 683dc40

Browse files
committed
Disable SSLv3 (in favor of TLS) for the RPC client and server.
TLS is subject to downgrade attacks when SSLv3 is available, and SSLv3 has vulnerabilities. The popular solution is to disable SSLv3. On the web this breaks some tiny number of very old clients. While Bitcoin RPC shouldn't be exposed to the open Internet, it also shouldn't be exposed to really old SSL implementations, so it shouldn't be a major issue for us to disable SSLv3. There is more information on the downgrade attacks and disabling SSLv3 at https://disablessl3.com/ .
1 parent 4383319 commit 683dc40

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/bitcoin-cli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Object CallRPC(const string& strMethod, const Array& params)
110110
bool fUseSSL = GetBoolArg("-rpcssl", false);
111111
asio::io_service io_service;
112112
ssl::context context(io_service, ssl::context::sslv23);
113-
context.set_options(ssl::context::no_sslv2);
113+
context.set_options(ssl::context::no_sslv2 | ssl::context::no_sslv3);
114114
asio::ssl::stream<asio::ip::tcp::socket> sslStream(io_service, context);
115115
SSLIOStreamDevice<asio::ip::tcp> d(sslStream, fUseSSL);
116116
iostreams::stream< SSLIOStreamDevice<asio::ip::tcp> > stream(d);

src/rpcserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ void StartRPCThreads()
597597

598598
if (fUseSSL)
599599
{
600-
rpc_ssl_context->set_options(ssl::context::no_sslv2);
600+
rpc_ssl_context->set_options(ssl::context::no_sslv2 | ssl::context::no_sslv3);
601601

602602
filesystem::path pathCertFile(GetArg("-rpcsslcertificatechainfile", "server.cert"));
603603
if (!pathCertFile.is_complete()) pathCertFile = filesystem::path(GetDataDir()) / pathCertFile;

0 commit comments

Comments
 (0)