JSON-RPC is a lightweight remote procedure call protocol. It's designed to be simple!
The general mechanism consists of two peers establishing a data connection. During the lifetime of a connection, peers may invoke methods provided by the other peer. To invoke a remote method, a request is sent. Unless the request is a notification it must be replied to with a response. From JSON RPC Spec.
Bitcoin started accepting SSL JSON-RPC connections beginning with version 0.3.14 in order to remotely invoke bitcoin protocol functions. (from Bitcoin wiki)
When using a JSON-RPC client to communicate with bitcoind running a JSON-RPC server, security is very important in order to protect against man in the middle (MITM) attacks.
In order to securely use JSON-RPC with bitcoind you'll need the following items installed
First you will need to generate a valid certificate using OpenSSL. If you already have a certificate from a certificate authority, you can simply import it. To create a certificate, do the following on your server:
cd ~/.bitcoin openssl genrsa -out server.pem 2048 openssl req -new -x509 -nodes -sha1 -days 3650 -key server.pem > server.cert
Lets now break these commands down to understand what we are doing.
The next step is to configure bitcoind. To do this, do the following commands: