aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@ruby-lang.org>2016-04-06 04:38:49 +0000
committerKazuki Yamaguchi <k@rhe.jp>2016-05-31 11:31:27 +0900
commit7f6a6d5b8f207ed5aea6eef8291755aef3c43182 (patch)
tree1b2969565e5069acb08deb14f966667b7b367ab1 /test
parent9ef57cc80a4bbe4a9952b7f61029b397711ccda6 (diff)
downloadruby-openssl-7f6a6d5b8f207ed5aea6eef8291755aef3c43182.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/test_ssl.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_ssl.rb b/test/test_ssl.rb
index 5dcca146..f1e4ce3e 100644
--- a/test/test_ssl.rb
+++ b/test/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' }