mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-07 05:58:45 +01:00
add wss transport and fix tipc tests when building using cmake on linux (#3857)
* Allow CMAKE to generate ws and wss transports I guess there is little use of just ws transport, so by default GnuTLS (and libsodium) are enabled * cmake libzmq including wss transport (ubuntu 19.10 and ubuntu 19.10 + wsl 1.0) test_security_fails (libsodium assert !?) * updated relicense * make external libs gnutls nss sodium optional * #ifdef WSS classes and functions, build test*ws* only if correct libs are included, warning if libs not present * make libsodium optional * cmake fix tests TIPC transport * clang-format pointed out a wrongly placed #ifdef * GnuTLS before 3.6.7 is not safe * msvc doesn't agree with strlen in array declaration, test_socks now at least compiles on windows * windows: libsodium build fails, missing include dirs set by env var * ws transport test only works when GnuTLS is found * Fixed condition to use NSS / built in SHA1, so that test_ws_transport should now pass, also when GnuTLS is not found
This commit is contained in:
@@ -42,11 +42,11 @@
|
||||
#include "socket_base.hpp"
|
||||
#include "address.hpp"
|
||||
#include "ws_engine.hpp"
|
||||
#include "wss_address.hpp"
|
||||
#include "session_base.hpp"
|
||||
|
||||
#ifdef ZMQ_HAVE_WSS
|
||||
#include "wss_engine.hpp"
|
||||
#include "wss_address.hpp"
|
||||
#endif
|
||||
|
||||
#ifndef ZMQ_HAVE_WINDOWS
|
||||
@@ -126,9 +126,11 @@ std::string zmq::ws_listener_t::get_socket_name (zmq::fd_t fd_,
|
||||
{
|
||||
std::string socket_name;
|
||||
|
||||
#ifdef ZMQ_HAVE_WSS
|
||||
if (_wss)
|
||||
socket_name = zmq::get_socket_name<wss_address_t> (fd_, socket_end_);
|
||||
else
|
||||
#endif
|
||||
socket_name = zmq::get_socket_name<ws_address_t> (fd_, socket_end_);
|
||||
|
||||
return socket_name + _address.path ();
|
||||
@@ -313,6 +315,7 @@ void zmq::ws_listener_t::create_engine (fd_t fd_)
|
||||
else
|
||||
engine = new (std::nothrow)
|
||||
ws_engine_t (fd_, options, endpoint_pair, _address, false);
|
||||
|
||||
alloc_assert (engine);
|
||||
|
||||
// Choose I/O thread to run connecter in. Given that we are already
|
||||
|
||||
Reference in New Issue
Block a user