summaryrefslogtreecommitdiffstats
path: root/test
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
commit8209c9622c9f7fa5afdefd0a8b05805cd7dd411e (patch)
tree9249dab7e6652324735542abfba8fd142ba33054 /test
parentcdff583f6f12d538d325746b337aeba1befa9177 (diff)
downloadruby-8209c9622c9f7fa5afdefd0a8b05805cd7dd411e.tar.gz
ruby-8209c9622c9f7fa5afdefd0a8b05805cd7dd411e.tar.xz
ruby-8209c9622c9f7fa5afdefd0a8b05805cd7dd411e.zip
* 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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 8711e46aa..c84b47b7f 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