Committer: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx> Date: Wed Mar 10 16:27:13 2010 +0100 Revision: 3911 Revision-id: rene.hummen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Branch nick: trunk Log: fixed ecdsa issue at build system level now the first time i tried to distinguish between openssl with and without elliptic curve capabilities at the code level with the openssl version number. however, this breaks compilation for openwrt. second approach uses autotools power. Modified: M configure.ac M test/auth_performance.c === modified file 'configure.ac' --- configure.ac 2010-03-10 14:51:29 +0000 +++ configure.ac 2010-03-10 15:27:13 +0000 @@ -24,6 +24,10 @@ # Checks for libraries. AC_CHECK_LIB(crypto, DSA_generate_key,, AC_MSG_ERROR(openssl lib not found)) +# Check for ec crypto in openssl +AC_CHECK_FUNC(EC_KEY_new, + AC_DEFINE(HAVE_EC_CRYPTO) + AH_TEMPLATE(HAVE_EC_CRYPTO, [Defined to 1 if ec is enabled.]),) # We need the math lib in the registration extension. AC_CHECK_LIB(m, pow,, AC_MSG_ERROR(Math lib not found)) === modified file 'test/auth_performance.c' --- test/auth_performance.c 2010-03-10 11:34:35 +0000 +++ test/auth_performance.c 2010-03-10 15:27:13 +0000 @@ -23,7 +23,7 @@ #include "lib/core/crypto.h" // only use ecdsa when available -#if defined OPENSSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER > 0x0090800fL +#ifdef HAVE_EC_CRYPTO #include <openssl/ecdsa.h> #endif @@ -98,7 +98,7 @@ DSA *dsa_key_pool[key_pool_size]; DSA_SIG *dsa_sig_pool[num_measurements]; -#if defined OPENSSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER > 0x0090800fL +#ifdef HAVE_EC_CRYPTO EC_KEY *ecdsa_key_pool[key_pool_size]; ECDSA_SIG *ecdsa_sig_pool[num_measurements]; #endif @@ -441,7 +441,7 @@ #endif -#if defined OPENSSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER > 0x0090800fL +#ifdef HAVE_EC_CRYPTO printf("\n-------------------------------\n" "ECDSA performance test\n" "-------------------------------\n");