[zeromq-dev] libcurve : adding a path to curvezmq_keypair_save & load

Laurent Alebarde l.alebarde at free.fr
Tue Sep 3 17:48:42 CEST 2013


Hi,

I am testing a solution for full authentication. So I need the test 
frame in curvezmq_selftest.c to manage two pairs of keys. That has 
leaded me to add a path parameter to curvezmq_keypair_save & 
curvezmq_keypair_load.

The change in the existing test is :

BEFORE :
curvezmq_codec_set_keypair (server, curvezmq_keypair_load ());
int rc = curvezmq_keypair_save (keypair);

AFTER :
curvezmq_codec_set_keypair (server, curvezmq_keypair_load (""));
int rc = curvezmq_keypair_save (keypair, "");

Testing with a path "xxx/", it leads to (list of all changed or added 
lines) :
curvezmq_codec_set_keypair (server, curvezmq_keypair_load ("xxx/"));
int rc = curvezmq_keypair_save (keypair, "xxx/");
assert (zfile_exists ("xxx/secret.key"));
zfile_delete ("xxx/public.key");
zfile_delete ("xxx/secret.key");
zfile_rmdir ("xxx");

If it may be of interrest, I can pull request it.

Cheers,


Laurent.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130903/7e5322e3/attachment.htm>


More information about the zeromq-dev mailing list