summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-13 07:18:34 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-13 07:18:34 +0000
commitc85e4fce4751527a90478e958b5a3336de99c987 (patch)
tree17e82d2f628dd646159b031dbe5feaa3ef50df3a /test
parent19424d0b5126417149804e5abae0c0c81c9d84dc (diff)
merge revision(s) 49525,49575: [Backport #10839]
test_cipher.rb: OpenSSL 1.0.2 * test/openssl/test_cipher.rb (OpenSSL::TestCipher#test_ciphers): OpenSSL 1.0.2 does not allow wrap mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/openssl/test_cipher.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/openssl/test_cipher.rb b/test/openssl/test_cipher.rb
index 30220d169c..954963acc5 100644
--- a/test/openssl/test_cipher.rb
+++ b/test/openssl/test_cipher.rb
@@ -104,7 +104,15 @@ class OpenSSL::TestCipher < Test::Unit::TestCase
def test_ciphers
OpenSSL::Cipher.ciphers.each{|name|
next if /netbsd/ =~ RUBY_PLATFORM && /idea|rc5/i =~ name
- assert(OpenSSL::Cipher::Cipher.new(name).is_a?(OpenSSL::Cipher::Cipher))
+ begin
+ assert_kind_of(OpenSSL::Cipher::Cipher, OpenSSL::Cipher::Cipher.new(name))
+ rescue OpenSSL::Cipher::CipherError => e
+ if e.message == 'wrap mode not allowed'
+ assert_match(/wrap\z/, name, e.message)
+ next
+ end
+ raise
+ end
}
end