diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-06 04:38:49 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-06 04:38:49 +0000 |
commit | 8161c01347c6609707c97934f13386dc4a11941e (patch) | |
tree | 7c1f4a8cb599fcae6fed04dabcbeb87f5b92699c /test | |
parent | 7829f0ae2ad7de1bf0c98a5c317518c286e4bfc4 (diff) | |
download | ruby-8161c01347c6609707c97934f13386dc4a11941e.tar.gz |
test_ssl.rb: skip unavailable pkeys
* test/openssl/test_ssl.rb (test_get_ephemeral_key): skip
unavailable public keys. [GH-1318]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/openssl/test_ssl.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb index b539f2498d..d1281c116a 100644 --- a/test/openssl/test_ssl.rb +++ b/test/openssl/test_ssl.rb @@ -1171,9 +1171,10 @@ end def test_get_ephemeral_key return unless OpenSSL::SSL::SSLSocket.method_defined?(:tmp_key) + pkey = OpenSSL::PKey ciphers = { - 'ECDHE-RSA-AES128-SHA' => OpenSSL::PKey::EC, - 'DHE-RSA-AES128-SHA' => OpenSSL::PKey::DH, + 'ECDHE-RSA-AES128-SHA' => (pkey::EC if defined?(pkey::EC)), + 'DHE-RSA-AES128-SHA' => (pkey::DH if defined?(pkey::DH)), 'AES128-SHA' => nil } conf_proc = Proc.new { |ctx| ctx.ciphers = 'ALL' } |