- 07 Aug, 2017 3 commits
-
-
Simon Giesecke authored
Solution: add sleep
-
Constantin Rack authored
Problem: getrandom usage breaks build
-
Luca Boccassi authored
Solution: add missing flags parameter
-
- 06 Aug, 2017 1 commit
-
-
Constantin Rack authored
Problems: use-before-initialise error in print_backtrace, test_security_curve sometimes fails due to unexpected ECONNRESET
-
- 05 Aug, 2017 2 commits
-
-
Luca Boccassi authored
Solution: ignore ECONNRESET as with EPIPE - it can happen on very slow machines when the engine sends data to the peer and then tries to read from the TCP socket before the peer has read
-
Luca Boccassi authored
Solution: fix them
-
- 04 Aug, 2017 18 commits
-
-
Constantin Rack authored
Problems: timeout in curve test, redundant windows and android CI jobs
-
Luca Boccassi authored
Problem: zmq::curve_server_t::produce_error sends sizeof std::string instead of status code length
-
Luca Boccassi authored
Solution: remove it, and test it only on Linux, as the toolchain and build process is the same.
-
Luca Boccassi authored
Solution: bump timeout from 20 to 60 seconds
-
Luca Boccassi authored
Solution: remove it. No need to do an additional sodium on - curve off test, as sodium will be disabled anyway
-
Luca Boccassi authored
Problem: open TODOs in test code, CI failures
-
Simon Giesecke authored
Solution: send status code length (always 3) instead
-
Simon Giesecke authored
Solution: add workaround at another place, unify two code fragments to remove duplication
-
Simon Giesecke authored
Solution: removed code duplication improved global variable naming added assertions on number of ZAP requests handled added assertion on monitor event to test_curve_security_with_plain_client_credentials
-
Jim Klimov authored
Problems: too many OSX travis builds, curve test uses hard-coded TCP port
-
Luca Boccassi authored
Problem: new ZMQ_MSG_PROPERTY_* defines were not mentioned in the documentation
-
Luca Boccassi authored
Problem: sporadic failure in test_curve_security_with_null_client_credentials
-
Simon Giesecke authored
Solution: add documentation
-
Luca Boccassi authored
Problem: Message property names are duplicated
-
Simon Giesecke authored
* Problem: no tests for ZAP protocol errors Solution: added first test for a bogus version number in ZAP reply * Problem: no tests for ZAP protocol errors Solution: added more test cases * Problem: cannot compile without ZMQ_BUILD_DRAFT_API Solution: conditionally compile parts that depend on draft API * Problem: test_security_curve times out in CI Solution: Increase timeout for this test to 20 seconds
-
Simon Giesecke authored
Solution: add workaround for EPIPE error
-
Simon Giesecke authored
Solution: Remove from documentation
-
Simon Giesecke authored
Solution: Define them in zmq.h and use them (currently in DRAFT API)
-
- 03 Aug, 2017 6 commits
-
-
Luca Boccassi authored
Solution: avoid running brew update and brew install binutils unless it's for the android cross-compilation, where it's necessary for greadelf.
-
Luca Boccassi authored
Solution: remove the non-draft test run, as OSX is very slow and overcrowded on Travis
-
Luca Boccassi authored
Solution: remove it, as it takes time and it's enough to test once
-
Luca Boccassi authored
Solution: use the wildcard endpoint instead
-
Simon Giesecke authored
Solution: Use EPROTO instead of EACCES error code in that case
-
Simon Giesecke authored
* Fixing #2002 one way of doing it * Mechanisms can implement a new method `error_detail()` * This error detail have three values for the moment: no_detail (default), protocol, encryption. + generic enough to make sense for all mechanisms. - low granularity level on information. * Fixing #2002: implementation of the error details The ZMQ_EVENT_HANDSHAKE_FAILED event carries the error details as value. * Removed Microsoft extenstion for enum member access This was leading to compilation error under linux. * Adaptation of CURVE test cases * Monitoring event: changed API for detailed events Removed ZMQ_EVENT_HANDSHAKE_FAILED and replaced it by: - ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL, - ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL, - ZMQ_EVENT_HANDSHAKE_FAILED_ENCRYPTION Adaptation of text case `security_curve` * Removed event value comparison This was introduced for the previous API model adaptation * Removed the prints in std output and added missing details `current_error_detail` was not set in every protocol error cases * Fixed initialization of current_error_detail * Fixed error in greeting test case The handshake failure due to mechanism mismatch in greeting is actually a protocol error. The error handling method consider it like so and send a protocol handshake failure monitoring event instead of no_detail. Fixed the test_security_curve expectation as well. * Upgraded tests of monitoring events The tests check the number of monitoring events received * Problem: does not build under Linux or without ZMQ_DRAFT_API Solution: - properly use ZMQ_DRAFT_API conditional compilation - use receive timeouts instead of Sleep * Problem: duplicate definition of variable 'timeout' Solution: merged definitions * Problem: inconsistent timing dependencies Solution: reduce timing dependency by using timeouts at more places * Problem: assertion failure under Linux due to unexpected monitor event Solution: output event type to aid debugging * Problem: erroneous assertion code * Problem: assertion failure with a garbage server key due to an extra third event Solution: changed assertion to expect three events (needs to be checked) * Problem: extra include directive to non-existent file Solution: removed include directive * Problem: assertion failure on appveyor for unknown reason Solution: improve debug output * Problem: no build with libsodium and draft api Solution: add build configurations with libsodium and draft api * Problem: assertion failure on CI Solution: change assertion to reflect actual behaviour on CI (at least temporarily) * Problem: error in condition in assertion code * Problem: assertion failure on CI Solution: generalize assertion to match behavior on CI * Problem: assertion failures on CI Solution: removed inconsistent assertion on no monitor events before flushing improved debuggability by converting function into macro * Problem: diverging test code for three analogous test cases with garbage key Solution: extract common code into function * Problem: does not build without ZMQ_BUILD_DRAFT_API Solution: introduce dummy variable * Attempt to remove workaround regarding ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL again * Problem: EAGAIN error after handshake complete if there is no more data in inbuffer Solution: Skip tcp_read attempt in that case * Problem: handshaking event emitted after handshaking failed Solution: use stream_engine_t::handshaking instead of mechanism_t::status() to determine whether still handshaking * Include error code in debug output * Improve debugging output: output flushed events * Split up ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL into ZMQ_EVENT_HANDSHAKE_FAILED_ZMTP and ZMQ_EVENT_HANDSHAKE_FAILED_ZAP * Fixed compilation without ZMQ_BUILD_DRAFT_API * Renamed ZMQ_EVENT_HANDSHAKE_SUCCEED to ZMQ_EVENT_HANDSHAKE_SUCCEEDED for language consistency * Renamed ZMQ_EVENT_HANDSHAKE_SUCCEED to ZMQ_EVENT_HANDSHAKE_SUCCEEDED for language consistency * Renamed ZMQ_EVENT_HANDSHAKE_SUCCEED to ZMQ_EVENT_HANDSHAKE_SUCCEEDED for language consistency * Fixed assert_monitor_event (require event instead of allowing no event) Reverted erroneous change to handshaking condition Renamed test_wrong_key to test_garbage_key Generalized assumption in test_garbage_key to allow for ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL with error == EPIPE * Better isolate test cases from each other by providing a fresh context & server for each * Added diagnostic output * Changed assertion to reflect actual behavior on CI * Fixed formatting, observe maximum line length * Fixed formatting, observe maximum line length * Increase timeout to check if this fixes valgrind run * Close server with close_zero_linger * Increase timeout to check if this fixes valgrind run * Increase timeout to check if this fixes valgrind run * Generalize assertion to also work with valgrind * Fixed formatting * Add more diagnostic output * Generalize assertion to also work with valgrind
-
- 01 Aug, 2017 1 commit
-
-
Jim Klimov authored
Problems: using Wine requires system tuning, ZMQ_BINDTODEVICE not draft
-
- 31 Jul, 2017 5 commits
-
-
Luca Boccassi authored
Solution: apply the option outside of the send/recv_enabled blocks so that it is used for all types of UDP sockets
-
Luca Boccassi authored
Solution: move definition in the DRAFT section of the header
-
Luca Boccassi authored
Solution: document it in the INSTALL file Fixes #2638
-
Luca Boccassi authored
Add socket option BINDTODEVICE
-
Brian Russell authored
Linux now supports Virtual Routing and Forwarding (VRF) as per: https://www.kernel.org/doc/Documentation/networking/vrf.txt In order for an application to bind or connect to a socket with an address in a VRF, they need to first bind the socket to the VRF device: setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, dev, strlen(dev)+1); Note "dev" is the VRF device, eg. VRF "blue", rather than an interface enslaved to the VRF. Add a new socket option, ZMQ_BINDTODEVICE, to bind a socket to a device. In general, if a socket is bound to a device, eg. an interface, only packets received from that particular device are processed by the socket. If device is a VRF device, then subsequent binds/connects to that socket use addresses in the VRF routing table.
-
- 28 Jul, 2017 4 commits
-
-
Constantin Rack authored
Problem: tweetnacl on *nix use of /dev/urandom is not thread safe
-
Luca Boccassi authored
Solution: if available use the getrandom function as it doesn't require any synchronization, state or cleanup
-
Luca Boccassi authored
Solution: open with O_CLOEXEC if available or set FD_CLOEXEC if not
-
Luca Boccassi authored
Solution: add a crypto [de-]initialiser, refcounted and serialised through critical sections. This is necessary as utility APIs such as zmq_curve_keypair also call into the sodium/tweetnacl libraries and need the initialisation outside of the zmq context. Also the libsodium documentation explicitly says that sodium_init must not be called concurrently from multiple threads, which could have happened until now. Also the randombytes_close function does not appear to be thread safe either. This change guarantees that the library is initialised only once at any given time across the whole program. Fixes #2632
-