aboutsummaryrefslogtreecommitdiff
path: root/cmake/NNGOptions.cmake
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-04-27 18:40:40 -0700
committerGarrett D'Amore <garrett@damore.org>2025-06-01 22:49:00 -0700
commit8bcb82d245a5fce1bd519e2f99250dedf11e763d (patch)
tree4d663bedbb043b9d599f061d7f2b5f9509c8f390 /cmake/NNGOptions.cmake
parent08400bd437149c4fb31af9b2abece2ae44041283 (diff)
downloadnng-8bcb82d245a5fce1bd519e2f99250dedf11e763d.tar.gz
nng-8bcb82d245a5fce1bd519e2f99250dedf11e763d.tar.bz2
nng-8bcb82d245a5fce1bd519e2f99250dedf11e763d.zip
Introduce DTLS transport for NNG.
This introduces a new experimental transport for DTLS, that provides encryption over UDP. It has a simpler protocol than the current UDP SP protocol (but we intend to fix that by making the UDP transport simpler in a follow up!) There are a few other fixes in the TLS layer itself, and in the build, that were needed to accomplish this work. Also there was an endianness bug in the UDP protocol handling, which is fixed here.
Diffstat (limited to 'cmake/NNGOptions.cmake')
-rw-r--r--cmake/NNGOptions.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/NNGOptions.cmake b/cmake/NNGOptions.cmake
index b0512c45..d4369ff8 100644
--- a/cmake/NNGOptions.cmake
+++ b/cmake/NNGOptions.cmake
@@ -121,7 +121,8 @@ option (NNG_TRANSPORT_TCP "Enable TCP transport." ON)
mark_as_advanced(NNG_TRANSPORT_TCP)
# TLS transport
-option (NNG_TRANSPORT_TLS "Enable TLS transport." ON)
+CMAKE_DEPENDENT_OPTION(NNG_TRANSPORT_TLS "Enable TLS transport." ON
+ "NNG_ENABLE_TLS" OFF)
mark_as_advanced(NNG_TRANSPORT_TLS)
# WebSocket
@@ -138,6 +139,11 @@ mark_as_advanced(NNG_TRANSPORT_FDC)
option (NNG_TRANSPORT_UDP "Enable UDP transport (EXPERIMENTAL)" ON)
mark_as_advanced(NNG_TRANSPORT_UDP)
+CMAKE_DEPENDENT_OPTION(NNG_TRANSPORT_DTLS
+ "Enable DTLS transport (EXPERIMENTAL)" ON
+ "NNG_ENABLE_TLS" OFF)
+mark_as_advanced(NNG_TRANSPORT_DTLS)
+
if (NNG_TRANSPORT_WS OR NNG_TRANSPORT_WSS)
# Make sure things we *MUST* have are enabled.
set(NNG_SUPP_WEBSOCKET ON)