cmake_pop_check_state()
endmacro()
+# Ensure that the OpenSSL fork actually supports QUIC.
+macro(openssl_check_quic)
+ if(NOT DEFINED HAVE_SSL_CTX_SET_QUIC_METHOD)
+ if(USE_OPENSSL)
+ openssl_check_symbol_exists(SSL_CTX_set_quic_method "openssl/ssl.h" HAVE_SSL_CTX_SET_QUIC_METHOD)
+ elseif(USE_WOLFSSL)
+ openssl_check_symbol_exists(wolfSSL_set_quic_method "wolfssl/options.h;wolfssl/openssl/ssl.h" HAVE_SSL_CTX_SET_QUIC_METHOD)
+ endif()
+ endif()
+ if(NOT HAVE_SSL_CTX_SET_QUIC_METHOD)
+ message(FATAL_ERROR "QUIC support is missing in OpenSSL fork. Try setting -DOPENSSL_ROOT_DIR")
+ endif()
+endmacro()
+
if(USE_OPENSSL OR USE_WOLFSSL)
if(NOT DEFINED HAVE_SSL_SET0_WBIO)
openssl_check_symbol_exists(SSL_set0_wbio "openssl/ssl.h" HAVE_SSL_SET0_WBIO)
else()
find_package(NGTCP2 REQUIRED quictls)
endif()
-
- # Be sure that the OpenSSL/wolfSSL library actually supports QUIC.
- if(NOT DEFINED HAVE_SSL_CTX_SET_QUIC_METHOD)
- if(USE_OPENSSL)
- openssl_check_symbol_exists(SSL_CTX_set_quic_method "openssl/ssl.h" HAVE_SSL_CTX_SET_QUIC_METHOD)
- elseif(USE_WOLFSSL)
- openssl_check_symbol_exists(wolfSSL_set_quic_method "wolfssl/options.h;wolfssl/openssl/ssl.h" HAVE_SSL_CTX_SET_QUIC_METHOD)
- endif()
- endif()
- if(NOT HAVE_SSL_CTX_SET_QUIC_METHOD)
- message(FATAL_ERROR "QUIC support is missing in OpenSSL/LibreSSL/BoringSSL/wolfSSL. Try setting -DOPENSSL_ROOT_DIR")
- endif()
+ openssl_check_quic()
elseif(USE_GNUTLS)
find_package(NGTCP2 REQUIRED GnuTLS)
else()
message(FATAL_ERROR "Only one HTTP/3 backend can be selected!")
endif()
find_package(QUICHE REQUIRED)
- CheckQuicSupportInOpenSSL()
+ if(NOT HAVE_BORINGSSL)
+ message(FATAL_ERROR "quiche requires BoringSSL")
+ endif()
+ openssl_check_quic()
set(USE_QUICHE ON)
include_directories(${QUICHE_INCLUDE_DIRS})
list(APPEND CURL_LIBS ${QUICHE_LIBRARIES})