summaryrefslogtreecommitdiff
path: root/test/openssl
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-05 02:48:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-05 02:48:55 +0000
commit74e6dd4078051efea4144fd289dc4c2b30fc9891 (patch)
treefc61a42138642f77115615950fb033558cd0a41d /test/openssl
parent1069e5d665599ce60086f284b575d3a850ed2b01 (diff)
* ext/openssl/ossl_cipher.c (ossl_cipher_alloc): leave data ptr
NULL. * ext/openssl/ossl_cipher.c (ossl_cipher_new, ossl_cipher_initialize): allocate internal structure. [ruby-core:35094] * ext/openssl/ossl_cipher.c (ossl_cipher_copy): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl')
-rw-r--r--test/openssl/test_cipher.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/openssl/test_cipher.rb b/test/openssl/test_cipher.rb
index 5cf41879bd..70c963bbb0 100644
--- a/test/openssl/test_cipher.rb
+++ b/test/openssl/test_cipher.rb
@@ -64,6 +64,11 @@ class OpenSSL::TestCipher < Test::Unit::TestCase
assert_raise(ArgumentError){ @c1.update("") }
end
+ def test_initialize
+ assert_raise(RuntimeError) {@c1.__send__(:initialize, "DES-EDE3-CBC")}
+ assert_raise(RuntimeError) {OpenSSL::Cipher.allocate.final}
+ end
+
if OpenSSL::OPENSSL_VERSION_NUMBER > 0x00907000
def test_ciphers
OpenSSL::Cipher.ciphers.each{|name|