0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 23:51:04 +08:00

Merge pull request #3785 from bluca/wss_option

Problem: WS build option is independent of DRAFT
This commit is contained in:
Simon Giesecke 2020-01-20 14:13:36 +01:00 committed by GitHub
commit b7dd31db5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 5 deletions

View File

@ -98,11 +98,15 @@ if(APPLE)
option(ZMQ_BUILD_FRAMEWORK "Build as OS X framework" OFF)
endif()
# Disable webSocket transport
option(DISABLE_WS "Disable WebSocket transport" OFF)
# Enable webSocket transport
if (ENABLE_DRAFTS)
option(ENABLE_WS "Enable WebSocket transport" ON)
else()
option(ENABLE_WS "Enable WebSocket transport" OFF)
endif()
option(WITH_NSS "Use NSS instead of builtin sha1" OFF)
if (NOT DISABLE_WS)
if (ENABLE_WS)
list(APPEND sources
${CMAKE_CURRENT_SOURCE_DIR}/src/ws_address.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/wss_address.cpp

2
NEWS
View File

@ -27,7 +27,7 @@
of WebSockets (and secure WebSockets via TLS) via the ZWS 2.0 protocol.
WSS requires the GnuTLS library for TLS support. ZMQ_WSS_ specific socket
options were added to support TLS.
WebSockets support can be disabled at build time with --disable-ws.
WebSockets support is disabled by default if DRAFT APIs are disabled.
* Fixed #3566 - malformed CURVE message can cause memory leak

View File

@ -565,7 +565,9 @@ AM_CONDITIONAL(USE_WEPOLL, test "$poller" = "wepoll")
ws_crypto_library=""
AC_ARG_ENABLE([ws],
[AS_HELP_STRING([--disable-ws], [Disable WebSocket transport [default=no]])])
[AS_HELP_STRING([--enable-ws], [Enable WebSocket transport [default=state of DRAFT]])],
[enable_ws=$enableval],
[enable_ws=$enable_drafts])
AC_ARG_WITH([nss],
[AS_HELP_STRING([--with-nss], [use nss instead of built-in sha1 [default=no]])])

View File

@ -57,6 +57,11 @@
#define ZMQ_SOCKS_PASSWORD 100
#define ZMQ_IN_BATCH_SIZE 101
#define ZMQ_OUT_BATCH_SIZE 102
#define ZMQ_WSS_KEY_PEM 103
#define ZMQ_WSS_CERT_PEM 104
#define ZMQ_WSS_TRUST_PEM 105
#define ZMQ_WSS_HOSTNAME 106
#define ZMQ_WSS_TRUST_SYSTEM 107
#define ZMQ_ONLY_FIRST_SUBSCRIBE 108