• 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
Makefile.am 21.7 KB