aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatarLibravatar John Regan <john@jrjrtech.com> 2022-05-05 14:25:49 +0200
committerLibravatarLibravatar John Regan <john@jrjrtech.com> 2022-05-05 14:25:49 +0200
commitdf0f1541e7abf453de2337df967bcc1bd362124a (patch)
treee8f017dc34875cabdf4cf95c7fb40785605f727d /src
parent03ffa376011ff5ddf346657c4bb377dde9ecb584 (diff)
downloadluaossl-df0f1541e7abf453de2337df967bcc1bd362124a.tar.gz
luaossl-df0f1541e7abf453de2337df967bcc1bd362124a.tar.bz2
luaossl-df0f1541e7abf453de2337df967bcc1bd362124a.zip
bn: use nchecks in both openssl-3 and openssl-1 branches
Diffstat (limited to 'src')
-rw-r--r--src/openssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openssl.c b/src/openssl.c
index c23988e..198e6a6 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -3920,10 +3920,10 @@ static int bn_generatePrime(lua_State *L) {
static int bn_isPrime(lua_State *L) {
BIGNUM *bn = checksimple(L, 1, BIGNUM_CLASS);
+ int nchecks = luaL_optinteger(L, 2, BN_prime_checks);
#if OPENSSL_PREREQ(3,0,0)
int res = BN_check_prime(bn, getctx(L), NULL);
#else
- int nchecks = luaL_optinteger(L, 2, BN_prime_checks);
int res = BN_is_prime_ex(bn, nchecks, getctx(L), NULL);
#endif