diff --git a/configure.ac b/configure.ac index 8a38367fb..7b0714eb8 100644 --- a/configure.ac +++ b/configure.ac @@ -409,12 +409,6 @@ if test "$use_openssl" = "yes"; then [ -lcrypto ]) fi -if test "$use_openssl" = "yes"; then - AC_CHECK_LIB(crypto, EVP_PKEY_get1_EC_KEY, - [AC_DEFINE(HAVE_OPENSSL_EC, 1, [Have EVP_PKEY_get1_EC_KEY])], - [AC_MSG_WARN([Disabling support for EC crypto])]) -fi - OPENSSL_LIBS= if test "$use_openssl" = "yes"; then trace_use="$trace_use openssl" diff --git a/nmap_config.h.in b/nmap_config.h.in index effec7ad8..be31d487c 100644 --- a/nmap_config.h.in +++ b/nmap_config.h.in @@ -119,8 +119,6 @@ #undef HAVE_LIBZ -#undef HAVE_OPENSSL_EC - #undef STUPID_SOLARIS_CHECKSUM_BUG #undef SOLARIS_BPF_PCAP_CAPTURE diff --git a/nmap_winconfig.h b/nmap_winconfig.h index 43a36bd6a..5030b20bc 100644 --- a/nmap_winconfig.h +++ b/nmap_winconfig.h @@ -72,7 +72,6 @@ #define NMAP_PLATFORM "i686-pc-windows-windows" #define HAVE_OPENSSL 1 -#define HAVE_OPENSSL_EC 1 #define HAVE_SSL_SET_TLSEXT_HOST_NAME 1 #define HAVE_LIBSSH2 1 #define HAVE_LIBZ 1 diff --git a/nse_ssl_cert.cc b/nse_ssl_cert.cc index d0646cced..5ae623a47 100644 --- a/nse_ssl_cert.cc +++ b/nse_ssl_cert.cc @@ -491,7 +491,7 @@ int lua_push_ecdhparams(lua_State *L, EVP_PKEY *pubkey) { } lua_setfield(L, -2, "curve_params"); return 1; -#elif defined(HAVE_OPENSSL_EC) +#elif !defined(OPENSSL_NO_EC) EC_KEY *ec_key = EVP_PKEY_get1_EC_KEY(pubkey); const EC_GROUP *group = EC_KEY_get0_group(ec_key); int nid; @@ -626,7 +626,7 @@ static int parse_ssl_cert(lua_State *L, X509 *cert) #else pkey_type = EVP_PKEY_type(pubkey->type); #endif -#ifdef HAVE_OPENSSL_EC +#ifdef EVP_PKEY_EC if (pkey_type == EVP_PKEY_EC) { lua_push_ecdhparams(L, pubkey); lua_setfield(L, -2, "ecdhparams");