0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-31 01:43:02 +08:00

17 Commits

Author SHA1 Message Date
Pieter Hintjens
b3b9e046ee Updated copyright statements for 2014 2014-01-02 12:00:57 +01:00
Gergely Nagy
b50ed02a20 tools/: Link curve_keygen with a c++ linker
When trying to linking curve_keygen as if it was a C program, linking
fails (at least with gcc 4.8 on Debian testing) because it can't find
C++ symbols. Linking with g++ instead fixes the issue.

To achieve this, the source is renamed to curve_keygen.cpp, and
tools/Makefile.am is updated accordingly.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
2013-12-12 11:44:12 +01:00
xantares
b2d52a3730 Fixed out-of-source build 2013-10-10 22:08:54 +02:00
MinRK
87254abc9f use zmq_curve_keypair in curve_keygen 2013-09-29 13:05:27 -07:00
MinRK
cf4bfd48cf include missing platform.hpp in curve_keygen
it was excluded, so HAVE_SODIUM would never be defined,
leading to curve_keygen always reporting "recompile with libsodium"
2013-09-28 15:42:52 -07:00
Pieter Hintjens
26d5ac4075 curve_keygen needed assert.h 2013-09-26 11:35:52 +02:00
Pieter Hintjens
84a013e3de Fixed packaging for source distribution 2013-09-20 15:58:55 +02:00
Pieter Hintjens
576e3ca5e0 Added z85 codec to ZMQ API
* Removed redundant Z85 code and include files from project
* Simplified use of headers in test cases (now they all just use testutil.hpp)
* Export zmq_z85_encode() and zmq_z85_decode() in API
* Added man pages for these two functions
2013-09-15 20:13:44 +02:00
Pieter Hintjens
193d0bb634 Fixed Z85 methods to be static and not pollute library 2013-09-15 17:30:18 +02:00
Pieter Hintjens
65ef76bb59 Minor simplification to makefile 2013-09-15 15:45:40 +02:00
Pieter Hintjens
0db2bbe29d Build didn't work if libsodium wasn't installed 2013-09-13 09:47:23 +02:00
Pieter Hintjens
345bf146f1 Fixed overwrite in zmq_getsockopt
On ZMQ_CURVE_xxxKEY fetches, would return 41 bytes into caller's 40-byte
buffer. Now these fetches only return 41 bytes if the caller explicitly
provides a 41-byte buffer (i.e. the option size is 41).
2013-09-12 18:03:23 +02:00
Pieter Hintjens
6ff65a8aa4 Builds and installs curve_keygen tool 2013-09-12 13:16:22 +02:00
Pieter Hintjens
c45d91a106 Fixed comments on curve_keygen tool 2013-09-09 19:58:31 +02:00
Pieter Hintjens
9dd324aab2 z85 encoding buffer overrun 2013-09-05 15:18:42 +02:00
Pieter Hintjens
7041770108 Added Z85 support
The use of binary for CURVE keys is painful; you cannot easily copy
these in e.g. email, or use them directly in source code. There are
various encoding possibilities. Base16 and Base64 are not optimal.
Ascii85 is not safe for source (it generates quotes and escapes).

So, I've designed a new Base85 encoding, Z85, which is safe to use
in code and elsewhere, and I've modified libzmq to use this where
it also uses binary keys (in get/setsockopt).

Very simply, if you use a 32-byte value, it's Base256 (binary),
and if you use a 40-byte value, it's Base85 (Z85).

I've put the Z85 codec into z85_codec.hpp, it's not elegant C++
but it is minimal and it works. Feel free to rewrap as a real class
if this annoys you.
2013-06-28 22:10:22 +02:00
Pieter Hintjens
d9bb16725e 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
2013-06-20 18:09:12 +02:00