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 | 433e0247f3ec5f941a3fd0f6a3d6c48d584271c8 (patch) | |
| tree | e327e28367dca475e171b96faa2e314b4deb3b74 /test/openssl | |
| parent | d61b409d777dd7e0c10243098d0eb6d6ee29a8ea (diff) | |
| download | ruby-433e0247f3ec5f941a3fd0f6a3d6c48d584271c8.tar.gz ruby-433e0247f3ec5f941a3fd0f6a3d6c48d584271c8.tar.xz ruby-433e0247f3ec5f941a3fd0f6a3d6c48d584271c8.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/trunk@9485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl')
| -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 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 |
