1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-26 01:19:03 +00:00

Partially revert r36038: EC support only missing on RHEL

This commit is contained in:
dmiller
2016-07-27 20:35:00 +00:00
parent 3611aa0a6e
commit 7aed1fd2ab

View File

@@ -424,7 +424,7 @@ static const char *pkey_type_to_string(int type)
return "dsa";
case EVP_PKEY_DH:
return "dh";
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
#ifdef EVP_PKEY_EC
case EVP_PKEY_EC:
return "ec";
#endif
@@ -434,7 +434,7 @@ static const char *pkey_type_to_string(int type)
}
int lua_push_ecdhparams(lua_State *L, EVP_PKEY *pubkey) {
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
#ifdef EVP_PKEY_EC
EC_KEY *ec_key = EVP_PKEY_get1_EC_KEY(pubkey);
const EC_GROUP *group = EC_KEY_get0_group(ec_key);
int nid;
@@ -546,7 +546,7 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
pubkey = X509_get_pubkey(cert);
lua_newtable(L);
pkey_type = EVP_PKEY_type(pubkey->type);
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
#ifdef EVP_PKEY_EC
if (pkey_type == EVP_PKEY_EC) {
lua_push_ecdhparams(L, pubkey);
lua_setfield(L, -2, "ecdhparams");