summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-17 08:59:14 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-17 08:59:14 +0000
commit61bb4b389e133a73b24c54b1363a950f9eb87174 (patch)
treec55e030847c76d8742b081a1c4098998ea074bdd /test
parent3bc58582a90ed08b0398acc5a9aa71b3c94488e1 (diff)
merge revision(s) 49525,49575,49579: [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_0_0@49626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/openssl/test_cipher.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/openssl/test_cipher.rb b/test/openssl/test_cipher.rb
index a883bb4d61..35a6374565 100644
--- a/test/openssl/test_cipher.rb
+++ b/test/openssl/test_cipher.rb
@@ -104,7 +104,12 @@ 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
+ next if /wrap/ =~ name and e.message == 'wrap mode not allowed'
+ raise
+ end
}
end