Changeset View
Changeset View
Standalone View
Standalone View
src/httprpc.cpp
// Copyright (c) 2015-2016 The Bitcoin Core developers | // Copyright (c) 2015-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include <httprpc.h> | #include <httprpc.h> | ||||
#include <chainparams.h> | #include <chainparams.h> | ||||
#include <config.h> | #include <config.h> | ||||
#include <crypto/hmac_sha256.h> | #include <crypto/hmac_sha256.h> | ||||
#include <node/ui_interface.h> | |||||
#include <rpc/protocol.h> | #include <rpc/protocol.h> | ||||
#include <util/ref.h> | #include <util/ref.h> | ||||
#include <util/strencodings.h> | #include <util/strencodings.h> | ||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <util/translation.h> | #include <util/translation.h> | ||||
#include <walletinitinterface.h> | #include <walletinitinterface.h> | ||||
#include <boost/algorithm/string.hpp> // boost::trim | #include <boost/algorithm/string.hpp> // boost::trim | ||||
▲ Show 20 Lines • Show All 379 Lines • ▼ Show 20 Lines | bool HTTPRPCRequestProcessor::ProcessHTTPRequest(HTTPRequest *req) { | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
static bool InitRPCAuthentication() { | static bool InitRPCAuthentication() { | ||||
if (gArgs.GetArg("-rpcpassword", "") == "") { | if (gArgs.GetArg("-rpcpassword", "") == "") { | ||||
LogPrintf("Using random cookie authentication.\n"); | LogPrintf("Using random cookie authentication.\n"); | ||||
if (!GenerateAuthCookie(&strRPCUserColonPass)) { | if (!GenerateAuthCookie(&strRPCUserColonPass)) { | ||||
// Same message as AbortNode. | |||||
uiInterface.ThreadSafeMessageBox( | |||||
_("Error: A fatal internal error occurred, see debug.log for " | |||||
"details"), | |||||
"", CClientUIInterface::MSG_ERROR); | |||||
return false; | return false; | ||||
} | } | ||||
} else { | } else { | ||||
LogPrintf("Config options rpcuser and rpcpassword will soon be " | LogPrintf("Config options rpcuser and rpcpassword will soon be " | ||||
"deprecated. Locally-run instances may remove rpcuser to use " | "deprecated. Locally-run instances may remove rpcuser to use " | ||||
"cookie-based auth, or may be replaced with rpcauth. Please " | "cookie-based auth, or may be replaced with rpcauth. Please " | ||||
"see share/rpcauth for rpcauth auth generation.\n"); | "see share/rpcauth for rpcauth auth generation.\n"); | ||||
strRPCUserColonPass = gArgs.GetArg("-rpcuser", "") + ":" + | strRPCUserColonPass = gArgs.GetArg("-rpcuser", "") + ":" + | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |