Added options for CURVE security

- ZMQ_CURVE_PUBLICKEY for clients and servers
- ZMQ_CURVE_SECRETKEY for clients
- ZMQ_CURVE_SERVERKEY for clients
- ZMQ_CURVE_SERVER for servers
- added tools/curve_keygen.c as example
- updated man pages
This commit is contained in:
Pieter Hintjens
2013-06-20 18:09:12 +02:00
parent 65c84abdb5
commit d9bb16725e
10 changed files with 222 additions and 40 deletions

View File

@@ -40,8 +40,7 @@ zmq::curve_server_t::curve_server_t (session_base_t *session_,
cn_nonce (1)
{
// Fetch our secret key from socket options
zmq_assert (options_.secret_key_size == crypto_box_SECRETKEYBYTES);
memcpy (secret_key, options_.secret_key, crypto_box_SECRETKEYBYTES);
memcpy (secret_key, options_.curve_secret_key, crypto_box_SECRETKEYBYTES);
// Generate short-term key pair
const int rc = crypto_box_keypair (cn_public, cn_secret);