diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-23 02:02:54 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-23 02:02:54 +0000 |
commit | cca049e0d03c1e4ca3b627321f2abcd95d2eeece (patch) | |
tree | 957244975ede398e2953ab340f07543443f4cc56 | |
parent | 6d8580fe254d24b3868fb558ada142cd36242d63 (diff) |
Revert "* ext/openssl/ossl_pkey_rsa.c (rsa_generate): fix argument type."
This reverts commit r35102.
It breaks tests on FreeBSD.
6) Failure:
test_new_with_exponent(OpenSSL::TestPKeyRSA)
[/usr/home/chkbuild/build/ruby-trunk/20120323T010301Z/ruby/test/openssl/test_pkey_rsa.rb:59]:
<3> expected but was
<12884901891>.
7) Failure:
test_new_exponent_default(OpenSSL::TestPKeyRSA)
[/usr/home/chkbuild/build/ruby-trunk/20120323T010301Z/ruby/test/openssl/test_pkey_rsa.rb:52]:
<65537> expected but was
<281479271743489>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/openssl/ossl_pkey_rsa.c | 6 |
2 files changed, 3 insertions, 8 deletions
@@ -29,11 +29,6 @@ Thu Mar 22 19:55:08 2012 Nobuyoshi Nakada <[email protected]> * win32/win32.c (unixtime_to_filetime): convert time_t to FILETIME simply. -Thu Mar 22 13:43:31 2012 Nobuyoshi Nakada <[email protected]> - - * ext/openssl/ossl_pkey_rsa.c (rsa_generate): fix argument type. - [Bug #6094] - Thu Mar 22 11:14:10 2012 NAKAMURA Usaku <[email protected]> * test/ruby/test_io.rb (TestIO#test_pos_with_getc): updated. 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 { |