summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2023-05-23 00:45:18 +0400
committerSergey Kandaurov <pluknet@nginx.com>2023-05-23 00:45:18 +0400
commit05990c6bb0c11710c10639e7332726446a643a8c (patch)
treeb7235f1b508c449f19bda849fe6f248f3952ab0a
parent5ac9da4577d59f88032fcfde31b0b6a9ea9a88bd (diff)
QUIC: fixed OpenSSL compat layer with OpenSSL master branch.
The layer is enabled as a fallback if the QUIC support is configured and the BoringSSL API wasn't detected, or when using the --with-openssl option, also compatible with QuicTLS and LibreSSL. For the latter, the layer is assumed to be present if QUIC was requested, so it needs to be undefined to prevent QUIC API redefinition as appropriate. A previously used approach to test the TLSEXT_TYPE_quic_transport_parameters macro doesn't work with OpenSSL 3.2 master branch where this macro appeared with incompatible QUIC API. To fix the build there, the test is revised to pass only for QuicTLS and LibreSSL.
-rw-r--r--src/event/quic/ngx_event_quic_openssl_compat.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/event/quic/ngx_event_quic_openssl_compat.h b/src/event/quic/ngx_event_quic_openssl_compat.h
index d9800517c..b04f6e0b5 100644
--- a/src/event/quic/ngx_event_quic_openssl_compat.h
+++ b/src/event/quic/ngx_event_quic_openssl_compat.h
@@ -7,7 +7,8 @@
#ifndef _NGX_EVENT_QUIC_OPENSSL_COMPAT_H_INCLUDED_
#define _NGX_EVENT_QUIC_OPENSSL_COMPAT_H_INCLUDED_
-#ifdef TLSEXT_TYPE_quic_transport_parameters
+#if defined SSL_R_MISSING_QUIC_TRANSPORT_PARAMETERS_EXTENSION \
+ || defined LIBRESSL_VERSION_NUMBER
#undef NGX_QUIC_OPENSSL_COMPAT
#else