1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
gotoyuzo 2005-10-30 20:50:48 +00:00
parent da8a797335
commit 787d0e3254
3 changed files with 14 additions and 1 deletions

View file

@ -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