From aa43385ffa9acda2f9a45265bbe8e9213d9a840e Mon Sep 17 00:00:00 2001 From: Sergey Kandaurov Date: Tue, 6 May 2025 15:17:44 +0400 Subject: [PATCH] QUIC: removed ALPN feature test. ALPN support is present in all libraries that have QUIC support, it is safe to compile it unconditionally. --- src/event/quic/ngx_event_quic_ssl.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/event/quic/ngx_event_quic_ssl.c b/src/event/quic/ngx_event_quic_ssl.c index 6ad3c0e93..f255f77a2 100644 --- a/src/event/quic/ngx_event_quic_ssl.c +++ b/src/event/quic/ngx_event_quic_ssl.c @@ -169,16 +169,14 @@ ngx_quic_add_handshake_data(ngx_ssl_conn_t *ssl_conn, 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 @@ ngx_quic_add_handshake_data(ngx_ssl_conn_t *ssl_conn, * 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 @@ ngx_quic_add_handshake_data(ngx_ssl_conn_t *ssl_conn, return 0; } -#endif - SSL_get_peer_quic_transport_params(ssl_conn, &client_params, &client_params_len);