]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix for #1306: configure checks if the ngtcp2_crypto_ossl
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 11 Jun 2026 09:43:46 +0000 (11:43 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 11 Jun 2026 09:43:46 +0000 (11:43 +0200)
  header file is available, and prints an error otherwise.

config.h.in
configure
configure.ac
doc/Changelog

index 8f9fa6bade897dee134b11afac06c82ebbf55e8f..50b7b54b130de0096827aa65f32b3ac5d9244481 100644 (file)
    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
index 1a98426aebcf515600b1b01e4c01985168f4e6e6..f516cae8bc8558ebaa7ee16b5c6d576c0d7ef5e9 100755 (executable)
--- 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 <ngtcp2/ngtcp2_crypto_ossl.h>
+
+" "$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
 
index 1582a118650f80304454a7b464eb4fd6bebfbc86..57ca54f7228423f52c0b54ab2f1cfbc4762afbcd 100644 (file)
@@ -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 <ngtcp2/ngtcp2_crypto_ossl.h>
+           ])
     ], [
         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" ])
index ca4758c04689e4699ed1eef97327faa676bd9b74..62731984563c92f6e98fd6c56e60c79eeef3113a 100644 (file)
@@ -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.