Skip to content

How to Use Certificates

Eric Voskuil edited this page May 9, 2015 · 7 revisions

CurveZMQ is used for client/server authentication. bx cert-new can be used to generate certificates.

Server certificate creation

On Linux/Mac OS X, issue the following commands:

$ mkdir -p /path/to/certificates
$ cd /path/to/certificates
$ bx cert-new server.private
$ bx cert-public server.private server.public

To use it, edit the configuration file (default is /usr/local/etc/libbitcoin/bs.cfg):

[identity]
# The path to the ZPL-encoded server private certificate file.
cert_file = /path/to/certificates/server.private

Publish server.public.

Limiting access

If you wish to allow authorised clients only, create a directory to store their public certificates:

$ mkdir -p /path/to/certificates/clients

Then enable them in the configuration file:

[identity]
# The directory for ZPL-encoded client public certificate files, allows anonymous clients if not set.
client_certs_path = /path/to/certificates/clients