Merge #403: configure: add flag to disable OpenSSL tests
a9b2a5d
configure: add flag to disable OpenSSL tests (Andrew Poelstra)
This commit is contained in:
commit
65285a63ee
32
configure.ac
32
configure.ac
|
@ -94,6 +94,11 @@ AC_ARG_ENABLE(tests,
|
||||||
[use_tests=$enableval],
|
[use_tests=$enableval],
|
||||||
[use_tests=yes])
|
[use_tests=yes])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(openssl_tests,
|
||||||
|
AS_HELP_STRING([--enable-openssl-tests],[enable OpenSSL tests, if OpenSSL is available (default is auto)]),
|
||||||
|
[enable_openssl_tests=$enableval],
|
||||||
|
[enable_openssl_tests=auto])
|
||||||
|
|
||||||
AC_ARG_ENABLE(experimental,
|
AC_ARG_ENABLE(experimental,
|
||||||
AS_HELP_STRING([--enable-experimental],[allow experimental configure options (default is no)]),
|
AS_HELP_STRING([--enable-experimental],[allow experimental configure options (default is no)]),
|
||||||
[use_experimental=$enableval],
|
[use_experimental=$enableval],
|
||||||
|
@ -351,16 +356,25 @@ esac
|
||||||
if test x"$use_tests" = x"yes"; then
|
if test x"$use_tests" = x"yes"; then
|
||||||
SECP_OPENSSL_CHECK
|
SECP_OPENSSL_CHECK
|
||||||
if test x"$has_openssl_ec" = x"yes"; then
|
if test x"$has_openssl_ec" = x"yes"; then
|
||||||
AC_DEFINE(ENABLE_OPENSSL_TESTS, 1, [Define this symbol if OpenSSL EC functions are available])
|
if test x"$enable_openssl_tests" != x"no"; then
|
||||||
SECP_TEST_INCLUDES="$SSL_CFLAGS $CRYPTO_CFLAGS"
|
AC_DEFINE(ENABLE_OPENSSL_TESTS, 1, [Define this symbol if OpenSSL EC functions are available])
|
||||||
SECP_TEST_LIBS="$CRYPTO_LIBS"
|
SECP_TEST_INCLUDES="$SSL_CFLAGS $CRYPTO_CFLAGS"
|
||||||
|
SECP_TEST_LIBS="$CRYPTO_LIBS"
|
||||||
case $host in
|
|
||||||
*mingw*)
|
|
||||||
SECP_TEST_LIBS="$SECP_TEST_LIBS -lgdi32"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
case $host in
|
||||||
|
*mingw*)
|
||||||
|
SECP_TEST_LIBS="$SECP_TEST_LIBS -lgdi32"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if test x"$enable_openssl_tests" = x"yes"; then
|
||||||
|
AC_MSG_ERROR([OpenSSL tests requested but OpenSSL with EC support is not available])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if test x"$enable_openssl_tests" = x"yes"; then
|
||||||
|
AC_MSG_ERROR([OpenSSL tests requested but tests are not enabled])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -3623,12 +3623,14 @@ void run_ecdsa_end_to_end(void) {
|
||||||
|
|
||||||
int test_ecdsa_der_parse(const unsigned char *sig, size_t siglen, int certainly_der, int certainly_not_der) {
|
int test_ecdsa_der_parse(const unsigned char *sig, size_t siglen, int certainly_der, int certainly_not_der) {
|
||||||
static const unsigned char zeroes[32] = {0};
|
static const unsigned char zeroes[32] = {0};
|
||||||
|
#ifdef ENABLE_OPENSSL_TESTS
|
||||||
static const unsigned char max_scalar[32] = {
|
static const unsigned char max_scalar[32] = {
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
|
||||||
0xba, 0xae, 0xdc, 0xe6, 0xaf, 0x48, 0xa0, 0x3b,
|
0xba, 0xae, 0xdc, 0xe6, 0xaf, 0x48, 0xa0, 0x3b,
|
||||||
0xbf, 0xd2, 0x5e, 0x8c, 0xd0, 0x36, 0x41, 0x40
|
0xbf, 0xd2, 0x5e, 0x8c, 0xd0, 0x36, 0x41, 0x40
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue