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
This commit is contained in:
parent
84d818678f
commit
9d31efc6f0
@ -1171,9 +1171,10 @@ end
|
|||||||
|
|
||||||
def test_get_ephemeral_key
|
def test_get_ephemeral_key
|
||||||
return unless OpenSSL::SSL::SSLSocket.method_defined?(:tmp_key)
|
return unless OpenSSL::SSL::SSLSocket.method_defined?(:tmp_key)
|
||||||
|
pkey = OpenSSL::PKey
|
||||||
ciphers = {
|
ciphers = {
|
||||||
'ECDHE-RSA-AES128-SHA' => OpenSSL::PKey::EC,
|
'ECDHE-RSA-AES128-SHA' => (pkey::EC if defined?(pkey::EC)),
|
||||||
'DHE-RSA-AES128-SHA' => OpenSSL::PKey::DH,
|
'DHE-RSA-AES128-SHA' => (pkey::DH if defined?(pkey::DH)),
|
||||||
'AES128-SHA' => nil
|
'AES128-SHA' => nil
|
||||||
}
|
}
|
||||||
conf_proc = Proc.new { |ctx| ctx.ciphers = 'ALL' }
|
conf_proc = Proc.new { |ctx| ctx.ciphers = 'ALL' }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user