diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-10-27 22:51:29 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-10-28 07:06:29 -0700 |
| commit | cbd8c5573ef6816d585d00d63568cf98aa6a97b8 (patch) | |
| tree | 52c2242be427f63dd862394de644394a4bc8c352 /src/sp | |
| parent | ef1cf275eded10ccfe24c44089eb044dd5cd48b4 (diff) | |
| download | nng-cbd8c5573ef6816d585d00d63568cf98aa6a97b8.tar.gz nng-cbd8c5573ef6816d585d00d63568cf98aa6a97b8.tar.bz2 nng-cbd8c5573ef6816d585d00d63568cf98aa6a97b8.zip | |
tls: Remove the individual TLS configuration options
This is a breaking change.
TLS configuration changes are to be made using TLS configuration
objects, and then set on a listener or dialer with NNG_OPT_TLS_CONFIG.
This should be a bit less racy, and allows for simpler code.
Diffstat (limited to 'src/sp')
| -rw-r--r-- | src/sp/transport/tls/tls.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/sp/transport/tls/tls.c b/src/sp/transport/tls/tls.c index f488771b..f74209a2 100644 --- a/src/sp/transport/tls/tls.c +++ b/src/sp/transport/tls/tls.c @@ -61,7 +61,6 @@ struct tlstran_ep { bool closed; bool fini; int refcnt; - int authmode; nni_url *url; nni_list pipes; nni_reap_node reap; @@ -911,7 +910,6 @@ tlstran_ep_init_dialer(void **dp, nni_url *url, nni_dialer *ndialer) ((rv = nni_aio_alloc(&ep->connaio, tlstran_dial_cb, ep)) != 0)) { return (rv); } - ep->authmode = NNG_TLS_AUTH_MODE_REQUIRED; if ((rv != 0) || ((rv = nng_stream_dialer_alloc_url(&ep->dialer, &myurl)) != 0)) { @@ -967,8 +965,6 @@ tlstran_ep_init_listener(void **lp, nni_url *url, nni_listener *nlistener) return (rv); } - ep->authmode = NNG_TLS_AUTH_MODE_NONE; - if (strlen(host) == 0) { host = NULL; } @@ -989,10 +985,7 @@ tlstran_ep_init_listener(void **lp, nni_url *url, nni_listener *nlistener) nni_aio_free(aio); if ((rv != 0) || - ((rv = nng_stream_listener_alloc_url(&ep->listener, url)) != 0) || - ((rv = nni_stream_listener_set(ep->listener, NNG_OPT_TLS_AUTH_MODE, - &ep->authmode, sizeof(ep->authmode), NNI_TYPE_INT32)) != - 0)) { + ((rv = nng_stream_listener_alloc_url(&ep->listener, url)) != 0)) { tlstran_ep_fini(ep); return (rv); } |
