diff options
author | rhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-09 10:46:46 +0000 |
---|---|---|
committer | rhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-09 10:46:46 +0000 |
commit | afcad182c9db0ea75c36ba9d2262d5fd9097ffe6 (patch) | |
tree | 13d1bea2d099ddb0f1308be7dd24653c6fcb8a78 /test/openssl/utils.rb | |
parent | ac08670e76b620a6c06c3b6586665f3c3a6be1b2 (diff) | |
download | ruby-afcad182c9db0ea75c36ba9d2262d5fd9097ffe6.tar.gz |
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
Diffstat (limited to 'test/openssl/utils.rb')
-rw-r--r-- | test/openssl/utils.rb | 5 |
1 files changed, 4 insertions, 1 deletions
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 |