mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
tls: alpn for client
This commit is contained in:
parent
bfbd80967a
commit
6a55f448e2
1 changed files with 6 additions and 4 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue