From: W.C.A. Wijngaards Date: Thu, 11 Jun 2026 09:43:46 +0000 (+0200) Subject: - Fix for #1306: configure checks if the ngtcp2_crypto_ossl X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=fd2131687adea331c6c85f1f1cb5bced917049c6;p=thirdparty%2Funbound.git - Fix for #1306: configure checks if the ngtcp2_crypto_ossl header file is available, and prints an error otherwise. --- diff --git a/config.h.in b/config.h.in index 8f9fa6bad..50b7b54b1 100644 --- a/config.h.in +++ b/config.h.in @@ -140,6 +140,10 @@ to 0 if you don't. */ #undef HAVE_DECL_NGTCP2_CRYPTO_ENCRYPT_CB +/* Define to 1 if you have the declaration of `ngtcp2_crypto_ossl_ctx_new', + and to 0 if you don't. */ +#undef HAVE_DECL_NGTCP2_CRYPTO_OSSL_CTX_NEW + /* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you don't. */ #undef HAVE_DECL_NID_ED25519 diff --git a/configure b/configure index 1a98426ae..f516cae8b 100755 --- a/configure +++ b/configure @@ -22639,6 +22639,24 @@ then : printf "%s\n" "#define USE_NGTCP2_CRYPTO_OSSL 1" >>confdefs.h + ac_fn_check_decl "$LINENO" "ngtcp2_crypto_ossl_ctx_new" "ac_cv_have_decl_ngtcp2_crypto_ossl_ctx_new" "$ac_includes_default + #include + +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_ngtcp2_crypto_ossl_ctx_new" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_NGTCP2_CRYPTO_OSSL_CTX_NEW $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : + +else $as_nop + as_fn_error $? "No declaration of ngtcp2_crypto_ossl_ctx_new in the ngtcp2_crypto_ossl header file. Perhaps the ngtcp2_crypto_ossl devel header files need to be installed." "$LINENO" 5 +fi + else $as_nop diff --git a/configure.ac b/configure.ac index 1582a1186..57ca54f72 100644 --- a/configure.ac +++ b/configure.ac @@ -1704,6 +1704,9 @@ if test x_$withval = x_yes -o x_$withval != x_no; then AC_CHECK_LIB([ngtcp2_crypto_ossl], [ngtcp2_crypto_encrypt_cb], [ LIBS="$LIBS -lngtcp2_crypto_ossl" AC_DEFINE(USE_NGTCP2_CRYPTO_OSSL, 1, [Define this to use ngtcp2_crypto_ossl.]) + AC_CHECK_DECLS([ngtcp2_crypto_ossl_ctx_new], [], [AC_MSG_ERROR([No declaration of ngtcp2_crypto_ossl_ctx_new in the ngtcp2_crypto_ossl header file. Perhaps the ngtcp2_crypto_ossl devel header files need to be installed.])], [AC_INCLUDES_DEFAULT + #include + ]) ], [ AC_CHECK_LIB([ngtcp2_crypto_openssl], [ngtcp2_crypto_encrypt_cb], [ LIBS="$LIBS -lngtcp2_crypto_openssl" ], [ AC_CHECK_LIB([ngtcp2_crypto_quictls], [ngtcp2_crypto_encrypt_cb], [ LIBS="$LIBS -lngtcp2_crypto_quictls" ]) diff --git a/doc/Changelog b/doc/Changelog index ca4758c04..627319845 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,8 @@ - Fix for #1306: configure detects specifically the call to SSL_set_quic_tls_early_data_enabled and SSL_set_quic_early_data_enabled, so the correct one is used. + - Fix for #1306: configure checks if the ngtcp2_crypto_ossl + header file is available, and prints an error otherwise. 10 June 2026: Wouter - Fix pythonmod script read for numeric overflow.