From 02178a8b5843a2c5a59fb7b104e4f9f5df1ff5ee Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 9 Nov 2017 14:09:14 -0800 Subject: fixes #3 TLS transport This introduces a new transport (compatible with the TLS transport from mangos), using TLS v1.2. To use the new transport, you must have the mbed TLS library available on your system (Xenial libmbedtls-dev). You can use version 2.x or newer -- 1.3.x and PolarSSL versions are not supported. You enable the TLS transport with -DNNG_TRANSPORT_TLS=ON in the CMake configuration. You must configure the server certificate by default, and this can only be done using nng options. See the nng_tls man page for details. This work is experimental, and was made possible by Capitar IT Group BV, and Staysail Systems, Inc. --- src/CMakeLists.txt | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4901789b..291769f0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -74,7 +74,7 @@ set (NNG_SOURCES core/timer.h core/transport.c core/transport.h -) + ) if (NNG_PLATFORM_POSIX) set (NNG_SOURCES ${NNG_SOURCES} @@ -119,9 +119,7 @@ if (NNG_PLATFORM_WINDOWS) ) endif() -install(FILES transport/inproc/inproc.h - DESTINATION include/nng/transport/inproc) - +add_subdirectory(supplemental/mbedtls) add_subdirectory(protocol/bus0) add_subdirectory(protocol/pair0) @@ -134,6 +132,7 @@ add_subdirectory(protocol/survey0) add_subdirectory(transport/inproc) add_subdirectory(transport/ipc) add_subdirectory(transport/tcp) +add_subdirectory(transport/tls) add_subdirectory(transport/zerotier) include_directories(AFTER SYSTEM ${PROJECT_SOURCE_DIR}/src @@ -183,11 +182,6 @@ if (CMAKE_THREAD_LIBS_INIT) endif() # pkg-config file -if (NNG_REQUIRED_LIBRARIES) - foreach (lib ${NNG_REQUIRED_LIBRARIES}) - set (NNG_REQUIRED_LFLAGS "${NNG_REQUIRED_LFLAGS} -l${lib}") - endforeach() -endif() #configure_file (pkgconfig.in ${PROJECT_NAME}.pc @ONLY) #install ( # FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc @@ -200,4 +194,3 @@ install (TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_static # Promote settings to parent set(NNG_REQUIRED_LIBRARIES ${NNG_REQUIRED_LIBRARIES} PARENT_SCOPE) -set(NNG_REQUIRED_LFLAGS ${NNG_REQUIRED_LFLAGS} PARENT_SCOPE) \ No newline at end of file -- cgit v1.2.3-70-g09d2