mirror of
https://github.com/nmap/nmap.git
synced 2025-12-22 15:39:03 +00:00
Avoid extra check for EC crypto, use OpenSSL-defined macros
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -119,8 +119,6 @@
|
||||
|
||||
#undef HAVE_LIBZ
|
||||
|
||||
#undef HAVE_OPENSSL_EC
|
||||
|
||||
#undef STUPID_SOLARIS_CHECKSUM_BUG
|
||||
#undef SOLARIS_BPF_PCAP_CAPTURE
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user