Commit Graph

64 Commits

Author SHA1 Message Date
Richard Newton
7485b09cba Fix tests on windows 2013-09-06 10:08:11 +01:00
Pieter Hintjens
9dd324aab2 z85 encoding buffer overrun 2013-09-05 15:18:42 +02:00
Pieter Hintjens
28b0a5fa27 Updated libzmq to match RFC 23, 24, 25, 26
* Command names changed from null terminated to length-specified
* Command frames use the correct flag (bit 2)
* test_stream acts as test case for command frames
* Some code cleanups
2013-09-04 17:59:45 +02:00
Pieter Hintjens
fb67e160a1 Fixed ZAP authentication
- if ZAP server returns anything except 200, connection is closed
- all security tests now pass correctly
- test_security_curve now does proper client key authentication using test key
- test_security_plain now does proper password authentication
2013-09-02 18:21:36 +02:00
Pieter Hintjens
fba5612026 Fixed 'make check' failures
- Split off NULL security check from PLAIN
- Cleaned up test_linger code a little
- Got all tests to pass, added TODOs for outstanding issues
- Added ZAP authentication for NULL test case
- NULL mechanism was not passing server identity - fixed
- cleaned up test_security_plain and removed option double-checks (made code ugly)
- lowered timeout on expect_bounce_fail to 150 msec to speed up checks
- removed all sleeps from test_fork and simplified code (it still passes :-)
2013-09-02 17:22:24 +02:00
Pieter Hintjens
01b336f1f1 Whitespace fixes 2013-09-02 15:08:40 +02:00
MinRK
9d94640edc test failed CURVE auth
adds expect_bounce_fail test function

which is like bounce, but fails if messages arrive.
2013-08-30 17:56:59 -07:00
Jeremy Rossi
19ca8a0fc0 Add the Socket Identity info to the ZAP Messages
This change adds the socket identity infomartion from the socket to the
zap frames.  In doing this the ZAP is able preform different operations
based on different sockets.  This is not compaitable with the current ZAP
RFC, but that can be updated.  As the ZAP rfc is currently draft for I
did not change the version number.

Tests also modified and passing.
2013-08-20 13:48:05 -04:00
Richard Newton
a83baa9b0b Fix up threading code from port tests to windows. 2013-08-17 14:23:22 +01:00
Richard Newton
7f74fc7c99 Port tests to windows and add to cmake build. 2013-08-17 13:43:45 +01:00
Martin Hurton
d65231be1c Update CURVE mechanism to the latest ZAP revision 2013-07-18 10:59:31 +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
7832addd20 Updated security mechanisms to use variable-length commands
RFC23, RFC24, RFC26 now use variable-length command names that
end in null octet (valid C strings) instead of fixed-length
space padded strings.
2013-06-28 11:42:54 +02:00
Ian Barber
211bf2b08e Added security curve test
Test is skipped if no libsodium.
Added warning if libsodium not configured
2013-06-22 16:17:25 +01:00