diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/openssl/ossl_pkey_rsa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/openssl/ossl_pkey_rsa.c b/ext/openssl/ossl_pkey_rsa.c index 4b20928bbd..b224cdd5f9 100644 --- a/ext/openssl/ossl_pkey_rsa.c +++ b/ext/openssl/ossl_pkey_rsa.c @@ -95,7 +95,7 @@ rsa_blocking_gen(void *arg) #endif static RSA * -rsa_generate(int size, unsigned long exp) +rsa_generate(int size, int exp) { #if defined(HAVE_RSA_GENERATE_KEY_EX) && HAVE_BN_GENCB int i; @@ -168,7 +168,7 @@ ossl_rsa_s_generate(int argc, VALUE *argv, VALUE klass) rb_scan_args(argc, argv, "11", &size, &exp); - rsa = rsa_generate(NUM2INT(size), NIL_P(exp) ? RSA_F4 : NUM2ULONG(exp)); /* err handled by rsa_instance */ + rsa = rsa_generate(NUM2INT(size), NIL_P(exp) ? RSA_F4 : NUM2INT(exp)); /* err handled by rsa_instance */ obj = rsa_instance(klass, rsa); if (obj == Qfalse) { @@ -213,7 +213,7 @@ ossl_rsa_initialize(int argc, VALUE *argv, VALUE self) rsa = RSA_new(); } else if (FIXNUM_P(arg)) { - rsa = rsa_generate(FIX2INT(arg), NIL_P(pass) ? RSA_F4 : NUM2ULONG(pass)); + rsa = rsa_generate(FIX2INT(arg), NIL_P(pass) ? RSA_F4 : NUM2INT(pass)); if (!rsa) ossl_raise(eRSAError, NULL); } else { |