]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Change the check for EC curves so it doesn't assign int to pointer
authorOndřej Surý <ondrej@sury.org>
Mon, 28 Jan 2019 15:31:22 +0000 (16:31 +0100)
committerOndřej Surý <ondrej@sury.org>
Tue, 29 Jan 2019 11:43:55 +0000 (12:43 +0100)
configure
configure.ac

index 44c85a5e248264f6b4c3c408c42e3cf80d6de8a8..c63f70014df3c0fbc259d1edcb28026b5661f78f 100755 (executable)
--- a/configure
+++ b/configure
@@ -842,7 +842,6 @@ infodir
 docdir
 oldincludedir
 includedir
-runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -1000,7 +999,6 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1253,15 +1251,6 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
-  -runstatedir | --runstatedir | --runstatedi | --runstated \
-  | --runstate | --runstat | --runsta | --runst | --runs \
-  | --run | --ru | --r)
-    ac_prev=runstatedir ;;
-  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
-  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
-  | --run=* | --ru=* | --r=*)
-    runstatedir=$ac_optarg ;;
-
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1399,7 +1388,7 @@ fi
 for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
                datadir sysconfdir sharedstatedir localstatedir includedir \
                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-               libdir localedir mandir runstatedir
+               libdir localedir mandir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1552,7 +1541,6 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -15625,10 +15613,11 @@ $as_echo_n "checking for ECDSA P-256 support... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <openssl/evp.h>
+                      #include <openssl/ec.h>
 int
 main ()
 {
-EVP_PKEY_CTX *ctx = NID_X9_62_prime256v1;
+EC_KEY *key = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
   ;
   return 0;
 }
@@ -15649,10 +15638,11 @@ $as_echo_n "checking for ECDSA P-384 support... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <openssl/evp.h>
+                      #include <openssl/ec.h>
 int
 main ()
 {
-EVP_PKEY_CTX *ctx = NID_secp384r1;
+EC_KEY *key = EC_KEY_new_by_curve_name(NID_secp384r1);
   ;
   return 0;
 }
@@ -15673,10 +15663,11 @@ $as_echo_n "checking for Ed25519 support... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <openssl/evp.h>
+                      #include <openssl/ec.h>
 int
 main ()
 {
-EVP_PKEY_CTX *ctx = NID_ED25519;
+EC_KEY *key = EC_KEY_new_by_curve_name(NID_ED25519);
   ;
   return 0;
 }
@@ -15698,8 +15689,9 @@ $as_echo_n "checking for Ed448 support... " >&6; }
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: broken" >&5
 $as_echo "broken" >&6; }
 #AC_COMPILE_IFELSE(
-#    [AC_LANG_PROGRAM([[#include <openssl/evp.h>]],
-#                   [[EVP_PKEY_CTX *ctx = NID_ED448;]])],
+#    [AC_LANG_PROGRAM([[#include <openssl/evp.h>
+#                     #include <openssl/ec.h>]],
+#                   [[EC_KEY *key = EC_KEY_new_by_curve_name(NID_ED448);]])],
 #    [AC_DEFINE([HAVE_OPENSSL_ED448], [1], [define if OpenSSL supports Ed448])
 #     AC_MSG_RESULT([yes])],
 #    [AC_MSG_RESULT([no])])
index 80b505857b1d67ecf45f69919a3a8a9376700d87..f94f1bf27c0d736d24300d30707131bb31dc9ccb 100644 (file)
@@ -753,22 +753,25 @@ AC_CHECK_FUNCS([ECDSA_sign ECDSA_verify], [:],
 
 AC_MSG_CHECKING([for ECDSA P-256 support])
 AC_COMPILE_IFELSE(
-    [AC_LANG_PROGRAM([[#include <openssl/evp.h>]],
-                    [[EVP_PKEY_CTX *ctx = NID_X9_62_prime256v1;]])],
+    [AC_LANG_PROGRAM([[#include <openssl/evp.h>
+                      #include <openssl/ec.h>]],
+                    [[EC_KEY *key = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);]])],
     [AC_MSG_RESULT([yes])],
     [AC_MSG_FAILURE([not found.  ECDSA P-256 support in OpenSSL is mandatory.])])
 
 AC_MSG_CHECKING([for ECDSA P-384 support])
 AC_COMPILE_IFELSE(
-    [AC_LANG_PROGRAM([[#include <openssl/evp.h>]],
-                    [[EVP_PKEY_CTX *ctx = NID_secp384r1;]])],
+    [AC_LANG_PROGRAM([[#include <openssl/evp.h>
+                      #include <openssl/ec.h>]],
+                    [[EC_KEY *key = EC_KEY_new_by_curve_name(NID_secp384r1);]])],
     [AC_MSG_RESULT([yes])],
     [AC_MSG_FAILURE([not found.  ECDSA P-384 support in OpenSSL is mandatory.])])
 
 AC_MSG_CHECKING([for Ed25519 support])
 AC_COMPILE_IFELSE(
-    [AC_LANG_PROGRAM([[#include <openssl/evp.h>]],
-                    [[EVP_PKEY_CTX *ctx = NID_ED25519;]])],
+    [AC_LANG_PROGRAM([[#include <openssl/evp.h>
+                      #include <openssl/ec.h>]],
+                    [[EC_KEY *key = EC_KEY_new_by_curve_name(NID_ED25519);]])],
     [AC_DEFINE([HAVE_OPENSSL_ED25519], [1], [define if OpenSSL supports Ed25519])
      AC_MSG_RESULT([yes])],
     [AC_MSG_RESULT([no])])
@@ -776,8 +779,9 @@ AC_COMPILE_IFELSE(
 AC_MSG_CHECKING([for Ed448 support])
 AC_MSG_RESULT([broken])
 #AC_COMPILE_IFELSE(
-#    [AC_LANG_PROGRAM([[#include <openssl/evp.h>]],
-#                   [[EVP_PKEY_CTX *ctx = NID_ED448;]])],
+#    [AC_LANG_PROGRAM([[#include <openssl/evp.h>
+#                     #include <openssl/ec.h>]],
+#                   [[EC_KEY *key = EC_KEY_new_by_curve_name(NID_ED448);]])],
 #    [AC_DEFINE([HAVE_OPENSSL_ED448], [1], [define if OpenSSL supports Ed448])
 #     AC_MSG_RESULT([yes])],
 #    [AC_MSG_RESULT([no])])