aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/openssl/test_pair.rb7
-rw-r--r--test/openssl/utils.rb5
2 files changed, 10 insertions, 2 deletions
diff --git a/test/openssl/test_pair.rb b/test/openssl/test_pair.rb
index 5cb6627c87..b90b4de372 100644
--- a/test/openssl/test_pair.rb
+++ b/test/openssl/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)
diff --git a/test/openssl/utils.rb b/test/openssl/utils.rb
index e4861fa688..f306b5d3d8 100644
--- a/test/openssl/utils.rb
+++ b/test/openssl/utils.rb
@@ -298,7 +298,10 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC
ctx.cert = @svr_cert
ctx.key = @svr_key
ctx.tmp_dh_callback = proc { OpenSSL::TestUtils::TEST_KEY_DH1024 }
- ctx.ecdh_curves = "P-256"
+ begin
+ ctx.ecdh_curves = "P-256"
+ rescue NotImplementedError
+ end
ctx.verify_mode = verify_mode
ctx_proc.call(ctx) if ctx_proc