- 16 Jul, 2019 2 commits
-
-
Luca Boccassi authored
Solution: move the definition of __STDC_LIMIT_MACROS somewhere the test actually uses
-
Simon Giesecke authored
Solution: properly set defines from test_security_curve
-
- 21 May, 2019 1 commit
-
-
Romain Moret authored
-
- 20 Mar, 2019 2 commits
-
-
Simon Giesecke authored
Solution: use standard TEST_ASSERT_SUCCESS_ERRNO macro instead
-
Simon Giesecke authored
Solution: migrate to unity and adapt users
-
- 12 Feb, 2019 1 commit
-
-
Simon Giesecke authored
Problem: test_security_curve build fails with Windows targeting 8 or newer due to duplicate definition of htonll Solution: use custom implementation only on older Windows versions
-
- 18 Nov, 2018 1 commit
-
-
Luca Boccassi authored
Solution: do it
-
- 27 May, 2018 1 commit
-
-
Simon Giesecke authored
Solution: apply naming style
-
- 14 May, 2018 1 commit
-
-
Simon Giesecke authored
Solution: Use fd_t
-
- 11 Feb, 2018 2 commits
-
-
Simon Giesecke authored
Solution: use _snprintf when snprintf is not available
-
sigiesec authored
Solution: use unity in test_security_curve
-
- 02 Feb, 2018 1 commit
-
-
sigiesec authored
Solution: applied clang-format
-
- 19 Sep, 2017 3 commits
-
-
sigiesec authored
Solution: use "routing_id" instead
-
sigiesec authored
Solution: renamed routing_id fields in pipe_t, renamed ZMQ_CONNECT_RID to ZMQ_CONNECT_ROUTING_ID
-
sigiesec authored
receive an ERROR (probably because the connection is closed before) Solution: wait for client-side monitor events before closing the client socket Fixes #2705
-
- 07 Sep, 2017 2 commits
-
-
Doron Somech authored
-
sigiesec authored
Solution: renamed routing_id fields in pipe_t, renamed ZMQ_CONNECT_RID to ZMQ_CONNECT_ROUTING_ID
-
- 20 Aug, 2017 2 commits
-
-
Simon Giesecke authored
Problem: test_zap_unsuccessful_status_500 and test_curve_security_with_bogus_client_credentials sometimes fail, particulary on slow/valgrind runs Solutio: relax test assertion
-
sigiesec authored
Problem: no tests for client-side events for successful handshake and authentication failure in handshake Solution: added tests for CURVE, add emitting of client-side event in curve_client_t; add ZAP code 300/500 tests for all mechanisms; suppress sending an error message for ZAP code 300
-
- 19 Aug, 2017 1 commit
-
-
Luca Boccassi authored
Solution: use LIBZMQ_UNUSED where necessary
-
- 18 Aug, 2017 2 commits
- 17 Aug, 2017 2 commits
- 15 Aug, 2017 2 commits
-
-
Simon Giesecke authored
* Problem: no test case with CURVE encryption and large identity Solution: added test case (currently crashing) * Problem: possible buffer overflow in mechanism_t::add_property Solution: add target buffer length parameter and check the buffer is sufficiently large * Problem: test cases accidentally excluded from build Solution: remove #if/#endif * Problem: possible buffer overruns related to metadata at various locations Solution: allocate buffer large enough for actual metadata, reduce code duplication * Problem: syntax error related to pointer type conversion Solution: change argument type of make_command_with_basic_properties to const char * * Problem: large metadata may cause an assertion in produce_initiate Solution: Allow metadata of arbitrary size in produce_initiate
-
Simon Giesecke authored
* Extracted connect_vanilla_socket function * Problem: no tests for ZMTP-CURVE protocol errors Solution: added two test cases with erroneous HELLO commands * Problem: insufficient tests for ZMTP-CURVE protocol errors Solution: added two test cases with erroneous HELLO command version * Problem: test HELLO message is invalid apart from deliberate errors Solution: create cryptographically correct HELLO message add tweetnacl.c to test_security_curve * Problem: nonce is incorrect, build fails with GCC Solution: use correct non prefix * Problem: make builds are failing Solution: transfer CMake changes to (auto)make files * Problem: nonce is incorrect, build fails with GCC Solution: use correct non prefix * Problem: make builds are failing Solution: transfer CMake changes to (auto)make files * Problem: no test with INITIATE command with invalid length Solution: added test case * Problem: code duplication between test_security_curve.cpp and curve_client.cpp Solution: extracted parts of zmq::curve_client_t::produce_hello into reusable function * Problem: code duplication between test_security_curve.cpp and curve_client.cpp Solution: extracted further parts of zmq::curve_client_t into reusable functions added missing file * Problem: mechanism_t::add_property can be declared static Solution: declare mechanism_t::add_property static * Problem: intermediate crypto data needs to be passed between static function calls to curve_client_tools_t Solution: add non-static member functions * Problem: msg_t instance may be closed twice Solution: remove offending close * Problem: prepare_hello uses static curve_client_tools_t::produce_hello Solution: Use non-static curve_client_tools_t::produce_hello * Problem: no test with invalid command name where INITIATE command is expected Solution: added test case * Problem: make builds are failing due to curve_client_tools.hpp not being found Solution: add curve_client_tools.hpp to list of source files * Problem: wrong initializer order in zmq::curve_client_t Solution: reorder * Problem: under non-Windows systems, test fails because random_open was not called Solution: call random_open/random_close within test * Problem: conflict between custom function htonll and macro definition on Darwin Solution: define htonll function only if not defined as a macro * Problem: nullptr not defined on all platforms Solution: replace nullptr by NULL * Problem: libsodium builds not working Solution: adapt compile and link file sets for libsodium builds * Problem: Makefile.am broken Solution: Fix syntax * Problem: no tests for garbage encrypted cookie or content in INITIATE Solution: added test cases * Problem: test cases accidentally excluded from build Solution: remove #if/#endif * Solution: some error cases are unreachable Problem: for the time being, added some comments without changing the code * Added comments on hard-to-test cases
-
- 08 Aug, 2017 1 commit
-
-
Simon Giesecke authored
* Problem: missing test for status code 300, inadequate assertion for status code 500 Solution: add test, change assertion (currently test fails) * Problem: gcc compiler error deprecated conversion from string constant Solution: declare variable as const * Problem: in case of ZAP handler returning a status code other than 200, no appropriate event is emitted Solution: immediately emit event after receiving reply from ZAP handler * Problem: endpoint address is not included in zap-reply monitor event Solution: added functions to retrieve endpoint address in zmq::i_engine and zmq::session_base_t removed unused code block in zmq::stream_engine_t::next_handshake_command * Problem: wrong formatting Solution: fix formatting * Problem: test fails because of EPIPE Solution: add EPIPE/ECONNRESET/ECONNAGAIN handling for more test cases
-
- 07 Aug, 2017 4 commits
-
-
Simon Giesecke authored
* Problem: CI failure on Appveyor with err==ECONNRESET Solution: ignore ECONNRESET analogous to EPIPE * Problem: blocking test execution Solution: added more debug output, do not wait for monitor infinitely without output
-
Simon Giesecke authored
Solution: do not assert on ZAP protocol error when connection was closed by client
-
Luca Boccassi authored
Solution: expect that error, which can happen on very slow machines due to a client timimng out or RST before the connection is accepted by the server
-
Luca Boccassi authored
Solution: refactor the ZAP thread to avoid creating the socket in the main thread and using it in the ZAP thread, and also to eliminate races at shutdown use another inproc control socket to signal termination to the thread
-
- 05 Aug, 2017 1 commit
-
-
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
-
- 04 Aug, 2017 4 commits
-
-
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
-
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
-
- 03 Aug, 2017 2 commits
-
-
Luca Boccassi authored
Solution: use the wildcard endpoint instead
-
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 May, 2017 1 commit
-
-
Luca Boccassi authored
Solution: use ZMQ_LAST_ENDPOINT in most places. This alllows running tests in paralle, and on over-booked shared machines where many of the ports would be already in use. Keep 3 tests with an hardcoded port, as there are some code paths that require it (eg: connect before bind), but list those ports in tests/testutil.hpp as macros so that they do not overlap and still allow parallel runs. These changes were inspired by a patch uploaded to Ubuntu by the package maintainer, Steve Langasek <steve.langasek@ubuntu.com>. Thank you Steve!
-
- 31 Dec, 2016 1 commit
-
-
Luca Boccassi authored
Solution: check that the expected handshake success or failure events are triggered in the curve security unit test
-