summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-01 04:51:19 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-01 04:51:19 +0000
commit429a9b628938c094362c04acd3ecf8a75e276e36 (patch)
tree15eea773d12a9bcc6a9454ce2271d717f4fdf0a9
parentb277404598be5e6308cd86f2303b4d9fd2df94c7 (diff)
downloadruby-429a9b628938c094362c04acd3ecf8a75e276e36.tar.gz
ruby-429a9b628938c094362c04acd3ecf8a75e276e36.tar.xz
ruby-429a9b628938c094362c04acd3ecf8a75e276e36.zip
* ext/openssl/ossl_cipher.c (ossl_cipher_set_padding): last modify is
rolled back for future compatibility. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog3
-rw-r--r--ext/openssl/ossl_cipher.c4
2 files changed, 1 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f966e6e5..66175b83e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,9 +25,6 @@ Thu Jul 1 11:59:45 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/ossl_cipher.c (ossl_cipher_set_key_length): new method
OpenSSL::Cipher::Cipher#key_len=.
- * ext/openssl/ossl_cipher.c (ossl_cipher_set_padding): the type of
- argument is changed from integer to boolean.
-
* ext/openssl/ossl_cipher.c (ossl_cipher_init_deprecated): new
finction; print warning for Cipher#<<.
diff --git a/ext/openssl/ossl_cipher.c b/ext/openssl/ossl_cipher.c
index 6e238189d..98468e0f2 100644
--- a/ext/openssl/ossl_cipher.c
+++ b/ext/openssl/ossl_cipher.c
@@ -326,9 +326,7 @@ ossl_cipher_set_padding(VALUE self, VALUE padding)
EVP_CIPHER_CTX *ctx;
GetCipher(self, ctx);
- if(rb_obj_is_kind_of(padding, rb_cInteger))
- padding = NUM2INT(padding) ? Qtrue : Qfalse;
- if (EVP_CIPHER_CTX_set_padding(ctx, RTEST(padding)) != 1)
+ if (EVP_CIPHER_CTX_set_padding(ctx, NUM2INT(padding)) != 1)
ossl_raise(eCipherError, NULL);
#else
rb_notimplement();