diff options
author | Yusuke Nakamura <yusuke1994525@gmail.com> | 2022-11-23 21:05:49 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-12-13 18:07:41 +0900 |
commit | d4dce27d894f4889f29d779c94ba2d30c231f9f8 (patch) | |
tree | 0c0b589b1b6119b1cb4b446bb7bf7527f96a784b /test/openssl | |
parent | d92f4fe4d74d929cec9ca36ec3dbec070b314902 (diff) | |
download | ruby-d4dce27d894f4889f29d779c94ba2d30c231f9f8.tar.gz |
[ruby/openssl] Allow empty string to OpenSSL::Cipher#update
For some reasons, plaintext may be empty string.
ref https://www.rfc-editor.org/rfc/rfc9001.html#section-5.8
https://github.com/ruby/openssl/commit/953592a29e
Diffstat (limited to 'test/openssl')
-rw-r--r-- | test/openssl/test_cipher.rb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/test/openssl/test_cipher.rb b/test/openssl/test_cipher.rb index b5fdf0b3d1..1c8610b2a9 100644 --- a/test/openssl/test_cipher.rb +++ b/test/openssl/test_cipher.rb @@ -108,12 +108,6 @@ class OpenSSL::TestCipher < OpenSSL::TestCase assert_not_equal s1, s2 end - def test_empty_data - cipher = OpenSSL::Cipher.new("DES-EDE3-CBC").encrypt - cipher.random_key - assert_raise(ArgumentError) { cipher.update("") } - end - def test_initialize cipher = OpenSSL::Cipher.new("DES-EDE3-CBC") assert_raise(RuntimeError) { cipher.__send__(:initialize, "DES-EDE3-CBC") } |