aboutsummaryrefslogtreecommitdiff
path: root/src/transport/tls
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-02-08 12:46:47 -0800
committerGarrett D'Amore <garrett@damore.org>2020-02-23 17:06:58 -0800
commitee0b44406d2b658886760ea08c0af12781ab7e3a (patch)
tree674d2d31df7a62c367c161261c942e96f7909166 /src/transport/tls
parent56bcc0310c4710bb21802719566926c2ccd2262a (diff)
downloadnng-ee0b44406d2b658886760ea08c0af12781ab7e3a.tar.gz
nng-ee0b44406d2b658886760ea08c0af12781ab7e3a.tar.bz2
nng-ee0b44406d2b658886760ea08c0af12781ab7e3a.zip
fixes #1005 TLS 1.3 support
This introduces support for an external wolfSSL plugin, and generally creates the framework for pluggable TLS implementations. The wolfSSL engine is provided via an external module (git submodule), available either under a GPLv3 license or a commercial license.
Diffstat (limited to 'src/transport/tls')
-rw-r--r--src/transport/tls/CMakeLists.txt5
-rw-r--r--src/transport/tls/tls.c6
2 files changed, 3 insertions, 8 deletions
diff --git a/src/transport/tls/CMakeLists.txt b/src/transport/tls/CMakeLists.txt
index 1603908a..d77a67cd 100644
--- a/src/transport/tls/CMakeLists.txt
+++ b/src/transport/tls/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright 2019 Staysail Systems, Inc. <info@staysail.tech>
+# Copyright 2020 Staysail Systems, Inc. <info@staysail.tech>
# Copyright 2018 Capitar IT Group BV <info@capitar.com>
#
# This software is supplied under the terms of the MIT License, a
@@ -9,8 +9,7 @@
#
# TLS transport
-CMAKE_DEPENDENT_OPTION(NNG_TRANSPORT_TLS "Enable TLS transport" ON
- "NNG_ENABLE_TLS" OFF)
+option (NNG_TRANSPORT_TLS "Enable TLS transport." ON)
mark_as_advanced(NNG_TRANSPORT_TLS)
nng_sources_if(NNG_TRANSPORT_TLS tls.c)
diff --git a/src/transport/tls/tls.c b/src/transport/tls/tls.c
index 7869c380..46ff8117 100644
--- a/src/transport/tls/tls.c
+++ b/src/transport/tls/tls.c
@@ -10,14 +10,12 @@
//
#include <stdbool.h>
-#include <stdio.h>
#include <string.h>
#include "core/nng_impl.h"
#include "nng/supplemental/tls/tls.h"
#include "nng/transport/tls/tls.h"
-#include "supplemental/tls/tls_api.h"
// TLS over TCP transport. Platform specific TCP operations must be
// supplied as well, and uses the supplemental TLS v1.2 code. It is not
@@ -49,7 +47,6 @@ struct tlstran_pipe {
size_t gotrxhead;
size_t wanttxhead;
size_t wantrxhead;
- nni_aio * useraio;
nni_aio * txaio;
nni_aio * rxaio;
nni_aio * negoaio;
@@ -821,7 +818,6 @@ error:
nni_aio_finish_error(aio, rv);
}
nni_mtx_unlock(&ep->mtx);
- return;
}
static int
@@ -868,7 +864,7 @@ tlstran_ep_init_dialer(void **dp, nni_url *url, nni_dialer *ndialer)
}
if ((rv = tlstran_url_parse_source(&myurl, &srcsa, url)) != 0) {
- return (NNG_EADDRINVAL);
+ return (rv);
}
if (((rv = tlstran_ep_init(&ep, url, sock)) != 0) ||