Commit 8551497d authored by Ondřej Surý's avatar Ondřej Surý

Merge branch 'ondrej/configure.ac-fix-int-assignment-to-pointer-in-ECC-checks' into 'master'

Change the check for EC curves so it doesn't assign int to pointer

See merge request !1413
parents ffa3be2b 5338e5fc
Pipeline #9161 passed with stages
in 1 minute and 1 second
......@@ -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])])
......
......@@ -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])])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment