Luca Boccassi
124e04659c
Problem: ZMQ_HAVE_O_CLOEXEC not defined by CMake
...
Solution: add it to CMake's platform.hpp.in
2017-09-01 10:15:42 +01:00
Luca Boccassi
28a4b9a969
Merge pull request #2727 from fove-robin/fix-o-cloexec
...
Problem: ZMQ_HAVE_O_CLOEXEC always disabled
2017-09-01 09:39:39 +01:00
Robin Stacey
83f54d90ad
Problem: ZMQ_HAVE_O_CLOEXEC always disabled
...
Solution: Escape quotes in cmake test.
2017-09-01 16:37:27 +09:00
Simon Giesecke
f1c72dc8e5
Merge pull request #2721 from bjovke/my_work
...
Problem: Inconsistent size_t/int usage. size_t and int don't match in 64 bit build and produce warnings. Solution: types corrected.
2017-08-28 15:47:57 +02:00
bjovke
91e0d689bb
Problem: Inconsistent size_t/int usage. Solution: types corrected.
2017-08-28 15:03:46 +02:00
Constantin Rack
9c8844fd08
Merge pull request #2719 from jimklimov/setThreadName
...
Problem: cosmetic setThreadName() can be fatal
2017-08-25 16:01:52 +02:00
Jim Klimov
40a3b0746f
Problem: cosmetic setThreadName() can be fatal
...
Solution: do not assert() the values returned; if we failed to set the thread name - we just have harder debugging, not flawed production conditions.
Closes github issue #2679
Signed-off-by: Jim Klimov <EvgenyKlimov@eaton.com>
2017-08-25 15:30:03 +02:00
Luca Boccassi
5c981be9f8
Merge pull request #2718 from sigiesec/issue-template
...
Problem: bug reports are often missing relevant information
2017-08-25 12:20:43 +01:00
sigiesec
3f946428ec
Problem: bug reports are often missing relevant information
...
Solution: provide template for bug reports
2017-08-25 13:16:23 +02:00
Constantin Rack
f6933f85a9
Merge pull request #2716 from sigiesec/remove-tweetnacl-from-coverage
...
Problem: coverage includes tweetnacl, which is not our code
2017-08-23 15:16:33 +02:00
sigiesec
fc2b7cd5ea
Problem: coverage includes tweetnacl, which is not our code
...
Solution: exclude tweetnacl from coverage
2017-08-23 14:42:52 +02:00
Luca Boccassi
3d1f11881f
Merge pull request #2715 from sigiesec/add-timers-tests
...
Problem: insufficient tests for zmq_timers_* and inadequate behaviour in corner cases
2017-08-23 12:52:43 +01:00
sigiesec
7eebed56a5
Problem: no test for zmq_timers_timeout without any active timers
...
Solution: add test
2017-08-23 10:31:44 +02:00
sigiesec
6147e45a07
Problem: missing tests for zmq_timers_* corner cases, missing handling of such corner cases, code duplication, missing assertions in test code
...
Solution: add tests, add checks to timers_t, add match_by_id functor, add assertions
2017-08-23 09:41:34 +02:00
sigiesec
d072d57e2e
Problem: no tests for zmq_timer_* with NULL timers argument
...
Solution: added tests
2017-08-23 09:41:22 +02:00
sigiesec
8b263d5820
Problem: test_timers.cpp sleep_ duplicates msleep from testutil
...
Solution: replace sleep_ my msleep
2017-08-23 09:05:10 +02:00
Doron Somech
8f3113b278
Merge pull request #2714 from sigiesec/add-poller-tests
...
Problem: insufficient tests for zmq_poller_*
2017-08-22 22:38:36 +03:00
sigiesec
f685a3ffd2
Solution: unreachable code paths in socket_poller_t
...
Problem: replaced by assertions resp. removed
2017-08-22 21:23:09 +02:00
sigiesec
8ae91fdf9a
Problem: no test cases for zmq_poller_add*, zmq_poller_modify*, zmq_poller_remove* corner cases
...
Solution: added test cases
2017-08-22 20:22:39 +02:00
sigiesec
68f416c0ca
Problem: missing test case for zmq_poller_wait_all with negative number of events
...
Solution: add test case
2017-08-22 20:04:55 +02:00
sigiesec
a71f7b0405
Problem: zmq_poller_* uses ETIMEDOUT (instead of the usual EAGAIN) to indicate timeouts
...
Solution: replace ETIMEDOUT within socket_poller_t and all client code by EAGAIN
Fixes #2713
2017-08-22 20:00:29 +02:00
sigiesec
6a3c053a3e
Problem: EFAULT is returned for bad file descriptors passed to zmq_poller_*_fd
...
Solution: Return EBADF instead
2017-08-22 19:43:56 +02:00
sigiesec
74303b08e6
Problem: calling zmq_poller_wait* with NULL events causes an assertion, as opposed to other NULL arguments, which return an error
...
Solution: return EFAULT when such an operation is attempted
2017-08-22 19:43:56 +02:00
sigiesec
c1a4cfdd9f
Problem: waiting on an empty poller with infinite timeout waits forever
...
Solution: return EFAULT when such an operation is attempted
2017-08-22 19:43:56 +02:00
sigiesec
0c9b16d62a
Problem: missing test cases for zmq_poller_* functions called with invalid arguments and corner cases for zmq_poller_wait_*
...
Solution: added test cases
2017-08-22 19:43:42 +02:00
sigiesec
2e4fc4faf0
Problem: zmq_poller_*_fd functions do not check for invalid fd
...
Solution: add checks, added test cases
2017-08-22 19:28:07 +02:00
sigiesec
f9af5503b4
Problem: missing test cases for zmq_poller_* functions called with invalid arguments
...
Solution: added test cases
2017-08-22 19:28:07 +02:00
Luca Boccassi
6f665eb951
Merge pull request #2712 from sigiesec/add-socket-null-tests
...
Problem: no tests for socket-related functions passing NULL as socket
2017-08-22 18:01:14 +01:00
sigiesec
9a336622fb
Problem: no tests for socket-related functions passing NULL as socket
...
Soluton: added tests
2017-08-22 16:22:38 +02:00
Luca Boccassi
1881735f7d
Merge pull request #2710 from sigiesec/remove-select-rm_fd-code-duplication
...
Problem: code duplication within zmq::select_t::rm_fd
2017-08-21 17:05:39 +01:00
sigiesec
c3c2515542
Problem: code duplication within zmq::select_t::rm_fd
...
Solution: extract find_fd_entry_by_handle from rm_fd
2017-08-21 14:36:50 +02:00
Jim Klimov
ee7f5b9b97
Merge pull request #2708 from bluca/obs_flair
...
Problem: packages builds not mentioned in README.md
2017-08-21 14:32:18 +02:00
Luca Boccassi
c2ce55aaa4
Merge pull request #2707 from sigiesec/test-monitor-diagnostics
...
Problem: test_monitor fails sometimes due to a wrong event received but unclear which one
2017-08-21 12:25:10 +01:00
Luca Boccassi
7cd890a8bc
Problem: packages builds not mentioned in README.md
...
Solution: add brief description and links
2017-08-21 11:51:16 +01:00
Simon Giesecke
0aef54421d
Problem: test_monitor is disabled on Windows
...
Solution: enable test
2017-08-21 12:20:37 +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
Luca Boccassi
5e85fa6a39
Merge pull request #2698 from sigiesec/client-side-auth-error-events
...
Problem: no tests for client-side events for successful handshake and authentication failure in handshake
2017-08-20 22:42:51 +01: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
Constantin Rack
7481fba561
Merge pull request #2706 from bluca/gssapi_test_monitor
...
Problem: test_security_gssapi expects wrong event
2017-08-20 13:09:50 +02:00
Luca Boccassi
b239d99a2c
Problem: test_security_gssapi does not close messages
...
Solution: do it to avoid leaks. Even though they are below 33 bytes so
it's all allocated on the stack, the small message size might change in
the future.
2017-08-20 11:54:49 +01:00
Luca Boccassi
cd09065c8a
Problem: test_security_gssapi expects wrong event
...
Solution: fix it
2017-08-20 11:54:13 +01:00
Luca Boccassi
72b517b309
Merge pull request #2704 from sigiesec/fix-test-sockopt-hwm
...
Problem: test_sockopt_hwm fails occasionally
2017-08-20 11:40:05 +01:00
Simon Giesecke
00c6962516
Problem: test failing due to too few messages sent relative to SNDHWM
...
Solution: relaxed assertion to accept 10% of the SNDHWM, and updated documentation accordingly
2017-08-20 11:51:09 +02:00
sigiesec
4c2acdacca
Problem: wrong assumption on behavior of ZMQ_SNDHWM in test_sockopt_hwm.cpp
...
Solution: align assertions with specification of ZMQ_SNDHWM (actual number of enqueueable messages may be lower)
2017-08-20 11:43:13 +02:00
Constantin Rack
7283574cee
Merge pull request #2703 from bluca/rpm_la
...
Problem: RPM -devel still ships libzmq.la
2017-08-20 07:33:08 +02:00
Luca Boccassi
cfc3c7a66b
Problem: spec changelog out of date
...
Solution: mention recent changes
2017-08-19 22:04:31 +01:00
Luca Boccassi
b3acae89e2
Problem: RPM -devel still ships libzmq.la
...
Solution: don't. libtool's archive files are already being deprecated
in Debian-based distros. They are no longer necessary, and cause the
reverse dependencies to over-link.
EG: when built with sodium/pgm/krb5, all applications/libraries
linking against libzmq would be forced to link against sodium/pgm/krb5
despite not using any of those libraries symbols.
2017-08-19 22:04:31 +01:00
Constantin Rack
13f3ab988a
Merge pull request #2702 from bluca/test
...
Problems: GSSAPI builds broken with picky compilers, Debian/RPM packages do not use GSSAPI, no CI jobs that test GSSAPI
2017-08-19 19:58:09 +02:00
Luca Boccassi
68ba6d17be
Problem: Travis does not test PGM
...
Solution: enable option and install build-dependency for the jobs that
already install packages only, to minimise marginal cost in term of
runtime
2017-08-19 17:54:42 +01:00
Luca Boccassi
f979ed4f35
Problem: Travis does not test GSSAPI
...
Solution: enable option and install build-dependency for the jobs that
already install packages only, to minimise marginal cost in term of
runtime
2017-08-19 17:53:57 +01:00
Luca Boccassi
8896b672c4
Problem: RPM build does not pass correct configure options
...
Solution: fix it
2017-08-19 17:40:15 +01:00
Luca Boccassi
962630fd65
Problem: Debian package not built with GSSAPI
...
Solution: add build-dependency and configure option
2017-08-19 17:40:15 +01:00
Luca Boccassi
f6ce019fff
Problem: incompatible parameter passed to send_zap_request
...
Solution: cast from void* to uint8_t* to match new definition
2017-08-19 17:40:15 +01:00
Luca Boccassi
7c85bf2f88
Problem: uninitialised variables in gssapi_server constructor
...
Solution: initialise session and peer_address
2017-08-19 17:40:15 +01:00
Luca Boccassi
2ba0149ee4
Problem: gssapi_mechanism_base_t initialisation misses one param
...
Solution: pass the session as well as the options
2017-08-19 17:40:15 +01:00
Luca Boccassi
83c9c0b55f
Problem: gssapi_client does not have a peer_address param
...
Solution: remove it from the gssapi_mechanism_base initialiser
2017-08-19 17:40:15 +01:00
Luca Boccassi
24b2f61b1b
Problem: gssapi_server out of date with zap_client
...
Solution: remove local unused zap_client variable
2017-08-19 17:40:15 +01:00
Luca Boccassi
c8097af884
Problem: DRAFT GSSAPI socket options in wrong section cause duplication
...
Solution: move them together with the other DRAFT socket options, and
change value of DRAFT ZMQ_BINDTODEVICE from 90 to 92 to avoid clash
2017-08-19 17:40:15 +01:00
Luca Boccassi
6f49e40e36
Problem: gssapi_mechanism_base does not include mechanism_base
...
Solution: include mechanism_base.hpp instead of mechanism.hpp
2017-08-19 17:40:15 +01:00
Luca Boccassi
e2ffa2a77b
Problem: produce_ready in gssapi_mechanism_base not deduped
...
Solution: call make_command_with_basic_properties
2017-08-19 17:40:15 +01:00
Doron Somech
2c8a1315c1
Merge pull request #2700 from bluca/gssapi_uninit_ref
...
Problems: free of stack variable, TODO left to evaluate
2017-08-19 14:49:52 +03:00
Luca Boccassi
7453a02144
Problem: CMake on Linux does not link libzmq with optional libs
...
Solution: add missing target_link_libraries
Fixes #2701
2017-08-19 12:26:36 +01:00
Luca Boccassi
90b6c102bb
Problem: various unused variables warnings
...
Solution: use LIBZMQ_UNUSED where necessary
2017-08-19 12:18:51 +01:00
Luca Boccassi
e81a40b8bd
Problem: CMake build ignores SO_BINDTODEVICE
...
Solution: add it to CMake's platform.hpp.in
2017-08-19 12:07:25 +01:00
Luca Boccassi
9387897674
Problem: multi-part able sockets deprecated in favour of non-multi-part
...
Solution: as discussed, remove the deprecation notices, as many users
expressed the need for multi-part support.
Fixes #2699
2017-08-19 11:23:18 +01:00
Luca Boccassi
5b1c0cd0ac
Problem: test_security_gssapi fails to build
...
Solution: monitor new events only if DRAFT APIs are enabled, and
convert to new event types. Same for DRAFT socket options.
2017-08-18 16:56:36 +01:00
Luca Boccassi
330856daec
Problem: double definition in test_security_gssapi
...
Solution: remove the second one to fix build failure
2017-08-18 16:28:03 +01:00
Luca Boccassi
b7346f8e00
Problem: gssapi search in autoconf does not use pkgconfig
...
Solution: use it before falling back to headers checks
2017-08-18 16:24:53 +01:00
Luca Boccassi
7be3efc936
Problem: TODO in gssapi mechanism
...
Solution: remove it.
Looking at the code:
https://github.com/krb5/krb5/blob/master/src/lib/gssapi/mechglue/g_unseal.c#L55
gss_unwrap as the very first thing checks that plaintext is not a
null pointer, which in our case it's true given it's on the stack,
and then initialises its members to 0 length and null ptr.
https://github.com/krb5/krb5/blob/master/src/lib/gssapi/mechglue/g_rel_buffer.c#L36
So it should be safe to release it in all cases, and the release API
seems to check again if it's not a null pointer and then if the
members are 0 length and null pointer it's a no-op.
2017-08-18 15:58:35 +01:00
Luca Boccassi
77444e206c
Problem: free on stack variable in GSSAPI mechanism
...
Solution: free wrapper.value instead of wrapper.
2017-08-18 15:57:51 +01:00
Doron Somech
80f4a87fb9
Merge pull request #2697 from bluca/vs2008
...
Problem: missing files from VS2008 solution
2017-08-18 16:49:20 +03:00
Luca Boccassi
f0554e7f16
Merge pull request #2696 from sigiesec/gssapi-dont-abort-on-bad-data
...
Problem: gssapi_mechanism_base_t aborts the application when it receives a message it cannot decode
2017-08-18 12:50:28 +01:00
Luca Boccassi
8ecfee475c
Problem: missing files from VS2008 solution
...
Solution: generate list of sources and headers with:
ls -1 src/*cpp | sort | sed 's|src/\(.*\)| <File RelativePath="..\\..\\..\\..\\src\\\1" />|g'
ls -1 src/*hpp | sort | sed 's|src/\(.*\)| <File RelativePath="..\\..\\..\\..\\src\\\1" />|g'
and add them.
2017-08-18 12:45:12 +01:00
sigiesec
898691e2eb
Problem: gssapi_mechanism_base_t aborts the application when it receives a message it cannot decode
...
Solution: emit an ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL event instead of using zmq_assert
2017-08-18 12:29:37 +02:00
Luca Boccassi
31c72e22ab
Merge pull request #2695 from sigiesec/fine-grained-handshake-error-codes
...
Problem: Values in ZMQ_EVENT_HANDSHAKE_FAILED_* are not helpful
2017-08-18 11:21:48 +01:00
sigiesec
301f3c70c2
Problem: code duplication between curve_client_t and curve_server_t decode and encode
...
Solution: extracted common base class curve_mechanism_base_t
2017-08-18 11:34:22 +02:00
sigiesec
44f6aa3de6
Problem: gssapi_* do not emit ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL events
...
Solution: emit appropriate events
2017-08-18 10:30:48 +02:00
sigiesec
ca7eee357e
Problem: no ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL events emitted in plain_client_t
...
Solution: emit events at appropriate places
2017-08-18 10:15:44 +02:00
sigiesec
c66ae4656f
Problem: curve_client_t may emit misleading event on bad data processed by curve_client_t::decode
...
Solution: use check_basic_command_structure in curve_client_t::decode, also prepare other client mechanisms to use that method by rearranging inheritance hierarchy
2017-08-18 10:04:58 +02:00
sigiesec
bdd0f3b18b
Problem: documentation on zmq_socket_monitor out-of-sync with current
...
state of ZMQ_EVENT_HANDSHAKE_FAILED_* events
Solution: update documentation
2017-08-18 09:35:13 +02:00
sigiesec
e22ca065d6
Problem: curve_client_t does not emit handshake failure events
...
Solution: add handshake failure events to curve_client_t
2017-08-18 09:18:06 +02:00
sigiesec
9bec68354c
Problem: console output for NULL protocol errors
...
Solution: emit socket monitor events for NULL protocol errors (like CURVE)
2017-08-18 09:18:06 +02:00
sigiesec
11b3c93852
Problem: console output for PLAIN protocol errors
...
Solution: emit socket monitor events for PLAIN protocol errors (like CURVE)
2017-08-18 09:18:06 +02: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
Constantin Rack
f252f02b01
Merge pull request #2693 from bluca/verbose_check
...
Problem: coverage CI job does not print test errors
2017-08-17 18:53:53 +02:00
Luca Boccassi
9ac244a67c
Problem: coverage CI job does not print test errors
...
Solution: run make check with VERBOSE=1
2017-08-17 17:20:56 +01:00
Luca Boccassi
2d2b51579b
Merge pull request #2692 from minrk/utf8-groups
...
specify that groups shall be UTF8
2017-08-17 15:33:29 +01:00
Min RK
3130b913fc
specify that groups shall be UTF8
...
group being a `char *` is logically a text type, which needs an encoding.
Declare in the API that groups shall be UTF8-encoded,
matching the `zmq_msg_gets` API, which is the other user-facing `char *` API,
which has the same definition.
This allows bindings to provide text-type APIs,
which they cannot do if arbitrary bytes are allowed
2017-08-17 16:12:53 +02:00
Luca Boccassi
1e393586c7
Merge pull request #2691 from sigiesec/relicense
...
Problem: no relicense agreement by sigiesec
2017-08-17 14:27:52 +01:00
sigiesec
fecbd42dbe
Problem: no relicense agreement by sigiesec
...
Solution: added relicense agreement
2017-08-17 15:20:12 +02:00
Luca Boccassi
d52197d84f
Merge pull request #2689 from sigiesec/remove-zap-client-duplication
...
Problem: ZAP client code duplicated across mechanisms with behaviour deviations
2017-08-17 13:24:36 +01:00
Jim Klimov
77aa5f4b3e
Merge pull request #2688 from bluca/unwind_test_curve
...
Problem: missing flags break build of test_security_curve
2017-08-17 13:57:58 +02:00
sigiesec
f9985708b7
Problem: unreachable code in zap_client_t
...
Solution: replaced unreachable code by assertions and adapted uses
2017-08-17 12:54:05 +02:00
sigiesec
7f15e6c868
Problem: make-based builds broken
...
Solution: add testutil_security.hpp to Makefile.am
2017-08-17 12:34:49 +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
f107b53768
Problem: deviating behavior regarding monitoring events between mechanisms
...
Solution: move relevant behavior to zap_client_t
2017-08-17 12:10:00 +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
sigiesec
59d8060165
Problem: ZAP tests are only run with CURVE security
...
Solution: as a first step, parametrize mechanism configuration in CURVE tests
2017-08-17 11:10:11 +02:00