changeset 9403:46342a9e2972

QUIC: removed ALPN feature test. ALPN support is present in all libraries that have QUIC support, it is safe to compile it unconditionally.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 06 May 2025 15:17:44 +0400
parents 327fb29d07ba
children bc8c07956f34
files src/event/quic/ngx_event_quic_ssl.c
diffstat 1 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_ssl.c	Tue May 06 15:53:49 2025 +0400
+++ b/src/event/quic/ngx_event_quic_ssl.c	Tue May 06 15:17:44 2025 +0400
@@ -169,16 +169,14 @@
     u_char                 *p, *end;
     size_t                  client_params_len;
     ngx_chain_t            *out;
+    unsigned int            alpn_len;
     const uint8_t          *client_params;
     ngx_quic_tp_t           ctp;
     ngx_quic_frame_t       *frame;
     ngx_connection_t       *c;
+    const unsigned char    *alpn_data;
     ngx_quic_send_ctx_t    *ctx;
     ngx_quic_connection_t  *qc;
-#if defined(TLSEXT_TYPE_application_layer_protocol_negotiation)
-    unsigned int            alpn_len;
-    const unsigned char    *alpn_data;
-#endif
 
     c = ngx_ssl_get_connection(ssl_conn);
     qc = ngx_quic_get_connection(c);
@@ -193,8 +191,6 @@
          * here;
          */
 
-#if defined(TLSEXT_TYPE_application_layer_protocol_negotiation)
-
         SSL_get0_alpn_selected(ssl_conn, &alpn_data, &alpn_len);
 
         if (alpn_len == 0) {
@@ -206,8 +202,6 @@
             return 0;
         }
 
-#endif
-
         SSL_get_peer_quic_transport_params(ssl_conn, &client_params,
                                            &client_params_len);