Dash Core  0.12.2.1
P2P Digital Currency
httprpc.cpp File Reference
#include "httprpc.h"
#include "base58.h"
#include "chainparams.h"
#include "httpserver.h"
#include "rpc/protocol.h"
#include "rpc/server.h"
#include "random.h"
#include "sync.h"
#include "util.h"
#include "utilstrencodings.h"
#include "ui_interface.h"
#include "crypto/hmac_sha256.h"
#include <stdio.h>
#include <boost/algorithm/string.hpp>
#include <boost/foreach.hpp>

Go to the source code of this file.

Classes

class  HTTPRPCTimer
 
class  HTTPRPCTimerInterface
 

Functions

static void JSONErrorReply (HTTPRequest *req, const UniValue &objError, const UniValue &id)
 
static bool multiUserAuthorized (std::string strUserPass)
 
static bool RPCAuthorized (const std::string &strAuth)
 
static bool HTTPReq_JSONRPC (HTTPRequest *req, const std::string &)
 
static bool InitRPCAuthentication ()
 
bool StartHTTPRPC ()
 
void InterruptHTTPRPC ()
 
void StopHTTPRPC ()
 

Variables

static const char * WWW_AUTH_HEADER_DATA = "Basic realm=\"jsonrpc\""
 
static std::string strRPCUserColonPass
 
static HTTPRPCTimerInterfacehttpRPCTimerInterface = 0
 

Function Documentation

◆ HTTPReq_JSONRPC()

static bool HTTPReq_JSONRPC ( HTTPRequest req,
const std::string &   
)
static

Definition at line 143 of file httprpc.cpp.

Referenced by StartHTTPRPC().

◆ InitRPCAuthentication()

static bool InitRPCAuthentication ( )
static

Definition at line 206 of file httprpc.cpp.

Referenced by StartHTTPRPC().

◆ InterruptHTTPRPC()

void InterruptHTTPRPC ( )

Interrupt HTTP RPC subsystem.

Definition at line 238 of file httprpc.cpp.

Referenced by Interrupt().

◆ JSONErrorReply()

static void JSONErrorReply ( HTTPRequest req,
const UniValue objError,
const UniValue id 
)
static

Definition at line 65 of file httprpc.cpp.

Referenced by HTTPReq_JSONRPC().

◆ multiUserAuthorized()

static bool multiUserAuthorized ( std::string  strUserPass)
static

Definition at line 84 of file httprpc.cpp.

Referenced by RPCAuthorized().

◆ RPCAuthorized()

static bool RPCAuthorized ( const std::string &  strAuth)
static

Definition at line 126 of file httprpc.cpp.

Referenced by HTTPReq_JSONRPC().

◆ StartHTTPRPC()

bool StartHTTPRPC ( )

Start HTTP RPC subsystem. Precondition; HTTP and RPC has been started.

Definition at line 224 of file httprpc.cpp.

Referenced by AppInitServers().

◆ StopHTTPRPC()

void StopHTTPRPC ( )

Stop HTTP RPC subsystem. Precondition; HTTP and RPC has been stopped.

Definition at line 243 of file httprpc.cpp.

Referenced by PrepareShutdown().

Variable Documentation

◆ httpRPCTimerInterface

HTTPRPCTimerInterface* httpRPCTimerInterface = 0
static

Definition at line 63 of file httprpc.cpp.

Referenced by StartHTTPRPC(), and StopHTTPRPC().

◆ strRPCUserColonPass

std::string strRPCUserColonPass
static

Definition at line 61 of file httprpc.cpp.

Referenced by CallRPC(), InitRPCAuthentication(), and RPCAuthorized().

◆ WWW_AUTH_HEADER_DATA

const char* WWW_AUTH_HEADER_DATA = "Basic realm=\"jsonrpc\""
static

WWW-Authenticate to present with 401 Unauthorized response

Definition at line 21 of file httprpc.cpp.

Referenced by HTTPReq_JSONRPC().