diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-09 15:24:43 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-11-09 16:27:45 -0800 |
| commit | 0058b766b91f08b34dcef3c7bb55b216099f3f66 (patch) | |
| tree | 5ac1fa105d707018cdfa9f5244da5837a8c31601 /src/sp/transport.h | |
| parent | 150d80c2c62ce3693dbbd0256c16337879c7d825 (diff) | |
| download | nng-0058b766b91f08b34dcef3c7bb55b216099f3f66.tar.gz nng-0058b766b91f08b34dcef3c7bb55b216099f3f66.tar.bz2 nng-0058b766b91f08b34dcef3c7bb55b216099f3f66.zip | |
TLS configuration changed to use discret _set_tls and _get_tls functions.
This is simpler, and more reliable than using socket options.
Diffstat (limited to 'src/sp/transport.h')
| -rw-r--r-- | src/sp/transport.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/sp/transport.h b/src/sp/transport.h index 76d8d36a..8fd47483 100644 --- a/src/sp/transport.h +++ b/src/sp/transport.h @@ -1,5 +1,5 @@ // -// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // Copyright 2018 Devolutions <info@devolutions.net> // @@ -49,6 +49,14 @@ struct nni_sp_dialer_ops { // d_setopt is used to set or change an option. int (*d_setopt)(void *, const char *, const void *, size_t, nni_type); + // d_get_tls is used to get the TLS configuration to use for dialing. + // This may be NULL if the dialer does not support TLS. + int (*d_get_tls)(void *, nng_tls_config **); + + // d_set_tls is used to set the TLS configruation to use for the + // dialer. This may be NULL if this dialer does not support TLS. + int (*d_set_tls)(void *, nng_tls_config *); + // d_options is an array of dialer options. The final // element must have a NULL name. If this member is NULL, then // no dialer specific options are available. @@ -85,6 +93,14 @@ struct nni_sp_listener_ops { // l_setopt is used to set or change an option. int (*l_setopt)(void *, const char *, const void *, size_t, nni_type); + // l_get_tls is used to get the TLS configuration to use for listening. + // This may be NULL if the listener does not support TLS. + int (*l_get_tls)(void *, nng_tls_config **); + + // l_set_tls is used to set the TLS configruation to use for listening. + // This may be NULL if this listener does not support TLS. + int (*l_set_tls)(void *, nng_tls_config *); + // l_options is an array of listener options. The final // element must have a NULL name. If this member is NULL, then // no dialer specific options are available. |
