From a6e9d827982209fd32cea7c3701df00f04bebe71 Mon Sep 17 00:00:00 2001 From: rhe Date: Thu, 9 Jun 2016 10:46:46 +0000 Subject: openssl: fix build with OPENSSL_NO_EC * ext/openssl/ossl_ssl.c: Add define guards for OPENSSL_NO_EC. SSL_CTX_set_ecdh_auto() is defined even when ECDH is disabled in OpenSSL's configuration. This fixes r55214. * test/openssl/test_pair.rb (test_ecdh_curves): Skip if the OpenSSL does not support ECDH. * test/openssl/utils.rb (start_server): Ignore error in SSLContext#ecdh_curves=. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/test_pair.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/test_pair.rb') diff --git a/test/test_pair.rb b/test/test_pair.rb index 5cb6627..b90b4de 100644 --- a/test/test_pair.rb +++ b/test/test_pair.rb @@ -433,7 +433,12 @@ module OpenSSL::TestPairM sock1, sock2 = tcp_pair ctx1 = OpenSSL::SSL::SSLContext.new - ctx1.ciphers = "ECDH" + begin + ctx1.ciphers = "ECDH" + rescue OpenSSL::SSL::SSLError + skip "ECDH is not enabled in this OpenSSL" if $!.message =~ /no cipher match/ + raise + end ctx1.ecdh_curves = "P-384:P-521" ctx1.security_level = 0 s1 = OpenSSL::SSL::SSLSocket.new(sock1, ctx1) -- cgit v1.2.3