ngtcp2: build with 0.17.0 and nghttp3 0.13.0

- ngtcp2_crypto_openssl was renamed to ngtcp2_crypto_quictls.

Closes #11428
This commit is contained in:
Tatsuhiro Tsujikawa 2023-07-12 18:26:28 +09:00 committed by Daniel Stenberg
parent 993b14900a
commit e0093b4b73
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
4 changed files with 27 additions and 27 deletions

View File

@ -31,7 +31,7 @@ Find the ngtcp2 library
This module accepts optional COMPONENTS to control the crypto library (these are This module accepts optional COMPONENTS to control the crypto library (these are
mutually exclusive):: mutually exclusive)::
OpenSSL: Use libngtcp2_crypto_openssl OpenSSL: Use libngtcp2_crypto_quictls
GnuTLS: Use libngtcp2_crypto_gnutls GnuTLS: Use libngtcp2_crypto_gnutls
Result Variables Result Variables

View File

@ -2947,42 +2947,42 @@ if test X"$want_tcp2" != Xno; then
fi fi
if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1"; then if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1"; then
dnl backup the pre-ngtcp2_crypto_openssl variables dnl backup the pre-ngtcp2_crypto_quictls variables
CLEANLDFLAGS="$LDFLAGS" CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS" CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS" CLEANLIBS="$LIBS"
CURL_CHECK_PKGCONFIG(libngtcp2_crypto_openssl, $want_tcp2_path) CURL_CHECK_PKGCONFIG(libngtcp2_crypto_quictls, $want_tcp2_path)
if test "$PKGCONFIG" != "no" ; then if test "$PKGCONFIG" != "no" ; then
LIB_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) LIB_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-l libngtcp2_crypto_openssl` $PKGCONFIG --libs-only-l libngtcp2_crypto_quictls`
AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_OPENSSL]) AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_QUICTLS])
CPP_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl CPP_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
$PKGCONFIG --cflags-only-I libngtcp2_crypto_openssl` $PKGCONFIG --cflags-only-I libngtcp2_crypto_quictls`
AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_OPENSSL]) AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_QUICTLS])
LD_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) LD_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-L libngtcp2_crypto_openssl` $PKGCONFIG --libs-only-L libngtcp2_crypto_quictls`
AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_OPENSSL]) AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_QUICTLS])
LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_OPENSSL" LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_QUICTLS"
CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_OPENSSL" CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_QUICTLS"
LIBS="$LIB_NGTCP2_CRYPTO_OPENSSL $LIBS" LIBS="$LIB_NGTCP2_CRYPTO_QUICTLS $LIBS"
if test "x$cross_compiling" != "xyes"; then if test "x$cross_compiling" != "xyes"; then
DIR_NGTCP2_CRYPTO_OPENSSL=`echo $LD_NGTCP2_CRYPTO_OPENSSL | $SED -e 's/^-L//'` DIR_NGTCP2_CRYPTO_QUICTLS=`echo $LD_NGTCP2_CRYPTO_QUICTLS | $SED -e 's/^-L//'`
fi fi
AC_CHECK_LIB(ngtcp2_crypto_openssl, ngtcp2_crypto_recv_client_initial_cb, AC_CHECK_LIB(ngtcp2_crypto_quictls, ngtcp2_crypto_recv_client_initial_cb,
[ [
AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h, AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
NGTCP2_ENABLED=1 NGTCP2_ENABLED=1
AC_DEFINE(USE_NGTCP2_CRYPTO_OPENSSL, 1, [if ngtcp2_crypto_openssl is in use]) AC_DEFINE(USE_NGTCP2_CRYPTO_QUICTLS, 1, [if ngtcp2_crypto_quictls is in use])
AC_SUBST(USE_NGTCP2_CRYPTO_OPENSSL, [1]) AC_SUBST(USE_NGTCP2_CRYPTO_QUICTLS, [1])
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_OPENSSL" CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_QUICTLS"
export CURL_LIBRARY_PATH export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_OPENSSL to CURL_LIBRARY_PATH]) AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_QUICTLS to CURL_LIBRARY_PATH])
) )
], ],
dnl not found, revert back to clean variables dnl not found, revert back to clean variables
@ -2992,11 +2992,11 @@ if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1"; then
) )
else else
dnl no ngtcp2_crypto_openssl pkg-config found, deal with it dnl no ngtcp2_crypto_quictls pkg-config found, deal with it
if test X"$want_tcp2" != Xdefault; then if test X"$want_tcp2" != Xdefault; then
dnl To avoid link errors, we do not allow --with-ngtcp2 without dnl To avoid link errors, we do not allow --with-ngtcp2 without
dnl a pkgconfig file dnl a pkgconfig file
AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_openssl pkg-config file.]) AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_quictls pkg-config file.])
fi fi
fi fi
fi fi

View File

@ -239,7 +239,7 @@ ifeq ($(findstring -nghttp3,$(CFG))$(findstring -ngtcp2,$(CFG)),-nghttp3-ngtcp2)
ifneq ($(wildcard $(OPENSSL_INCLUDE)/openssl/aead.h),) ifneq ($(wildcard $(OPENSSL_INCLUDE)/openssl/aead.h),)
NGTCP2_LIBS := -lngtcp2_crypto_boringssl NGTCP2_LIBS := -lngtcp2_crypto_boringssl
else # including libressl else # including libressl
NGTCP2_LIBS := -lngtcp2_crypto_openssl NGTCP2_LIBS := -lngtcp2_crypto_quictls
endif endif
else ifneq ($(findstring -wolfssl,$(CFG)),) else ifneq ($(findstring -wolfssl,$(CFG)),)
NGTCP2_LIBS := -lngtcp2_crypto_wolfssl NGTCP2_LIBS := -lngtcp2_crypto_wolfssl

View File

@ -33,7 +33,7 @@
#ifdef OPENSSL_IS_BORINGSSL #ifdef OPENSSL_IS_BORINGSSL
#include <ngtcp2/ngtcp2_crypto_boringssl.h> #include <ngtcp2/ngtcp2_crypto_boringssl.h>
#else #else
#include <ngtcp2/ngtcp2_crypto_openssl.h> #include <ngtcp2/ngtcp2_crypto_quictls.h>
#endif #endif
#include "vtls/openssl.h" #include "vtls/openssl.h"
#elif defined(USE_GNUTLS) #elif defined(USE_GNUTLS)
@ -407,8 +407,8 @@ static CURLcode quic_ssl_ctx(SSL_CTX **pssl_ctx,
goto out; goto out;
} }
#else #else
if(ngtcp2_crypto_openssl_configure_client_context(ssl_ctx) != 0) { if(ngtcp2_crypto_quictls_configure_client_context(ssl_ctx) != 0) {
failf(data, "ngtcp2_crypto_openssl_configure_client_context failed"); failf(data, "ngtcp2_crypto_quictls_configure_client_context failed");
goto out; goto out;
} }
#endif #endif