summaryrefslogtreecommitdiff
path: root/test/openssl/test_cipher.rb
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-30 20:50:48 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-30 20:50:48 +0000
commitab509c0edb4d2631772018cebbbb5dd3c06b0582 (patch)
treee327e28367dca475e171b96faa2e314b4deb3b74 /test/openssl/test_cipher.rb
parentaa57e68b06852f69677a9c5fbf6c7937d18b77e2 (diff)
* ext/openssl/ossl_cipher.c (ossl_cipher_update): input data must
not be empty. [ruby-talk:161220] * test/openssl/test_cipher.rb: add test for Cipher#update(""). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl/test_cipher.rb')
-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 8711e46aa2..c84b47b7f4 100644
--- a/test/openssl/test_cipher.rb
+++ b/test/openssl/test_cipher.rb
@@ -57,6 +57,11 @@ class OpenSSL::TestCipher < Test::Unit::TestCase
s2 = @c1.update(@data) + @c1.final
assert_equal(s1, s2, "encrypt reset")
end
+
+ def test_empty_data
+ @c1.encrypt
+ assert_raises(ArgumentError){ @c1.update("") }
+ end
end
end