Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ngtcp2 #11428

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ngtcp2-gnutls.yml
Expand Up @@ -104,23 +104,23 @@ jobs:
name: 'install gnutls'

- run: |
git clone --quiet --depth=1 -b v0.12.0 https://github.com/ngtcp2/nghttp3
git clone --quiet --depth=1 -b v0.13.0 https://github.com/ngtcp2/nghttp3
cd nghttp3
autoreconf -fi
./configure --prefix=$HOME/all PKG_CONFIG_PATH="$HOME/all/lib/pkgconfig" --enable-lib-only
make install
name: 'install nghttp3'

- run: |
git clone --quiet --depth=1 -b v0.16.0 https://github.com/ngtcp2/ngtcp2
git clone --quiet --depth=1 -b v0.17.0 https://github.com/ngtcp2/ngtcp2
cd ngtcp2
autoreconf -fi
./configure ${{ matrix.build.ngtcp2-configure }} --with-openssl --with-gnutls
make install
name: 'install ngtcp2'

- run: |
git clone --quiet --depth=1 -b v1.54.0 https://github.com/nghttp2/nghttp2
git clone --quiet --depth=1 -b v1.55.0 https://github.com/nghttp2/nghttp2
cd nghttp2
autoreconf -fi
./configure --prefix=$HOME/all PKG_CONFIG_PATH="$HOME/all/lib/pkgconfig" --enable-http3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ngtcp2-quictls.yml
Expand Up @@ -81,23 +81,23 @@ jobs:
name: 'install quictls'

- run: |
git clone --quiet --depth=1 -b v0.12.0 https://github.com/ngtcp2/nghttp3
git clone --quiet --depth=1 -b v0.13.0 https://github.com/ngtcp2/nghttp3
cd nghttp3
autoreconf -fi
./configure --prefix=$HOME/all PKG_CONFIG_PATH="$HOME/all/lib/pkgconfig" --enable-lib-only
make install
name: 'install nghttp3'

- run: |
git clone --quiet --depth=1 -b v0.16.0 https://github.com/ngtcp2/ngtcp2
git clone --quiet --depth=1 -b v0.17.0 https://github.com/ngtcp2/ngtcp2
cd ngtcp2
autoreconf -fi
./configure ${{ matrix.build.ngtcp2-configure }} --with-openssl
make install
name: 'install ngtcp2'

- run: |
git clone --quiet --depth=1 -b v1.54.0 https://github.com/nghttp2/nghttp2
git clone --quiet --depth=1 -b v1.55.0 https://github.com/nghttp2/nghttp2
cd nghttp2
autoreconf -fi
./configure --prefix=$HOME/all PKG_CONFIG_PATH="$HOME/all/lib/pkgconfig" --enable-http3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ngtcp2-wolfssl.yml
Expand Up @@ -92,23 +92,23 @@ jobs:
name: 'install quictls'

- run: |
git clone --quiet --depth=1 -b v0.12.0 https://github.com/ngtcp2/nghttp3
git clone --quiet --depth=1 -b v0.13.0 https://github.com/ngtcp2/nghttp3
cd nghttp3
autoreconf -fi
./configure --prefix=$HOME/all PKG_CONFIG_PATH="$HOME/all/lib/pkgconfig" --enable-lib-only
make install
name: 'install nghttp3'

- run: |
git clone --quiet --depth=1 -b v0.16.0 https://github.com/ngtcp2/ngtcp2
git clone --quiet --depth=1 -b v0.17.0 https://github.com/ngtcp2/ngtcp2
cd ngtcp2
autoreconf -fi
./configure ${{ matrix.build.ngtcp2-configure }} --with-openssl --with-wolfssl
make install
name: 'install ngtcp2'

- run: |
git clone --quiet --depth=1 -b v1.54.0 https://github.com/nghttp2/nghttp2
git clone --quiet --depth=1 -b v1.55.0 https://github.com/nghttp2/nghttp2
cd nghttp2
autoreconf -fi
./configure --prefix=$HOME/all PKG_CONFIG_PATH="$HOME/all/lib/pkgconfig" --enable-http3
Expand Down
2 changes: 1 addition & 1 deletion CMake/FindNGTCP2.cmake
Expand Up @@ -31,7 +31,7 @@ Find the ngtcp2 library
This module accepts optional COMPONENTS to control the crypto library (these are
mutually exclusive)::

OpenSSL: Use libngtcp2_crypto_openssl
OpenSSL: Use libngtcp2_crypto_quictls
GnuTLS: Use libngtcp2_crypto_gnutls

Result Variables
Expand Down
44 changes: 22 additions & 22 deletions configure.ac
Expand Up @@ -2947,42 +2947,42 @@ if test X"$want_tcp2" != Xno; then
fi

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"
CLEANCPPFLAGS="$CPPFLAGS"
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
LIB_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-l libngtcp2_crypto_openssl`
AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_OPENSSL])
LIB_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-l libngtcp2_crypto_quictls`
AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_QUICTLS])

CPP_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
$PKGCONFIG --cflags-only-I libngtcp2_crypto_openssl`
AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_OPENSSL])
CPP_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
$PKGCONFIG --cflags-only-I libngtcp2_crypto_quictls`
AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_QUICTLS])

LD_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-L libngtcp2_crypto_openssl`
AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_OPENSSL])
LD_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --libs-only-L libngtcp2_crypto_quictls`
AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_QUICTLS])

LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_OPENSSL"
CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_OPENSSL"
LIBS="$LIB_NGTCP2_CRYPTO_OPENSSL $LIBS"
LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_QUICTLS"
CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_QUICTLS"
LIBS="$LIB_NGTCP2_CRYPTO_QUICTLS $LIBS"

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
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,
NGTCP2_ENABLED=1
AC_DEFINE(USE_NGTCP2_CRYPTO_OPENSSL, 1, [if ngtcp2_crypto_openssl is in use])
AC_SUBST(USE_NGTCP2_CRYPTO_OPENSSL, [1])
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_OPENSSL"
AC_DEFINE(USE_NGTCP2_CRYPTO_QUICTLS, 1, [if ngtcp2_crypto_quictls is in use])
AC_SUBST(USE_NGTCP2_CRYPTO_QUICTLS, [1])
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_QUICTLS"
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
Expand All @@ -2992,11 +2992,11 @@ if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1"; then
)

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
dnl To avoid link errors, we do not allow --with-ngtcp2 without
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
Expand Down
2 changes: 1 addition & 1 deletion lib/Makefile.mk
Expand Up @@ -239,7 +239,7 @@ ifeq ($(findstring -nghttp3,$(CFG))$(findstring -ngtcp2,$(CFG)),-nghttp3-ngtcp2)
ifneq ($(wildcard $(OPENSSL_INCLUDE)/openssl/aead.h),)
NGTCP2_LIBS := -lngtcp2_crypto_boringssl
else # including libressl
NGTCP2_LIBS := -lngtcp2_crypto_openssl
NGTCP2_LIBS := -lngtcp2_crypto_quictls
endif
else ifneq ($(findstring -wolfssl,$(CFG)),)
NGTCP2_LIBS := -lngtcp2_crypto_wolfssl
Expand Down
6 changes: 3 additions & 3 deletions lib/vquic/curl_ngtcp2.c
Expand Up @@ -33,7 +33,7 @@
#ifdef OPENSSL_IS_BORINGSSL
#include <ngtcp2/ngtcp2_crypto_boringssl.h>
#else
#include <ngtcp2/ngtcp2_crypto_openssl.h>
#include <ngtcp2/ngtcp2_crypto_quictls.h>
#endif
#include "vtls/openssl.h"
#elif defined(USE_GNUTLS)
Expand Down Expand Up @@ -407,8 +407,8 @@ static CURLcode quic_ssl_ctx(SSL_CTX **pssl_ctx,
goto out;
}
#else
if(ngtcp2_crypto_openssl_configure_client_context(ssl_ctx) != 0) {
failf(data, "ngtcp2_crypto_openssl_configure_client_context failed");
if(ngtcp2_crypto_quictls_configure_client_context(ssl_ctx) != 0) {
failf(data, "ngtcp2_crypto_quictls_configure_client_context failed");
goto out;
}
#endif
Expand Down