diff src/event/ngx_event_quic.c @ 7998:f537f99b86ee quic

QUIC: do not verify the selected ALPN protocol. The right protocol is selected by the HTTP code. In the QUIC code only verify that some protocol was selected and trigger an error otherwise.
author Roman Arutyunyan <arut@nginx.com>
date Sat, 18 Jul 2020 00:08:04 +0300
parents b250b515e5b6
children 0d2b2664b41c
line wrap: on
line diff
--- a/src/event/ngx_event_quic.c
+++ b/src/event/ngx_event_quic.c
@@ -417,9 +417,7 @@ ngx_quic_add_handshake_data(ngx_ssl_conn
 
         SSL_get0_alpn_selected(c->ssl->connection, &data, &len);
 
-        if (len != NGX_QUIC_ALPN_LEN
-            || ngx_strncmp(data, NGX_QUIC_ALPN_STR, NGX_QUIC_ALPN_LEN) != 0)
-        {
+        if (len == 0) {
             qc->error = 0x100 + SSL_AD_NO_APPLICATION_PROTOCOL;
             qc->error_reason = "unsupported protocol in ALPN extension";