summaryrefslogtreecommitdiff
path: root/test/openssl/test_cipher.rb
diff options
context:
space:
mode:
authorBart de Water <bartdewater@gmail.com>2020-07-07 12:59:11 -0400
committerKazuki Yamaguchi <k@rhe.jp>2021-03-16 19:16:11 +0900
commitda6341b70942cf448888471f66dfde2cf614f052 (patch)
tree54b55bbc6796d5d47fd1ca9eb378cc690918effb /test/openssl/test_cipher.rb
parent13198d4968a6591ec423832c4bf00c56ffdb337a (diff)
[ruby/openssl] User lower case cipher names for maximum compatibility
We ran into some Linux-based systems not accepting the upper case variant https://github.com/ruby/openssl/commit/7bc49121d5
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4275
Diffstat (limited to 'test/openssl/test_cipher.rb')
-rw-r--r--test/openssl/test_cipher.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/openssl/test_cipher.rb b/test/openssl/test_cipher.rb
index 65b36dd180..45ec94a7d6 100644
--- a/test/openssl/test_cipher.rb
+++ b/test/openssl/test_cipher.rb
@@ -147,13 +147,13 @@ class OpenSSL::TestCipher < OpenSSL::TestCase
def test_AES
pt = File.read(__FILE__)
- %w(ECB CBC CFB OFB).each{|mode|
- c1 = OpenSSL::Cipher.new("AES-256-#{mode}")
+ %w(ecb cbc cfb ofb).each{|mode|
+ c1 = OpenSSL::Cipher.new("aes-256-#{mode}")
c1.encrypt
c1.pkcs5_keyivgen("passwd")
ct = c1.update(pt) + c1.final
- c2 = OpenSSL::Cipher.new("AES-256-#{mode}")
+ c2 = OpenSSL::Cipher.new("aes-256-#{mode}")
c2.decrypt
c2.pkcs5_keyivgen("passwd")
assert_equal(pt, c2.update(ct) + c2.final)
@@ -163,7 +163,7 @@ class OpenSSL::TestCipher < OpenSSL::TestCase
def test_update_raise_if_key_not_set
assert_raise(OpenSSL::Cipher::CipherError) do
# it caused OpenSSL SEGV by uninitialized key [Bug #2768]
- OpenSSL::Cipher.new("AES-128-ECB").update "." * 17
+ OpenSSL::Cipher.new("aes-128-ecb").update "." * 17
end
end