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/core/dialer.c | |
| 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/core/dialer.c')
| -rw-r--r-- | src/core/dialer.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/dialer.c b/src/core/dialer.c index 722a0868..0ee2d361 100644 --- a/src/core/dialer.c +++ b/src/core/dialer.c @@ -558,6 +558,24 @@ nni_dialer_getopt( return (nni_sock_getopt(d->d_sock, name, valp, szp, t)); } +int +nni_dialer_get_tls(nni_dialer *d, nng_tls_config **cfgp) +{ + if (d->d_ops.d_get_tls == NULL) { + return (NNG_ENOTSUP); + } + return (d->d_ops.d_get_tls(d->d_data, cfgp)); +} + +int +nni_dialer_set_tls(nni_dialer *d, nng_tls_config *cfg) +{ + if (d->d_ops.d_set_tls == NULL) { + return (NNG_ENOTSUP); + } + return (d->d_ops.d_set_tls(d->d_data, cfg)); +} + void nni_dialer_add_stat(nni_dialer *d, nni_stat_item *item) { |
