Commit Graph

32 Commits

Author SHA1 Message Date
Luca Boccassi
da31917f4f Relicense from LGPL3 + exceptions to Mozilla Public License version 2.0
Relicense permission collected from all relevant authors as tallied at:
https://github.com/rlenferink/libzmq-relicense/blob/master/checklist.md
The relicense grants are collected under RELICENSE/ and will be moved
to the above repository in a later commit.

Fixes https://github.com/zeromq/libzmq/issues/2376
2023-06-05 20:31:47 +01:00
Luca Boccassi
0f706bdd97 Problem: formatting errors
Solution: run make clang-format-diff
2021-09-22 16:40:17 +01:00
Simon Giesecke
de622c8198 Problem: functions are unnecessarily declared in header
Solution: remove from header and declare as static
2019-03-23 14:09:06 -04:00
Simon Giesecke
347708bcf2 Problem: test utilities are in headers and recompiled for every test
Solution: move test utilities to separate testutil library
2019-03-23 09:09:24 -04:00
Simon Giesecke
0266d4ac27 Problem: testutil_monitoring not using unity
Solution: migrate to unity and adapt users
2019-03-20 17:03:26 +01:00
Simon Giesecke
efaca82bff Problem: testutil_security not using unity
Solution: migrate to unity and adapt users
2019-03-20 16:49:46 +01:00
Simon Giesecke
30e0cbbcdc Problem: test_monitor depends on testutil_security
Solution: move general monitoring test utilities to new testutil_monitoring
2019-02-02 15:33:27 +01:00
Luca Boccassi
4147957a5e Problem: test_security_zap fails on architectures that disallow unaligned pointer access
Solution: use memcpy instead of doing pointer arithmetics with casting
and dereferencing to fix the error on sparc64
2019-01-13 13:10:05 +00:00
Luca Boccassi
c347aef794 Problem: new DRAFT monitoring events are eligible for STABLE
Solution: do it
2018-11-18 13:23:38 +00:00
Simon Giesecke
779d120fa3 Problem: tests do not follow naming style
Solution: apply naming style
2018-05-27 13:24:08 +02:00
Simon Giesecke
28631d1cd3 Problem: C4550 warning in testutil_security
Solution: explicitly compare function pointer against NULL
2018-05-14 19:18:43 +02:00
Luca Boccassi
e4b3bd8631 Problem: cannot set ZAP_ENFORCE_DOMAIN in testutil's wrappers
Solution: override unused parameter for NULL wrapper
2018-03-22 19:25:42 +00:00
sigiesec
41f459e1dc Problem: formatting inconsistent
Solution: applied clang-format
2018-02-02 15:47:43 +01:00
Luca Boccassi
de8f14adf5 Problem: test_security_{zap|curve} often hangs
Solution: set 0 linger on the sockets immediately after creating them
rather than immediately before closing them.
Running through helgrind/drd highlights a few race conditions, one of
which is the setting of linger vs checking it when closing the socket.
Work around it by setting it immediately to fix the test hangs.
2017-11-16 00:44:29 +00:00
Luca Boccassi
b6aee51691 Problem: strict ZAP protocol adherence is backward incompatible
Solution: add ZMQ_ZAP_ENFORCE_DOMAIN to hide backward incompatible
change and make it disabled by default.
In a future release that breaks API compatibility we can then switch
the default to enabled in order to achieve full RFC compatibility.

Fixes #2762
2017-10-09 17:48:33 +01:00
sigiesec
1414bf938c Problem: use of unqualified "id" in code example
Solution: use "routing_id" instead
2017-09-19 17:54:52 +02:00
sigiesec
9e7507b38b Problem: term "identity" is confusing
Solution: replace by "routing id"
2017-09-19 17:53:44 +02:00
sigiesec
e0243dcbca Problem: tests where client should receive an ERROR sometimes do not
receive an ERROR (probably because the connection is closed before)

Solution: wait for client-side monitor events before closing the client
socket

Fixes #2705
2017-09-19 11:16:05 +02:00
sigiesec
77f76a49b2 Problem: no tests for cases 5 and 6 of #2711
Solution: added tests
2017-09-18 18:43:32 +02:00
sigiesec
ee8b8bd29c Problem: no test for ZAP handler terminating in flight
Solution: added test & some improvements of test utils
2017-09-18 16:54:03 +02:00
sigiesec
a5f94cb610 Problem: tests without ZAP handler are failing
Solution: emit events as expected by tests, and refuse connections when
ZAP is required but no handler started

Addresses #2711 partially
2017-09-18 12:58:09 +02:00
sigiesec
13b972b226 Problem: no tests without ZAP handler where one is expected
Solution: added test case for NULL/PLAIN/CURVE
2017-09-18 10:26:28 +02:00
Doron Somech
af03241dcb Revert "Problem: term "identity" is confusing" 2017-09-07 15:47:43 +03:00
sigiesec
1daf83079a Problem: term "identity" is confusing
Solution: replace by "routing id"
2017-09-06 17:45:56 +02:00
Simon Giesecke
82227136ea Problem: test_monitor sometimes fails due to a wrong event received, but not known which
Solution: add diagnostic output
2017-08-21 12:20:36 +02:00
Simon Giesecke
74203729bd 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
2017-08-20 22:47:15 +02:00
sigiesec
bd0675b93f 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
2017-08-20 22:45:14 +02:00
Luca Boccassi
90b6c102bb Problem: various unused variables warnings
Solution: use LIBZMQ_UNUSED where necessary
2017-08-19 12:18:51 +01:00
sigiesec
e2d3ba9c62 Problem: classification ZMQ_HANDSHAKE_FAILED_* events is coarse-grained and partially misleading
Solution: redesign ZMQ_HANDSHAKE_FAILED_* events, introduce new class of ZMQ_HANDSHAKE_FAILED_AUTH events
2017-08-18 09:17:59 +02:00
sigiesec
863a02b4a1 Problem: no ZAP tests for PLAIN mechanism
Solution: added ZAP tests for PLAIN
2017-08-17 12:22:26 +02:00
sigiesec
00816875b8 Problem: no ZAP tests for NULL mechanism
Solution: added ZAP tests for NULL
2017-08-17 12:11:14 +02:00
sigiesec
406af1ef67 Problem: ZAP tests are now generic but placed in test_security_curve.cpp
Solution: Move ZAP tests to own file test_security_zap.cpp, move common code to testutil_security.hpp
2017-08-17 11:45:18 +02:00