From 211031c9a362c8cdd086cae1943423d56c489463 Mon Sep 17 00:00:00 2001 From: zhengchao Date: Mon, 29 Oct 2018 14:45:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81alpn=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform/src/ssl_stream.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/src/ssl_stream.cpp b/platform/src/ssl_stream.cpp index 7c8aa75..2ee5e55 100644 --- a/platform/src/ssl_stream.cpp +++ b/platform/src/ssl_stream.cpp @@ -794,7 +794,10 @@ static SSL * upstream_ssl_create(struct ssl_mgr * mgr, const struct ssl_chello * { SSL_set_tlsext_host_name(ssl, chello->sni); } - + if (chello->alpn) + { + SSL_set_alpn_protos(ssl, chello->alpn, strlen(chello->alpn)); + } /* lower memory footprint for idle connections */ SSL_set_mode(ssl, SSL_get_mode(ssl) | SSL_MODE_RELEASE_BUFFERS);