diff options
| author | Garrett D'Amore <garrett@damore.org> | 2020-02-08 12:46:47 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2020-02-23 17:06:58 -0800 |
| commit | ee0b44406d2b658886760ea08c0af12781ab7e3a (patch) | |
| tree | 674d2d31df7a62c367c161261c942e96f7909166 /src/supplemental/tls/tls_api.h | |
| parent | 56bcc0310c4710bb21802719566926c2ccd2262a (diff) | |
| download | nng-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/supplemental/tls/tls_api.h')
| -rw-r--r-- | src/supplemental/tls/tls_api.h | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/src/supplemental/tls/tls_api.h b/src/supplemental/tls/tls_api.h index 4e6146b1..642b9072 100644 --- a/src/supplemental/tls/tls_api.h +++ b/src/supplemental/tls/tls_api.h @@ -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> // Copyright 2019 Devolutions <info@devolutions.net> // @@ -14,40 +14,10 @@ #include <nng/supplemental/tls/tls.h> -// This nni_tls_common structure represents the "base" structure for -// an implementation to extend. One of these must be the first member -// of the implementation specific TLS stream struct. -typedef struct { - nng_stream ops; - nni_aio * aio; // system aio for connect/accept - nni_aio * uaio; // user aio for connect/accept - nng_tls_config *cfg; -} nni_tls_common; - // The implementation supplies this function to create the TLS connection // object. All fields will be zeroed. -extern int nni_tls_alloc(nng_stream **); extern int nni_tls_dialer_alloc(nng_stream_dialer **, const nng_url *); extern int nni_tls_listener_alloc(nng_stream_listener **, const nng_url *); extern int nni_tls_checkopt(const char *, const void *, size_t, nni_type); -// nni_tls_start is called by the common TLS dialer/listener completions -// to start the TLS stream activity. This may also do allocations, etc. -extern int nni_tls_start(nng_stream *, nng_stream *); - -// nni_tls_config_init creates a new TLS configuration object. -// The object is created with a reference count of one. -extern int nni_tls_config_init(nng_tls_config **, nng_tls_mode); - -// nni_tls_config_fini drops the reference on the configuration -// object, deallocating if this was the last reference. -extern void nni_tls_config_fini(nng_tls_config *); - -// nni_tls_config_hold is used to get a hold on the config -// object, preventing it from being released inadvertently. -// The hold is released with a call to nng_tls_config_fini(). -// Note that a hold need not be acquired at creation, since -// the configuration object is created with a hold on it. -extern void nni_tls_config_hold(nng_tls_config *); - #endif // NNG_SUPPLEMENTAL_TLS_TLS_API_H |
