mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-06 18:18:52 +08:00
Bump ngtcp2
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -8,9 +8,9 @@ env:
|
|||||||
LIBBPF_VERSION: v1.2.0
|
LIBBPF_VERSION: v1.2.0
|
||||||
OPENSSL1_VERSION: 1_1_1u+quic
|
OPENSSL1_VERSION: 1_1_1u+quic
|
||||||
OPENSSL3_VERSION: 3.1.0+quic
|
OPENSSL3_VERSION: 3.1.0+quic
|
||||||
BORINGSSL_VERSION: b0341041b03ea71d8371a9692aedae263fc06ee9
|
BORINGSSL_VERSION: 80dcb67d4481fb1194b9669917e35580c32dc388
|
||||||
NGHTTP3_VERSION: v0.12.0
|
NGHTTP3_VERSION: v0.13.0
|
||||||
NGTCP2_VERSION: v0.16.0
|
NGTCP2_VERSION: v0.17.0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-cache:
|
build-cache:
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ find_package(Libev 4.11)
|
|||||||
find_package(Libcares 1.7.5)
|
find_package(Libcares 1.7.5)
|
||||||
find_package(ZLIB 1.2.3)
|
find_package(ZLIB 1.2.3)
|
||||||
find_package(Libngtcp2 0.0.0)
|
find_package(Libngtcp2 0.0.0)
|
||||||
find_package(Libngtcp2_crypto_openssl 0.0.0)
|
find_package(Libngtcp2_crypto_quictls 0.0.0)
|
||||||
if(LIBNGTCP2_CRYPTO_OPENSSL_FOUND)
|
if(LIBNGTCP2_CRYPTO_QUICTLS_FOUND)
|
||||||
set(HAVE_LIBNGTCP2_CRYPTO_OPENSSL 1)
|
set(HAVE_LIBNGTCP2_CRYPTO_QUICTLS 1)
|
||||||
endif()
|
endif()
|
||||||
find_package(Libnghttp3 0.0.0)
|
find_package(Libnghttp3 0.0.0)
|
||||||
if(WITH_LIBBPF)
|
if(WITH_LIBBPF)
|
||||||
@@ -238,9 +238,9 @@ if(ENABLE_APP AND NOT (ZLIB_FOUND AND OPENSSL_FOUND AND LIBEV_FOUND))
|
|||||||
message(FATAL_ERROR "Applications were requested (ENABLE_APP=1) but dependencies are not met.")
|
message(FATAL_ERROR "Applications were requested (ENABLE_APP=1) but dependencies are not met.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# HTTP/3 requires quictls/openssl, libngtcp2, libngtcp2_crypto_openssl
|
# HTTP/3 requires quictls/openssl, libngtcp2, libngtcp2_crypto_quictls
|
||||||
# and libnghttp3.
|
# and libnghttp3.
|
||||||
if(ENABLE_HTTP3 AND NOT (HAVE_SSL_IS_QUIC AND LIBNGTCP2_FOUND AND LIBNGTCP2_CRYPTO_OPENSSL_FOUND AND LIBNGHTTP3_FOUND))
|
if(ENABLE_HTTP3 AND NOT (HAVE_SSL_IS_QUIC AND LIBNGTCP2_FOUND AND LIBNGTCP2_CRYPTO_QUICTLS_FOUND AND LIBNGHTTP3_FOUND))
|
||||||
message(FATAL_ERROR "HTTP/3 was requested (ENABLE_HTTP3=1) but dependencies are not met.")
|
message(FATAL_ERROR "HTTP/3 was requested (ENABLE_HTTP3=1) but dependencies are not met.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -513,7 +513,7 @@ message(STATUS "summary of build options:
|
|||||||
Libev: ${HAVE_LIBEV} (LIBS='${LIBEV_LIBRARIES}')
|
Libev: ${HAVE_LIBEV} (LIBS='${LIBEV_LIBRARIES}')
|
||||||
Libc-ares: ${HAVE_LIBCARES} (LIBS='${LIBCARES_LIBRARIES}')
|
Libc-ares: ${HAVE_LIBCARES} (LIBS='${LIBCARES_LIBRARIES}')
|
||||||
Libngtcp2: ${HAVE_LIBNGTCP2} (LIBS='${LIBNGTCP2_LIBRARIES}')
|
Libngtcp2: ${HAVE_LIBNGTCP2} (LIBS='${LIBNGTCP2_LIBRARIES}')
|
||||||
Libngtcp2_crypto_openssl: ${HAVE_LIBNGTCP2_CRYPTO_OPENSSL} (LIBS='${LIBNGTCP2_CRYPTO_OPENSSL_LIBRARIES}')
|
Libngtcp2_crypto_quictls: ${HAVE_LIBNGTCP2_CRYPTO_QUICTLS} (LIBS='${LIBNGTCP2_CRYPTO_QUICTLS_LIBRARIES}')
|
||||||
Libnghttp3: ${HAVE_LIBNGHTTP3} (LIBS='${LIBNGHTTP3_LIBRARIES}')
|
Libnghttp3: ${HAVE_LIBNGHTTP3} (LIBS='${LIBNGHTTP3_LIBRARIES}')
|
||||||
Libbpf: ${HAVE_LIBBPF} (LIBS='${LIBBPF_LIBRARIES}')
|
Libbpf: ${HAVE_LIBBPF} (LIBS='${LIBBPF_LIBRARIES}')
|
||||||
Libevent(SSL): ${HAVE_LIBEVENT_OPENSSL} (LIBS='${LIBEVENT_OPENSSL_LIBRARIES}')
|
Libevent(SSL): ${HAVE_LIBEVENT_OPENSSL} (LIBS='${LIBEVENT_OPENSSL_LIBRARIES}')
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ EXTRA_DIST = nghttpx.conf.sample proxy.pac.sample android-config android-env \
|
|||||||
cmake/FindLibbpf.cmake \
|
cmake/FindLibbpf.cmake \
|
||||||
cmake/FindLibnghttp3.cmake \
|
cmake/FindLibnghttp3.cmake \
|
||||||
cmake/FindLibngtcp2.cmake \
|
cmake/FindLibngtcp2.cmake \
|
||||||
cmake/FindLibngtcp2_crypto_openssl.cmake
|
cmake/FindLibngtcp2_crypto_quictls.cmake
|
||||||
|
|
||||||
.PHONY: clang-format
|
.PHONY: clang-format
|
||||||
|
|
||||||
|
|||||||
@@ -130,8 +130,8 @@ following libraries are required:
|
|||||||
<https://github.com/quictls/openssl/tree/OpenSSL_1_1_1u+quic>`_; or
|
<https://github.com/quictls/openssl/tree/OpenSSL_1_1_1u+quic>`_; or
|
||||||
`BoringSSL <https://boringssl.googlesource.com/boringssl/>`_ (commit
|
`BoringSSL <https://boringssl.googlesource.com/boringssl/>`_ (commit
|
||||||
b0341041b03ea71d8371a9692aedae263fc06ee9)
|
b0341041b03ea71d8371a9692aedae263fc06ee9)
|
||||||
* `ngtcp2 <https://github.com/ngtcp2/ngtcp2>`_ 0.16.x
|
* `ngtcp2 <https://github.com/ngtcp2/ngtcp2>`_ 0.17.x
|
||||||
* `nghttp3 <https://github.com/ngtcp2/nghttp3>`_ 0.12.x
|
* `nghttp3 <https://github.com/ngtcp2/nghttp3>`_ 0.13.x
|
||||||
|
|
||||||
Use ``--enable-http3`` configure option to enable HTTP/3 feature for
|
Use ``--enable-http3`` configure option to enable HTTP/3 feature for
|
||||||
h2load and nghttpx.
|
h2load and nghttpx.
|
||||||
@@ -354,7 +354,7 @@ Build nghttp3:
|
|||||||
|
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
$ git clone --depth 1 -b v0.12.0 https://github.com/ngtcp2/nghttp3
|
$ git clone --depth 1 -b v0.13.0 https://github.com/ngtcp2/nghttp3
|
||||||
$ cd nghttp3
|
$ cd nghttp3
|
||||||
$ autoreconf -i
|
$ autoreconf -i
|
||||||
$ ./configure --prefix=$PWD/build --enable-lib-only
|
$ ./configure --prefix=$PWD/build --enable-lib-only
|
||||||
@@ -366,7 +366,7 @@ Build ngtcp2:
|
|||||||
|
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
$ git clone --depth 1 -b v0.16.0 https://github.com/ngtcp2/ngtcp2
|
$ git clone --depth 1 -b v0.17.0 https://github.com/ngtcp2/ngtcp2
|
||||||
$ cd ngtcp2
|
$ cd ngtcp2
|
||||||
$ autoreconf -i
|
$ autoreconf -i
|
||||||
$ ./configure --prefix=$PWD/build --enable-lib-only \
|
$ ./configure --prefix=$PWD/build --enable-lib-only \
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
# - Try to find libngtcp2_crypto_openssl
|
|
||||||
# Once done this will define
|
|
||||||
# LIBNGTCP2_CRYPTO_OPENSSL_FOUND - System has libngtcp2_crypto_openssl
|
|
||||||
# LIBNGTCP2_CRYPTO_OPENSSL_INCLUDE_DIRS - The libngtcp2_crypto_openssl include directories
|
|
||||||
# LIBNGTCP2_CRYPTO_OPENSSL_LIBRARIES - The libraries needed to use libngtcp2_crypto_openssl
|
|
||||||
|
|
||||||
find_package(PkgConfig QUIET)
|
|
||||||
pkg_check_modules(PC_LIBNGTCP2_CRYPTO_OPENSSL QUIET libngtcp2_crypto_openssl)
|
|
||||||
|
|
||||||
find_path(LIBNGTCP2_CRYPTO_OPENSSL_INCLUDE_DIR
|
|
||||||
NAMES ngtcp2/ngtcp2_crypto_openssl.h
|
|
||||||
HINTS ${PC_LIBNGTCP2_CRYPTO_OPENSSL_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
find_library(LIBNGTCP2_CRYPTO_OPENSSL_LIBRARY
|
|
||||||
NAMES ngtcp2_crypto_openssl
|
|
||||||
HINTS ${PC_LIBNGTCP2_CRYPTO_OPENSSL_LIBRARY_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
if(LIBNGTCP2_CRYPTO_OPENSSL_INCLUDE_DIR)
|
|
||||||
set(_version_regex "^#define[ \t]+NGTCP2_VERSION[ \t]+\"([^\"]+)\".*")
|
|
||||||
file(STRINGS "${LIBNGTCP2_CRYPTO_OPENSSL_INCLUDE_DIR}/ngtcp2/version.h"
|
|
||||||
LIBNGTCP2_CRYPTO_OPENSSL_VERSION REGEX "${_version_regex}")
|
|
||||||
string(REGEX REPLACE "${_version_regex}" "\\1"
|
|
||||||
LIBNGTCP2_CRYPTO_OPENSSL_VERSION "${LIBNGTCP2_CRYPTO_OPENSSL_VERSION}")
|
|
||||||
unset(_version_regex)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set
|
|
||||||
# LIBNGTCP2_CRYPTO_OPENSSL_FOUND to TRUE if all listed variables are
|
|
||||||
# TRUE and the requested version matches.
|
|
||||||
find_package_handle_standard_args(Libngtcp2_crypto_openssl REQUIRED_VARS
|
|
||||||
LIBNGTCP2_CRYPTO_OPENSSL_LIBRARY
|
|
||||||
LIBNGTCP2_CRYPTO_OPENSSL_INCLUDE_DIR
|
|
||||||
VERSION_VAR LIBNGTCP2_CRYPTO_OPENSSL_VERSION)
|
|
||||||
|
|
||||||
if(LIBNGTCP2_CRYPTO_OPENSSL_FOUND)
|
|
||||||
set(LIBNGTCP2_CRYPTO_OPENSSL_LIBRARIES ${LIBNGTCP2_CRYPTO_OPENSSL_LIBRARY})
|
|
||||||
set(LIBNGTCP2_CRYPTO_OPENSSL_INCLUDE_DIRS ${LIBNGTCP2_CRYPTO_OPENSSL_INCLUDE_DIR})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
mark_as_advanced(LIBNGTCP2_CRYPTO_OPENSSL_INCLUDE_DIR
|
|
||||||
LIBNGTCP2_CRYPTO_OPENSSL_LIBRARY)
|
|
||||||
43
cmake/FindLibngtcp2_crypto_quictls.cmake
Normal file
43
cmake/FindLibngtcp2_crypto_quictls.cmake
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# - Try to find libngtcp2_crypto_quictls
|
||||||
|
# Once done this will define
|
||||||
|
# LIBNGTCP2_CRYPTO_QUICTLS_FOUND - System has libngtcp2_crypto_quictls
|
||||||
|
# LIBNGTCP2_CRYPTO_QUICTLS_INCLUDE_DIRS - The libngtcp2_crypto_quictls include directories
|
||||||
|
# LIBNGTCP2_CRYPTO_QUICTLS_LIBRARIES - The libraries needed to use libngtcp2_crypto_quictls
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_check_modules(PC_LIBNGTCP2_CRYPTO_QUICTLS QUIET libngtcp2_crypto_quictls)
|
||||||
|
|
||||||
|
find_path(LIBNGTCP2_CRYPTO_QUICTLS_INCLUDE_DIR
|
||||||
|
NAMES ngtcp2/ngtcp2_crypto_quictls.h
|
||||||
|
HINTS ${PC_LIBNGTCP2_CRYPTO_QUICTLS_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
find_library(LIBNGTCP2_CRYPTO_QUICTLS_LIBRARY
|
||||||
|
NAMES ngtcp2_crypto_quictls
|
||||||
|
HINTS ${PC_LIBNGTCP2_CRYPTO_QUICTLS_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(LIBNGTCP2_CRYPTO_QUICTLS_INCLUDE_DIR)
|
||||||
|
set(_version_regex "^#define[ \t]+NGTCP2_VERSION[ \t]+\"([^\"]+)\".*")
|
||||||
|
file(STRINGS "${LIBNGTCP2_CRYPTO_QUICTLS_INCLUDE_DIR}/ngtcp2/version.h"
|
||||||
|
LIBNGTCP2_CRYPTO_QUICTLS_VERSION REGEX "${_version_regex}")
|
||||||
|
string(REGEX REPLACE "${_version_regex}" "\\1"
|
||||||
|
LIBNGTCP2_CRYPTO_QUICTLS_VERSION "${LIBNGTCP2_CRYPTO_QUICTLS_VERSION}")
|
||||||
|
unset(_version_regex)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set
|
||||||
|
# LIBNGTCP2_CRYPTO_QUICTLS_FOUND to TRUE if all listed variables are
|
||||||
|
# TRUE and the requested version matches.
|
||||||
|
find_package_handle_standard_args(Libngtcp2_crypto_quictls REQUIRED_VARS
|
||||||
|
LIBNGTCP2_CRYPTO_QUICTLS_LIBRARY
|
||||||
|
LIBNGTCP2_CRYPTO_QUICTLS_INCLUDE_DIR
|
||||||
|
VERSION_VAR LIBNGTCP2_CRYPTO_QUICTLS_VERSION)
|
||||||
|
|
||||||
|
if(LIBNGTCP2_CRYPTO_QUICTLS_FOUND)
|
||||||
|
set(LIBNGTCP2_CRYPTO_QUICTLS_LIBRARIES ${LIBNGTCP2_CRYPTO_QUICTLS_LIBRARY})
|
||||||
|
set(LIBNGTCP2_CRYPTO_QUICTLS_INCLUDE_DIRS ${LIBNGTCP2_CRYPTO_QUICTLS_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(LIBNGTCP2_CRYPTO_QUICTLS_INCLUDE_DIR
|
||||||
|
LIBNGTCP2_CRYPTO_QUICTLS_LIBRARY)
|
||||||
@@ -88,8 +88,8 @@
|
|||||||
/* Define to 1 if you have enum bpf_stats_type in linux/bpf.h. */
|
/* Define to 1 if you have enum bpf_stats_type in linux/bpf.h. */
|
||||||
#cmakedefine HAVE_BPF_STATS_TYPE 1
|
#cmakedefine HAVE_BPF_STATS_TYPE 1
|
||||||
|
|
||||||
/* Define to 1 if you have `libngtcp2_crypto_openssl` library. */
|
/* Define to 1 if you have `libngtcp2_crypto_quictls` library. */
|
||||||
#cmakedefine HAVE_LIBNGTCP2_CRYPTO_OPENSSL
|
#cmakedefine HAVE_LIBNGTCP2_CRYPTO_QUICTLS
|
||||||
|
|
||||||
/* Define to 1 if you have `libev` library. */
|
/* Define to 1 if you have `libev` library. */
|
||||||
#cmakedefine HAVE_LIBEV 1
|
#cmakedefine HAVE_LIBEV 1
|
||||||
|
|||||||
32
configure.ac
32
configure.ac
@@ -508,7 +508,7 @@ fi
|
|||||||
# ngtcp2 (for src)
|
# ngtcp2 (for src)
|
||||||
have_libngtcp2=no
|
have_libngtcp2=no
|
||||||
if test "x${request_libngtcp2}" != "xno"; then
|
if test "x${request_libngtcp2}" != "xno"; then
|
||||||
PKG_CHECK_MODULES([LIBNGTCP2], [libngtcp2 >= 0.16.0], [have_libngtcp2=yes],
|
PKG_CHECK_MODULES([LIBNGTCP2], [libngtcp2 >= 0.17.0], [have_libngtcp2=yes],
|
||||||
[have_libngtcp2=no])
|
[have_libngtcp2=no])
|
||||||
if test "x${have_libngtcp2}" = "xno"; then
|
if test "x${have_libngtcp2}" = "xno"; then
|
||||||
AC_MSG_NOTICE($LIBNGTCP2_PKG_ERRORS)
|
AC_MSG_NOTICE($LIBNGTCP2_PKG_ERRORS)
|
||||||
@@ -520,26 +520,26 @@ if test "x${request_libngtcp2}" = "xyes" &&
|
|||||||
AC_MSG_ERROR([libngtcp2 was requested (--with-libngtcp2) but not found])
|
AC_MSG_ERROR([libngtcp2 was requested (--with-libngtcp2) but not found])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ngtcp2_crypto_openssl (for src)
|
# ngtcp2_crypto_quictls (for src)
|
||||||
have_libngtcp2_crypto_openssl=no
|
have_libngtcp2_crypto_quictls=no
|
||||||
if test "x${have_ssl_is_quic}" = "xyes" &&
|
if test "x${have_ssl_is_quic}" = "xyes" &&
|
||||||
test "x${request_libngtcp2}" != "xno"; then
|
test "x${request_libngtcp2}" != "xno"; then
|
||||||
PKG_CHECK_MODULES([LIBNGTCP2_CRYPTO_OPENSSL],
|
PKG_CHECK_MODULES([LIBNGTCP2_CRYPTO_QUICTLS],
|
||||||
[libngtcp2_crypto_openssl >= 0.16.0],
|
[libngtcp2_crypto_quictls >= 0.17.0],
|
||||||
[have_libngtcp2_crypto_openssl=yes],
|
[have_libngtcp2_crypto_quictls=yes],
|
||||||
[have_libngtcp2_crypto_openssl=no])
|
[have_libngtcp2_crypto_quictls=no])
|
||||||
if test "x${have_libngtcp2_crypto_openssl}" = "xno"; then
|
if test "x${have_libngtcp2_crypto_quictls}" = "xno"; then
|
||||||
AC_MSG_NOTICE($LIBNGTCP2_CRYPTO_OPENSSL_PKG_ERRORS)
|
AC_MSG_NOTICE($LIBNGTCP2_CRYPTO_QUICTLS_PKG_ERRORS)
|
||||||
else
|
else
|
||||||
AC_DEFINE([HAVE_LIBNGTCP2_CRYPTO_OPENSSL], [1],
|
AC_DEFINE([HAVE_LIBNGTCP2_CRYPTO_QUICTLS], [1],
|
||||||
[Define to 1 if you have `libngtcp2_crypto_openssl` library.])
|
[Define to 1 if you have `libngtcp2_crypto_quictls` library.])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x${have_ssl_is_quic}" = "xyes" &&
|
if test "x${have_ssl_is_quic}" = "xyes" &&
|
||||||
test "x${request_libngtcp2}" = "xyes" &&
|
test "x${request_libngtcp2}" = "xyes" &&
|
||||||
test "x${have_libngtcp2_crypto_openssl}" != "xyes"; then
|
test "x${have_libngtcp2_crypto_quictls}" != "xyes"; then
|
||||||
AC_MSG_ERROR([libngtcp2_crypto_openssl was requested (--with-libngtcp2) but not found])
|
AC_MSG_ERROR([libngtcp2_crypto_quictls was requested (--with-libngtcp2) but not found])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ngtcp2_crypto_boringssl (for src)
|
# ngtcp2_crypto_boringssl (for src)
|
||||||
@@ -567,7 +567,7 @@ fi
|
|||||||
# nghttp3 (for src)
|
# nghttp3 (for src)
|
||||||
have_libnghttp3=no
|
have_libnghttp3=no
|
||||||
if test "x${request_libnghttp3}" != "xno"; then
|
if test "x${request_libnghttp3}" != "xno"; then
|
||||||
PKG_CHECK_MODULES([LIBNGHTTP3], [libnghttp3 >= 0.12.0], [have_libnghttp3=yes],
|
PKG_CHECK_MODULES([LIBNGHTTP3], [libnghttp3 >= 0.13.0], [have_libnghttp3=yes],
|
||||||
[have_libnghttp3=no])
|
[have_libnghttp3=no])
|
||||||
if test "x${have_libnghttp3}" = "xno"; then
|
if test "x${have_libnghttp3}" = "xno"; then
|
||||||
AC_MSG_NOTICE($LIBNGHTTP3_PKG_ERRORS)
|
AC_MSG_NOTICE($LIBNGHTTP3_PKG_ERRORS)
|
||||||
@@ -755,7 +755,7 @@ if test "x${request_http3}" != "xno" &&
|
|||||||
(test "x${have_ssl_is_quic}" = "xyes" ||
|
(test "x${have_ssl_is_quic}" = "xyes" ||
|
||||||
test "x${have_boringssl_quic}" = "xyes") &&
|
test "x${have_boringssl_quic}" = "xyes") &&
|
||||||
test "x${have_libngtcp2}" = "xyes" &&
|
test "x${have_libngtcp2}" = "xyes" &&
|
||||||
(test "x${have_libngtcp2_crypto_openssl}" = "xyes" ||
|
(test "x${have_libngtcp2_crypto_quictls}" = "xyes" ||
|
||||||
test "x${have_libngtcp2_crypto_boringssl}" = "xyes") &&
|
test "x${have_libngtcp2_crypto_boringssl}" = "xyes") &&
|
||||||
test "x${have_libnghttp3}" = "xyes"; then
|
test "x${have_libnghttp3}" = "xyes"; then
|
||||||
enable_http3=yes
|
enable_http3=yes
|
||||||
@@ -1144,7 +1144,7 @@ AC_MSG_NOTICE([summary of build options:
|
|||||||
Libev: ${have_libev} (CFLAGS='${LIBEV_CFLAGS}' LIBS='${LIBEV_LIBS}')
|
Libev: ${have_libev} (CFLAGS='${LIBEV_CFLAGS}' LIBS='${LIBEV_LIBS}')
|
||||||
Libc-ares: ${have_libcares} (CFLAGS='${LIBCARES_CFLAGS}' LIBS='${LIBCARES_LIBS}')
|
Libc-ares: ${have_libcares} (CFLAGS='${LIBCARES_CFLAGS}' LIBS='${LIBCARES_LIBS}')
|
||||||
libngtcp2: ${have_libngtcp2} (CFLAGS='${LIBNGTCP2_CFLAGS}' LIBS='${LIBNGTCP2_LIBS}')
|
libngtcp2: ${have_libngtcp2} (CFLAGS='${LIBNGTCP2_CFLAGS}' LIBS='${LIBNGTCP2_LIBS}')
|
||||||
libngtcp2_crypto_openssl: ${have_libngtcp2_crypto_openssl} (CFLAGS='${LIBNGTCP2_CRYPTO_OPENSSL_CFLAGS}' LIBS='${LIBNGTCP2_CRYPTO_OPENSSL_LIBS}')
|
libngtcp2_crypto_quictls: ${have_libngtcp2_crypto_quictls} (CFLAGS='${LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS}' LIBS='${LIBNGTCP2_CRYPTO_QUICTLS_LIBS}')
|
||||||
libngtcp2_crypto_boringssl: ${have_libngtcp2_crypto_boringssl} (CFLAGS='${LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS}' LIBS='${LIBNGTCP2_CRYPTO_BORINGSSL_LIBS}')
|
libngtcp2_crypto_boringssl: ${have_libngtcp2_crypto_boringssl} (CFLAGS='${LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS}' LIBS='${LIBNGTCP2_CRYPTO_BORINGSSL_LIBS}')
|
||||||
libnghttp3: ${have_libnghttp3} (CFLAGS='${LIBNGHTTP3_CFLAGS}' LIBS='${LIBNGHTTP3_LIBS}')
|
libnghttp3: ${have_libnghttp3} (CFLAGS='${LIBNGHTTP3_CFLAGS}' LIBS='${LIBNGHTTP3_LIBS}')
|
||||||
libbpf: ${have_libbpf} (CFLAGS='${LIBBPF_CFLAGS}' LIBS='${LIBBPF_LIBS}')
|
libbpf: ${have_libbpf} (CFLAGS='${LIBBPF_CFLAGS}' LIBS='${LIBBPF_LIBS}')
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ RUN git clone --depth 1 -b OpenSSL_1_1_1u+quic https://github.com/quictls/openss
|
|||||||
cd .. && \
|
cd .. && \
|
||||||
rm -rf openssl
|
rm -rf openssl
|
||||||
|
|
||||||
RUN git clone --depth 1 -b v0.12.0 https://github.com/ngtcp2/nghttp3 && \
|
RUN git clone --depth 1 -b v0.13.0 https://github.com/ngtcp2/nghttp3 && \
|
||||||
cd nghttp3 && \
|
cd nghttp3 && \
|
||||||
autoreconf -i && \
|
autoreconf -i && \
|
||||||
./configure --enable-lib-only && \
|
./configure --enable-lib-only && \
|
||||||
@@ -24,7 +24,7 @@ RUN git clone --depth 1 -b v0.12.0 https://github.com/ngtcp2/nghttp3 && \
|
|||||||
cd .. && \
|
cd .. && \
|
||||||
rm -rf nghttp3
|
rm -rf nghttp3
|
||||||
|
|
||||||
RUN git clone --depth 1 -b v0.16.0 https://github.com/ngtcp2/ngtcp2 && \
|
RUN git clone --depth 1 -b v0.17.0 https://github.com/ngtcp2/ngtcp2 && \
|
||||||
cd ngtcp2 && \
|
cd ngtcp2 && \
|
||||||
autoreconf -i && \
|
autoreconf -i && \
|
||||||
./configure --enable-lib-only \
|
./configure --enable-lib-only \
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ include_directories(
|
|||||||
${LIBEV_INCLUDE_DIRS}
|
${LIBEV_INCLUDE_DIRS}
|
||||||
${LIBNGHTTP3_INCLUDE_DIRS}
|
${LIBNGHTTP3_INCLUDE_DIRS}
|
||||||
${LIBNGTCP2_INCLUDE_DIRS}
|
${LIBNGTCP2_INCLUDE_DIRS}
|
||||||
${LIBNGTCP2_CRYPTO_OPENSSL_INCLUDE_DIRS}
|
${LIBNGTCP2_CRYPTO_QUICTLS_INCLUDE_DIRS}
|
||||||
${OPENSSL_INCLUDE_DIRS}
|
${OPENSSL_INCLUDE_DIRS}
|
||||||
${LIBCARES_INCLUDE_DIRS}
|
${LIBCARES_INCLUDE_DIRS}
|
||||||
${JANSSON_INCLUDE_DIRS}
|
${JANSSON_INCLUDE_DIRS}
|
||||||
@@ -31,7 +31,7 @@ link_libraries(
|
|||||||
${LIBEV_LIBRARIES}
|
${LIBEV_LIBRARIES}
|
||||||
${LIBNGHTTP3_LIBRARIES}
|
${LIBNGHTTP3_LIBRARIES}
|
||||||
${LIBNGTCP2_LIBRARIES}
|
${LIBNGTCP2_LIBRARIES}
|
||||||
${LIBNGTCP2_CRYPTO_OPENSSL_LIBRARIES}
|
${LIBNGTCP2_CRYPTO_QUICTLS_LIBRARIES}
|
||||||
${OPENSSL_LIBRARIES}
|
${OPENSSL_LIBRARIES}
|
||||||
${LIBCARES_LIBRARIES}
|
${LIBCARES_LIBRARIES}
|
||||||
${JANSSON_LIBRARIES}
|
${JANSSON_LIBRARIES}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ AM_CPPFLAGS = \
|
|||||||
@LIBXML2_CFLAGS@ \
|
@LIBXML2_CFLAGS@ \
|
||||||
@LIBEV_CFLAGS@ \
|
@LIBEV_CFLAGS@ \
|
||||||
@LIBNGHTTP3_CFLAGS@ \
|
@LIBNGHTTP3_CFLAGS@ \
|
||||||
@LIBNGTCP2_CRYPTO_OPENSSL_CFLAGS@ \
|
@LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS@ \
|
||||||
@LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS@ \
|
@LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS@ \
|
||||||
@LIBNGTCP2_CFLAGS@ \
|
@LIBNGTCP2_CFLAGS@ \
|
||||||
@OPENSSL_CFLAGS@ \
|
@OPENSSL_CFLAGS@ \
|
||||||
@@ -64,7 +64,7 @@ LDADD = $(top_builddir)/lib/libnghttp2.la \
|
|||||||
@LIBXML2_LIBS@ \
|
@LIBXML2_LIBS@ \
|
||||||
@LIBEV_LIBS@ \
|
@LIBEV_LIBS@ \
|
||||||
@LIBNGHTTP3_LIBS@ \
|
@LIBNGHTTP3_LIBS@ \
|
||||||
@LIBNGTCP2_CRYPTO_OPENSSL_LIBS@ \
|
@LIBNGTCP2_CRYPTO_QUICTLS_LIBS@ \
|
||||||
@LIBNGTCP2_CRYPTO_BORINGSSL_LIBS@ \
|
@LIBNGTCP2_CRYPTO_BORINGSSL_LIBS@ \
|
||||||
@LIBNGTCP2_LIBS@ \
|
@LIBNGTCP2_LIBS@ \
|
||||||
@OPENSSL_LIBS@ \
|
@OPENSSL_LIBS@ \
|
||||||
|
|||||||
@@ -51,9 +51,9 @@
|
|||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
|
|
||||||
#ifdef ENABLE_HTTP3
|
#ifdef ENABLE_HTTP3
|
||||||
# ifdef HAVE_LIBNGTCP2_CRYPTO_OPENSSL
|
# ifdef HAVE_LIBNGTCP2_CRYPTO_QUICTLS
|
||||||
# include <ngtcp2/ngtcp2_crypto_openssl.h>
|
# include <ngtcp2/ngtcp2_crypto_quictls.h>
|
||||||
# endif // HAVE_LIBNGTCP2_CRYPTO_OPENSSL
|
# endif // HAVE_LIBNGTCP2_CRYPTO_QUICTLS
|
||||||
# ifdef HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
# ifdef HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
||||||
# include <ngtcp2/ngtcp2_crypto_boringssl.h>
|
# include <ngtcp2/ngtcp2_crypto_boringssl.h>
|
||||||
# endif // HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
# endif // HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
||||||
@@ -2927,13 +2927,13 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
if (config.is_quic()) {
|
if (config.is_quic()) {
|
||||||
#ifdef ENABLE_HTTP3
|
#ifdef ENABLE_HTTP3
|
||||||
# ifdef HAVE_LIBNGTCP2_CRYPTO_OPENSSL
|
# ifdef HAVE_LIBNGTCP2_CRYPTO_QUICTLS
|
||||||
if (ngtcp2_crypto_openssl_configure_client_context(ssl_ctx) != 0) {
|
if (ngtcp2_crypto_quictls_configure_client_context(ssl_ctx) != 0) {
|
||||||
std::cerr << "ngtcp2_crypto_openssl_configure_client_context failed"
|
std::cerr << "ngtcp2_crypto_quictls_configure_client_context failed"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
# endif // HAVE_LIBNGTCP2_CRYPTO_OPENSSL
|
# endif // HAVE_LIBNGTCP2_CRYPTO_QUICTLS
|
||||||
# ifdef HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
# ifdef HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
||||||
if (ngtcp2_crypto_boringssl_configure_client_context(ssl_ctx) != 0) {
|
if (ngtcp2_crypto_boringssl_configure_client_context(ssl_ctx) != 0) {
|
||||||
std::cerr << "ngtcp2_crypto_boringssl_configure_client_context failed"
|
std::cerr << "ngtcp2_crypto_boringssl_configure_client_context failed"
|
||||||
|
|||||||
@@ -28,9 +28,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#ifdef HAVE_LIBNGTCP2_CRYPTO_OPENSSL
|
#ifdef HAVE_LIBNGTCP2_CRYPTO_QUICTLS
|
||||||
# include <ngtcp2/ngtcp2_crypto_openssl.h>
|
# include <ngtcp2/ngtcp2_crypto_quictls.h>
|
||||||
#endif // HAVE_LIBNGTCP2_CRYPTO_OPENSSL
|
#endif // HAVE_LIBNGTCP2_CRYPTO_QUICTLS
|
||||||
#ifdef HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
#ifdef HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
||||||
# include <ngtcp2/ngtcp2_crypto_boringssl.h>
|
# include <ngtcp2/ngtcp2_crypto_boringssl.h>
|
||||||
#endif // HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
#endif // HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
||||||
|
|||||||
@@ -1498,7 +1498,7 @@ void Http3Upstream::on_handler_delete() {
|
|||||||
auto worker = handler_->get_worker();
|
auto worker = handler_->get_worker();
|
||||||
auto quic_conn_handler = worker->get_quic_connection_handler();
|
auto quic_conn_handler = worker->get_quic_connection_handler();
|
||||||
|
|
||||||
std::vector<ngtcp2_cid> scids(ngtcp2_conn_get_num_scid(conn_) + 1);
|
std::vector<ngtcp2_cid> scids(ngtcp2_conn_get_scid(conn_, nullptr) + 1);
|
||||||
ngtcp2_conn_get_scid(conn_, scids.data());
|
ngtcp2_conn_get_scid(conn_, scids.data());
|
||||||
scids.back() = hashed_scid_;
|
scids.back() = hashed_scid_;
|
||||||
|
|
||||||
|
|||||||
@@ -64,9 +64,9 @@
|
|||||||
#ifdef ENABLE_HTTP3
|
#ifdef ENABLE_HTTP3
|
||||||
# include <ngtcp2/ngtcp2.h>
|
# include <ngtcp2/ngtcp2.h>
|
||||||
# include <ngtcp2/ngtcp2_crypto.h>
|
# include <ngtcp2/ngtcp2_crypto.h>
|
||||||
# ifdef HAVE_LIBNGTCP2_CRYPTO_OPENSSL
|
# ifdef HAVE_LIBNGTCP2_CRYPTO_QUICTLS
|
||||||
# include <ngtcp2/ngtcp2_crypto_openssl.h>
|
# include <ngtcp2/ngtcp2_crypto_quictls.h>
|
||||||
# endif // HAVE_LIBNGTCP2_CRYPTO_OPENSSL
|
# endif // HAVE_LIBNGTCP2_CRYPTO_QUICTLS
|
||||||
# ifdef HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
# ifdef HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
||||||
# include <ngtcp2/ngtcp2_crypto_boringssl.h>
|
# include <ngtcp2/ngtcp2_crypto_boringssl.h>
|
||||||
# endif // HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
# endif // HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
||||||
@@ -1258,12 +1258,12 @@ SSL_CTX *create_quic_ssl_context(const char *private_key_file,
|
|||||||
|
|
||||||
SSL_CTX_set_options(ssl_ctx, ssl_opts);
|
SSL_CTX_set_options(ssl_ctx, ssl_opts);
|
||||||
|
|
||||||
# ifdef HAVE_LIBNGTCP2_CRYPTO_OPENSSL
|
# ifdef HAVE_LIBNGTCP2_CRYPTO_QUICTLS
|
||||||
if (ngtcp2_crypto_openssl_configure_server_context(ssl_ctx) != 0) {
|
if (ngtcp2_crypto_quictls_configure_server_context(ssl_ctx) != 0) {
|
||||||
LOG(FATAL) << "ngtcp2_crypto_openssl_configure_server_context failed";
|
LOG(FATAL) << "ngtcp2_crypto_quictls_configure_server_context failed";
|
||||||
DIE();
|
DIE();
|
||||||
}
|
}
|
||||||
# endif // HAVE_LIBNGTCP2_CRYPTO_OPENSSL
|
# endif // HAVE_LIBNGTCP2_CRYPTO_QUICTLS
|
||||||
# ifdef HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
# ifdef HAVE_LIBNGTCP2_CRYPTO_BORINGSSL
|
||||||
if (ngtcp2_crypto_boringssl_configure_server_context(ssl_ctx) != 0) {
|
if (ngtcp2_crypto_boringssl_configure_server_context(ssl_ctx) != 0) {
|
||||||
LOG(FATAL) << "ngtcp2_crypto_boringssl_configure_server_context failed";
|
LOG(FATAL) << "ngtcp2_crypto_boringssl_configure_server_context failed";
|
||||||
|
|||||||
Reference in New Issue
Block a user