diff options
author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-30 20:50:48 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-30 20:50:48 +0000 |
commit | 787d0e32547475d20747b64bf96c9ad238ec66a0 (patch) | |
tree | 9249dab7e6652324735542abfba8fd142ba33054 /test | |
parent | da8a797335ca2248cd6aa5ab994a99ffa13a4c14 (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/branches/ruby_1_8@9485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/openssl/test_cipher.rb | 5 |
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 |