Commit Graph

1427 Commits

Author SHA1 Message Date
Pieter Hintjens
eaba5dfe37 Renamed test_router_raw_empty to test_stream_empty
* The ZMQ_ROUTER_RAW API was deprecated in favor of ZMQ_STREAM
* Same issue hit router.cpp, which I've fixed
2013-10-28 21:00:42 +01:00
MinRK
96ee8bb9d9 add missing msg->init for ROUTER_RAW with empty message 2013-10-27 22:50:04 -07:00
xantares
e273d94db8 include cmake files in tarball 2013-10-23 19:06:29 +02:00
Pieter Hintjens
406e6051e4 Cleaned up the code
- removed unnecessary malloc
- spaces, not tabs to indent
- renamed control states to be more logical
- renamed SUSPEND to PAUSE, feels more accurate
- fixed indentation, which was off in places
2013-10-21 10:51:59 +02:00
Pieter Hintjens
08c91c0f94 Merge pull request #712 from lalebarde/master
add proxy control flow and test
2013-10-21 01:39:09 -07:00
Richard Newton
1b8daed9db Use consistant integer type in raw_decoder 2013-10-18 14:20:30 +01:00
Laurent Alebarde
e33a382f8d new zmq_proxy is zmq_proxy_steerable to respect C API 2013-10-18 15:01:05 +02:00
Laurent Alebarde
1b75d1ecb5 add proxy control flow and test 2013-10-18 11:12:48 +02:00
Martin Hurton
7ecab54ac3 Load identity message to decoder at start 2013-10-11 14:32:38 +02:00
Martin Hurton
b35c08beb4 Rename engine's methods to improve code readability 2013-10-09 20:26:38 +02:00
Volodymyr Korniichuk
433ea35b6c Typo in type name "emTPy_slots_t"
https://zeromq.jira.com/browse/LIBZMQ-565
2013-10-08 00:40:30 +03:00
Pieter Hintjens
283e52357c Merge pull request #700 from hashstat/master
Add documentation on Linux ipc abstract namespace support and a bug fix.
2013-10-07 11:50:36 -07:00
Brandon Carpenter
e0f4d603c2 Fix detection of abstract ipc pathname and length calculation.
Abstract socket pathnames must have a NULL character in the first
position, but the second character must also be checked to differentiate
an abstract name from the empty string.  The address length must also
indicate the length of the pathname because the kernel uses the entire
address as the name, including NULL characters.  ZMQ uses
NULL-terminated strings for the address, so the abstract address length
is the length of the string following the initial NULL byte plus 3; two
bytes for the address family and one for the initial NULL character.
2013-10-07 10:42:39 -07:00
Pieter Hintjens
1a20220817 Merge pull request #699 from ezhikus/free_and_delete
It is safe to "free(NULL)" and "delete NULL"
2013-10-05 00:22:26 -07:00
Volodymyr Korniichuk
7a960ff29c useless checks were removed 2013-10-04 21:54:52 +03:00
Brandon Carpenter
31cdbd2afa Add abstract namespace support for IPC sockets on Linux.
Converts an initial strudel or "at sign" (@) in the Unix socket path to
a NULL character ('\0') indicating that the socket uses the abstract
namespace instead of the filesystem namespace.  For instance, binding a
socket to 'ipc://@/tmp/tester' will not create a file associated with
the socket whereas binding to 'ipc:///tmp/tester' will create the file
/tmp/tester.  See issue 567 for more information.
2013-10-04 11:33:52 -07:00
Martin Hurton
88882e31cd Stop curve handshake when cookie box verification fails 2013-10-04 08:21:43 +02:00
MinRK
4577956964 return NULL and set EINVAL on bad z85 input
asserts aren't appropriate for checking user input.
2013-09-29 13:07:51 -07:00
MinRK
d1a927a92e add zmq_curve_keypair to zmq_utils 2013-09-29 13:02:39 -07:00
Pieter Hintjens
e42a0a4074 Added test case for issue 566
* Tests dealer-to-router connection 100 times
* This was failing in ZMQ v4.0.0 RC1
2013-09-26 14:18:40 +02:00
Pieter Hintjens
9d51155ce2 Build/test errors on OS/X with clang++ 2013-09-26 11:33:44 +02:00
Martin Hurton
be25cfdf35 Call flush after writing the identity message 2013-09-26 09:40:23 +02:00
Pieter Hintjens
82149dde19 Updated libzmq CURVE to track RFC 27
* The INITIATE command vouch box is Box[C',S](C->S') instead of Box[C'](C->S),
  as recommended by https://codesinchaos.wordpress.com/2012/09/09/curvecp-1/,
  to reduce the risk of client impersonation.

* Mirrors the change in libcurve and CurveZMQ specifications.
2013-09-24 15:31:10 +02:00
Pieter Hintjens
0d3f9eb592 Missing file from Makefile.am 2013-09-20 16:40:40 +02:00
Pieter Hintjens
84a013e3de Fixed packaging for source distribution 2013-09-20 15:58:55 +02:00
Pieter Hintjens
5e609be345 Renamed new socket options to be clearer
* ZMQ_REQ_STRICT was negative option (default 1) which goes against
  the standard, where defaults are zero. I renamed this to
  ZMQ_REQ_RELAXED.

* ZMQ_REQ_REQUEST_IDS felt clumsy and describes the technical solution
  rather than the problem/requirement. I changed to ZMQ_REQ_CORRELATE
  which seems more explicit.
2013-09-20 15:30:04 +02:00
Pieter Hintjens
825052f83f Revert "makes curve keys symetric as in libcurve + factorisation"
This reverts commit bfd472f97c.
2013-09-17 14:05:55 +02:00
Pieter Hintjens
22eb4d600b Revert "oblige the application to explicitely set the node type for PLAIN"
This reverts commit 1206f4572b.
2013-09-17 14:05:41 +02:00
Laurent Alebarde
1206f4572b oblige the application to explicitely set the node type for PLAIN 2013-09-17 12:47:21 +02:00
Laurent Alebarde
bfd472f97c makes curve keys symetric as in libcurve + factorisation 2013-09-17 12:44:14 +02:00
Pieter Hintjens
321a8ffea9 NULL mechanism was not dealing with ZAP denials properly 2013-09-16 15:09: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
Richard Newton
b9298823b4 Set hwm on connect socket before bind has happend to just that of connects hwm. 2013-09-15 13:35:44 +01:00
Richard Newton
7841b0dd0f Support high water mark on inproc socket connect before bind. 2013-09-14 17:27:18 +01:00
Richard Newton
b9c09064d5 Fix whitespace 2013-09-12 21:22:47 +01:00
Richard Newton
d5bd68b60b Merge branch 'master' of https://github.com/zeromq/libzmq into inproc_connect_before_bind 2013-09-12 21:09:30 +01:00
Richard Newton
379bcb0881 Send identities when connecting pending sockets. 2013-09-12 21:07:29 +01:00
Richard Newton
7c3496a76a Fix race condition and support multiple socket connects before bind. 2013-09-12 18:09:37 +01: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
Richard Newton
5f20d63665 First attempt at inproc connect before bind 2013-09-12 14:44:44 +01:00
Richard Newton
ccf0e61b77 Merge remote-tracking branch 'upstream/master' 2013-09-10 13:30:11 +01:00
Richard Newton
64e1c181f7 Implement non-blocking shutdown command that unblocks other threads waiting on blocking operations. 2013-09-10 13:30:00 +01:00
Pieter Hintjens
6725c4644f Added ZMQ_ZAP_DOMAIN socket option
* This is passed to the ZAP handler in the 'domain' field

* If not set, or empty, then NULL security does not call the ZAP handler

* This resolves the phantom ZAP request syndrome seen with sockets where
  security was never intended (e.g. in test cases)

* This means if you install a ZAP handler, it will not get any requests
  for new connections until you take some explicit action, which can be
  setting a username/password for PLAIN, a key for CURVE, or the domain
  for NULL.
2013-09-09 20:40:34 +02:00
Pieter Hintjens
635a03d240 Was sending NULL mechanism name with extra null (fixed) 2013-09-09 19:58:18 +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
6fa274ebef Merge pull request #640 from mattconnolly/fork
Adding ability for a context to be terminated in a forked child process
2013-09-02 06:06:31 -07:00
Pieter Hintjens
282765cab4 Merge pull request #628 from ianbarber/master
Remove delay options
2013-09-02 06:04:51 -07:00