diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2012-04-04 21:19:27 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2012-04-04 21:19:27 -0400 |
commit | 5ce4c2a23a756e20b85d721e08711e6faa3654ff (patch) | |
tree | a13692c48249140dc893562ce902685ce6477b86 /src | |
parent | b0a7e05a45a925d78efd00ecca6dce9b7a9530f9 (diff) |
Remove USE_SSL #define
Diffstat (limited to 'src')
-rw-r--r-- | src/bitcoinrpc.cpp | 28 | ||||
-rw-r--r-- | src/init.cpp | 2 | ||||
-rw-r--r-- | src/makefile.linux-mingw | 2 | ||||
-rw-r--r-- | src/makefile.mingw | 2 | ||||
-rw-r--r-- | src/makefile.osx | 2 | ||||
-rw-r--r-- | src/makefile.unix | 4 | ||||
-rw-r--r-- | src/rpcdump.cpp | 9 |
7 files changed, 5 insertions, 44 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index eb2f04f1d9..120da81212 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -14,12 +14,11 @@ #include <boost/iostreams/stream.hpp> #include <boost/algorithm/string.hpp> #include <boost/lexical_cast.hpp> -#ifdef USE_SSL #include <boost/asio/ssl.hpp> #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket> SSLStream; -#endif + #include "json/json_spirit_reader_template.h" #include "json/json_spirit_writer_template.h" #include "json/json_spirit_utils.h" @@ -2275,7 +2274,6 @@ bool ClientAllowed(const string& strAddress) return false; } -#ifdef USE_SSL // // IOStream device that speaks SSL but can also speak non-SSL // @@ -2327,7 +2325,6 @@ private: bool fUseSSL; SSLStream& stream; }; -#endif void ThreadRPCServer(void* parg) { @@ -2386,7 +2383,6 @@ void ThreadRPCServer2(void* parg) acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); -#ifdef USE_SSL ssl::context context(io_service, ssl::context::sslv23); if (fUseSSL) { @@ -2404,29 +2400,17 @@ void ThreadRPCServer2(void* parg) "TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH"); SSL_CTX_set_cipher_list(context.impl(), ciphers.c_str()); } -#else - if (fUseSSL) - throw runtime_error("-rpcssl=1, but bitcoin compiled without full openssl libraries."); -#endif loop { // Accept connection -#ifdef USE_SSL SSLStream sslStream(io_service, context); SSLIOStreamDevice d(sslStream, fUseSSL); iostreams::stream<SSLIOStreamDevice> stream(d); -#else - ip::tcp::iostream stream; -#endif ip::tcp::endpoint peer; vnThreadsRunning[THREAD_RPCSERVER]--; -#ifdef USE_SSL acceptor.accept(sslStream.lowest_layer(), peer); -#else - acceptor.accept(*stream.rdbuf(), peer); -#endif vnThreadsRunning[4]++; if (fShutdown) return; @@ -2553,7 +2537,6 @@ Object CallRPC(const string& strMethod, const Array& params) // Connect to localhost bool fUseSSL = GetBoolArg("-rpcssl"); -#ifdef USE_SSL asio::io_service io_service; ssl::context context(io_service, ssl::context::sslv23); context.set_options(ssl::context::no_sslv2); @@ -2562,15 +2545,6 @@ Object CallRPC(const string& strMethod, const Array& params) iostreams::stream<SSLIOStreamDevice> stream(d); if (!d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", "8332"))) throw runtime_error("couldn't connect to server"); -#else - if (fUseSSL) - throw runtime_error("-rpcssl=1, but bitcoin compiled without full openssl libraries."); - - ip::tcp::iostream stream(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", "8332")); - if (stream.fail()) - throw runtime_error("couldn't connect to server"); -#endif - // HTTP basic authentication string strUserPass64 = EncodeBase64(mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"]); diff --git a/src/init.cpp b/src/init.cpp index eecbc83edb..05b4e87ceb 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -221,14 +221,12 @@ bool AppInit2(int argc, char* argv[]) " -checkblocks=<n> \t\t " + _("How many blocks to check at startup (default: 2500, 0 = all)") + "\n" + " -checklevel=<n> \t\t " + _("How thorough the block verification is (0-6, default: 1)") + "\n"; -#ifdef USE_SSL strUsage += string() + _("\nSSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n" + " -rpcssl \t " + _("Use OpenSSL (https) for JSON-RPC connections") + "\n" + " -rpcsslcertificatechainfile=<file.cert>\t " + _("Server certificate file (default: server.cert)") + "\n" + " -rpcsslprivatekeyfile=<file.pem> \t " + _("Server private key (default: server.pem)") + "\n" + " -rpcsslciphers=<ciphers> \t " + _("Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)") + "\n"; -#endif strUsage += string() + " -? \t\t " + _("This help message") + "\n"; diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw index 0bbe612a06..3f7e6114ec 100644 --- a/src/makefile.linux-mingw +++ b/src/makefile.linux-mingw @@ -26,7 +26,7 @@ LIBS= \ -l ssl \ -l crypto -DEFS=-D_MT -DWIN32 -D_WINDOWS -DNOPCH -DUSE_SSL -DBOOST_THREAD_USE_LIB +DEFS=-D_MT -DWIN32 -D_WINDOWS -DNOPCH -DBOOST_THREAD_USE_LIB DEBUGFLAGS=-g CFLAGS=-O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) diff --git a/src/makefile.mingw b/src/makefile.mingw index 307fca7834..33cc68b62b 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -23,7 +23,7 @@ LIBS= \ -l ssl \ -l crypto -DEFS=-DWIN32 -D_WINDOWS -DNOPCH -DUSE_SSL -DBOOST_THREAD_USE_LIB +DEFS=-DWIN32 -D_WINDOWS -DNOPCH -DBOOST_THREAD_USE_LIB DEBUGFLAGS=-g CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) diff --git a/src/makefile.osx b/src/makefile.osx index 6388a71e11..3104ac2995 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -49,7 +49,7 @@ LIBS += \ TESTDEFS += -DBOOST_TEST_DYN_LINK endif -DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DUSE_SSL +DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 DEBUGFLAGS=-g # ppc doesn't work because we don't support big-endian diff --git a/src/makefile.unix b/src/makefile.unix index 66e020bbef..1fb8e270fb 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -39,10 +39,6 @@ ifneq (${USE_UPNP}, -) DEFS += -DUSE_UPNP=$(USE_UPNP) endif -ifneq (${USE_SSL}, 0) - DEFS += -DUSE_SSL -endif - LIBS+= \ -Wl,-B$(LMODE2) \ -l z \ diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp index d59536e254..8180aadfb9 100644 --- a/src/rpcdump.cpp +++ b/src/rpcdump.cpp @@ -6,15 +6,8 @@ #include "init.h" // for pwalletMain #include "bitcoinrpc.h" -// #include <boost/asio.hpp> -// #include <boost/iostreams/concepts.hpp> -// #include <boost/iostreams/stream.hpp> #include <boost/lexical_cast.hpp> -// #ifdef USE_SSL -// #include <boost/asio/ssl.hpp> -// typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket> SSLStream; -// #endif -// #include <boost/xpressive/xpressive_dynamic.hpp> + #include "json/json_spirit_reader_template.h" #include "json/json_spirit_writer_template.h" #include "json/json_spirit_utils.h" |