1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-09 07:59:03 +00:00

Fix incorrect constness for some OpenSSL versions

This commit is contained in:
dmiller
2022-08-31 13:43:37 +00:00
parent e11ff107de
commit 48eef5213f

View File

@@ -643,11 +643,12 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
luaL_getmetatable( L, "BIGNUM" );
lua_setmetatable( L, -2 );
#if HAVE_OPAQUE_STRUCTS
BIGNUM *n = NULL, *e = NULL;
#if OPENSSL_API_LEVEL < 30000
const BIGNUM *n = NULL, *e = NULL;
data->should_free = false;
RSA_get0_key(rsa, &n, &e, NULL);
#else
BIGNUM *n = NULL, *e = NULL;
data->should_free = true;
EVP_PKEY_get_bn_param(pubkey, OSSL_PKEY_PARAM_RSA_E, &e);
EVP_PKEY_get_bn_param(pubkey, OSSL_PKEY_PARAM_RSA_N, &n);