diff options
author | Sylvain Saunier <sylvain.saunier@gmail.com> | 2022-09-18 08:13:21 +0100 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2022-09-18 08:18:22 +0100 |
commit | 6a55f448e2e3ad22d0e385f96109cd98e78b086a (patch) | |
tree | 15e9d6d6af7e87bb495af99d921e4d246529856d | |
parent | bfbd80967a9977e22f32fdeb04927c1979bb196a (diff) | |
download | libwebsockets-6a55f448e2e3ad22d0e385f96109cd98e78b086a.tar.gz |
tls: alpn for client
-rw-r--r-- | lib/tls/openssl/openssl-client.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/tls/openssl/openssl-client.c b/lib/tls/openssl/openssl-client.c index f8a64f15..b4181721 100644 --- a/lib/tls/openssl/openssl-client.c +++ b/lib/tls/openssl/openssl-client.c @@ -389,13 +389,15 @@ lws_ssl_client_bio_create(struct lws *wsi) defined(LWS_HAVE_SSL_get0_alpn_selected) if (wsi->a.vhost->tls.alpn) alpn_comma = wsi->a.vhost->tls.alpn; - if (wsi->stash) + if (wsi->stash) { alpn_comma = wsi->stash->cis[CIS_ALPN]; #if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2) - if (lws_hdr_copy(wsi, hostname, sizeof(hostname), - _WSI_TOKEN_CLIENT_ALPN) > 0) - alpn_comma = hostname; + } else { + if (lws_hdr_copy(wsi, hostname, sizeof(hostname), + _WSI_TOKEN_CLIENT_ALPN) > 0) + alpn_comma = hostname; #endif + } lwsl_info("%s client conn using alpn list '%s'\n", wsi->role_ops->name, alpn_comma); |