• Simon Giesecke's avatar
    [WIP, do not merge] Problem: insufficient tests for ZMTP-CURVE protocol errors (#2680) · d5e4319e
    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
    d5e4319e
Name
Last commit
Last update
..
address.cpp Loading commit data...
address.hpp Loading commit data...
array.hpp Loading commit data...
atomic_counter.hpp Loading commit data...
atomic_ptr.hpp Loading commit data...
blob.hpp Loading commit data...
client.cpp Loading commit data...
client.hpp Loading commit data...
clock.cpp Loading commit data...
clock.hpp Loading commit data...
command.hpp Loading commit data...
condition_variable.hpp Loading commit data...
config.hpp Loading commit data...
ctx.cpp Loading commit data...
ctx.hpp Loading commit data...
curve_client.cpp Loading commit data...
curve_client.hpp Loading commit data...
curve_client_tools.hpp Loading commit data...
curve_server.cpp Loading commit data...
curve_server.hpp Loading commit data...
dbuffer.hpp Loading commit data...
dealer.cpp Loading commit data...
dealer.hpp Loading commit data...
decoder.hpp Loading commit data...
decoder_allocators.cpp Loading commit data...
decoder_allocators.hpp Loading commit data...
devpoll.cpp Loading commit data...
devpoll.hpp Loading commit data...
dgram.cpp Loading commit data...
dgram.hpp Loading commit data...
dish.cpp Loading commit data...
dish.hpp Loading commit data...
dist.cpp Loading commit data...
dist.hpp Loading commit data...
encoder.hpp Loading commit data...
epoll.cpp Loading commit data...
epoll.hpp Loading commit data...
err.cpp Loading commit data...
err.hpp Loading commit data...
fd.hpp Loading commit data...
fq.cpp Loading commit data...
fq.hpp Loading commit data...
gather.cpp Loading commit data...
gather.hpp Loading commit data...
gssapi_client.cpp Loading commit data...
gssapi_client.hpp Loading commit data...
gssapi_mechanism_base.cpp Loading commit data...
gssapi_mechanism_base.hpp Loading commit data...
gssapi_server.cpp Loading commit data...
gssapi_server.hpp Loading commit data...
i_decoder.hpp Loading commit data...
i_encoder.hpp Loading commit data...
i_engine.hpp Loading commit data...
i_mailbox.hpp Loading commit data...
i_poll_events.hpp Loading commit data...
io_object.cpp Loading commit data...
io_object.hpp Loading commit data...
io_thread.cpp Loading commit data...
io_thread.hpp Loading commit data...
ip.cpp Loading commit data...
ip.hpp Loading commit data...
ipc_address.cpp Loading commit data...
ipc_address.hpp Loading commit data...
ipc_connecter.cpp Loading commit data...
ipc_connecter.hpp Loading commit data...
ipc_listener.cpp Loading commit data...
ipc_listener.hpp Loading commit data...
kqueue.cpp Loading commit data...
kqueue.hpp Loading commit data...
lb.cpp Loading commit data...
lb.hpp Loading commit data...
libzmq.pc.cmake.in Loading commit data...
libzmq.pc.in Loading commit data...
libzmq.vers Loading commit data...
likely.hpp Loading commit data...
macros.hpp Loading commit data...
mailbox.cpp Loading commit data...
mailbox.hpp Loading commit data...
mailbox_safe.cpp Loading commit data...
mailbox_safe.hpp Loading commit data...
mechanism.cpp Loading commit data...
mechanism.hpp Loading commit data...
metadata.cpp Loading commit data...
metadata.hpp Loading commit data...
msg.cpp Loading commit data...
msg.hpp Loading commit data...
mtrie.cpp Loading commit data...
mtrie.hpp Loading commit data...
mutex.hpp Loading commit data...
norm_engine.cpp Loading commit data...
norm_engine.hpp Loading commit data...
null_mechanism.cpp Loading commit data...
null_mechanism.hpp Loading commit data...
object.cpp Loading commit data...
object.hpp Loading commit data...
options.cpp Loading commit data...
options.hpp Loading commit data...
own.cpp Loading commit data...
own.hpp Loading commit data...
pair.cpp Loading commit data...
pair.hpp Loading commit data...
pgm_receiver.cpp Loading commit data...
pgm_receiver.hpp Loading commit data...
pgm_sender.cpp Loading commit data...
pgm_sender.hpp Loading commit data...
pgm_socket.cpp Loading commit data...
pgm_socket.hpp Loading commit data...
pipe.cpp Loading commit data...
pipe.hpp Loading commit data...
plain_client.cpp Loading commit data...
plain_client.hpp Loading commit data...
plain_server.cpp Loading commit data...
plain_server.hpp Loading commit data...
poll.cpp Loading commit data...
poll.hpp Loading commit data...
poller.hpp Loading commit data...
poller_base.cpp Loading commit data...
poller_base.hpp Loading commit data...
pollset.cpp Loading commit data...
pollset.hpp Loading commit data...
precompiled.cpp Loading commit data...
precompiled.hpp Loading commit data...
proxy.cpp Loading commit data...
proxy.hpp Loading commit data...
pub.cpp Loading commit data...
pub.hpp Loading commit data...
pull.cpp Loading commit data...
pull.hpp Loading commit data...
push.cpp Loading commit data...
push.hpp Loading commit data...
radio.cpp Loading commit data...
radio.hpp Loading commit data...
random.cpp Loading commit data...
random.hpp Loading commit data...
raw_decoder.cpp Loading commit data...
raw_decoder.hpp Loading commit data...
raw_encoder.cpp Loading commit data...
raw_encoder.hpp Loading commit data...
reaper.cpp Loading commit data...
reaper.hpp Loading commit data...
rep.cpp Loading commit data...
rep.hpp Loading commit data...
req.cpp Loading commit data...
req.hpp Loading commit data...
router.cpp Loading commit data...
router.hpp Loading commit data...
scatter.cpp Loading commit data...
scatter.hpp Loading commit data...
select.cpp Loading commit data...
select.hpp Loading commit data...
server.cpp Loading commit data...
server.hpp Loading commit data...
session_base.cpp Loading commit data...
session_base.hpp Loading commit data...
signaler.cpp Loading commit data...
signaler.hpp Loading commit data...
socket_base.cpp Loading commit data...
socket_base.hpp Loading commit data...
socket_poller.cpp Loading commit data...
socket_poller.hpp Loading commit data...
socks.cpp Loading commit data...
socks.hpp Loading commit data...
socks_connecter.cpp Loading commit data...
socks_connecter.hpp Loading commit data...
stdint.hpp Loading commit data...
stream.cpp Loading commit data...
stream.hpp Loading commit data...
stream_engine.cpp Loading commit data...
stream_engine.hpp Loading commit data...
sub.cpp Loading commit data...
sub.hpp Loading commit data...
tcp.cpp Loading commit data...
tcp.hpp Loading commit data...
tcp_address.cpp Loading commit data...
tcp_address.hpp Loading commit data...
tcp_connecter.cpp Loading commit data...
tcp_connecter.hpp Loading commit data...
tcp_listener.cpp Loading commit data...
tcp_listener.hpp Loading commit data...
thread.cpp Loading commit data...
thread.hpp Loading commit data...
timers.cpp Loading commit data...
timers.hpp Loading commit data...
tipc_address.cpp Loading commit data...
tipc_address.hpp Loading commit data...
tipc_connecter.cpp Loading commit data...
tipc_connecter.hpp Loading commit data...
tipc_listener.cpp Loading commit data...
tipc_listener.hpp Loading commit data...
trie.cpp Loading commit data...
trie.hpp Loading commit data...
tweetnacl.c Loading commit data...
tweetnacl.h Loading commit data...
udp_address.cpp Loading commit data...
udp_address.hpp Loading commit data...
udp_engine.cpp Loading commit data...
udp_engine.hpp Loading commit data...
v1_decoder.cpp Loading commit data...
v1_decoder.hpp Loading commit data...
v1_encoder.cpp Loading commit data...
v1_encoder.hpp Loading commit data...
v2_decoder.cpp Loading commit data...
v2_decoder.hpp Loading commit data...
v2_encoder.cpp Loading commit data...
v2_encoder.hpp Loading commit data...
v2_protocol.hpp Loading commit data...
version.rc.in Loading commit data...
vmci.cpp Loading commit data...
vmci.hpp Loading commit data...
vmci_address.cpp Loading commit data...
vmci_address.hpp Loading commit data...
vmci_connecter.cpp Loading commit data...
vmci_connecter.hpp Loading commit data...
vmci_listener.cpp Loading commit data...
vmci_listener.hpp Loading commit data...
windows.hpp Loading commit data...
wire.hpp Loading commit data...
xpub.cpp Loading commit data...
xpub.hpp Loading commit data...
xsub.cpp Loading commit data...
xsub.hpp Loading commit data...
ypipe.hpp Loading commit data...
ypipe_base.hpp Loading commit data...
ypipe_conflate.hpp Loading commit data...
yqueue.hpp Loading commit data...
zmq.cpp Loading commit data...
zmq_draft.h Loading commit data...
zmq_utils.cpp Loading commit data...