mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 21:21:31 +00:00
Correct usage of RSA_get0_key according to OpenSSL version
This commit is contained in:
@@ -569,10 +569,14 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
|
|||||||
lua_setmetatable( L, -2 );
|
lua_setmetatable( L, -2 );
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
data->bn = rsa->e;
|
data->bn = rsa->e;
|
||||||
#else
|
#elif OPENSSL_VERSION_NUMBER < 0x10100006L
|
||||||
BIGNUM *n, *e, *d;
|
BIGNUM *n, *e, *d;
|
||||||
RSA_get0_key(rsa, &n, &e, &d);
|
RSA_get0_key(rsa, &n, &e, &d);
|
||||||
data->bn = e;
|
data->bn = e;
|
||||||
|
#else
|
||||||
|
const BIGNUM *n, *e, *d;
|
||||||
|
RSA_get0_key(rsa, &n, &e, &d);
|
||||||
|
data->bn = (BIGNUM*) e;
|
||||||
#endif
|
#endif
|
||||||
lua_setfield(L, -2, "exponent");
|
lua_setfield(L, -2, "exponent");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user