aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2014-12-06 07:08:02 -0800
committerWladimir J. van der Laan <laanwj@gmail.com>2014-12-09 15:22:28 +0100
commit0a94661e8db94e84ecbf1ea45a51fb3c7fb77283 (patch)
treedb0b8e4a8bc698a25d7aafbe21c156815d136cf8
parentbb424e4447a5b1e2f9592eed52f869426933f2c8 (diff)
downloadbitcoin-0a94661e8db94e84ecbf1ea45a51fb3c7fb77283.tar.xz
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/ . Rebased-From: 683dc4009b2b01699e672f8150c28e2ebe0aae19
-rw-r--r--src/rpcclient.cpp2
-rw-r--r--src/rpcserver.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 4f3c39ce9b..5e62b7130b 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -40,7 +40,7 @@ Object CallRPC(const string& strMethod, const Array& params)
bool fUseSSL = GetBoolArg("-rpcssl", false);
asio::io_service io_service;
ssl::context context(io_service, ssl::context::sslv23);
- context.set_options(ssl::context::no_sslv2);
+ context.set_options(ssl::context::no_sslv2 | ssl::context::no_sslv3);
asio::ssl::stream<asio::ip::tcp::socket> sslStream(io_service, context);
SSLIOStreamDevice<asio::ip::tcp> d(sslStream, fUseSSL);
iostreams::stream< SSLIOStreamDevice<asio::ip::tcp> > stream(d);
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index f43acf41ba..cc9e3307de 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -539,7 +539,7 @@ void StartRPCThreads()
if (fUseSSL)
{
- rpc_ssl_context->set_options(ssl::context::no_sslv2);
+ rpc_ssl_context->set_options(ssl::context::no_sslv2 | ssl::context::no_sslv3);
filesystem::path pathCertFile(GetArg("-rpcsslcertificatechainfile", "server.cert"));
if (!pathCertFile.is_complete()) pathCertFile = filesystem::path(GetDataDir()) / pathCertFile;