diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2020-08-12 20:57:52 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2021-03-16 19:16:11 +0900 |
commit | d47210b1130ce49c2444628f6da543782b15cadf (patch) | |
tree | 2242870d42ff7ff736957d9c2fbe0d139f434223 /test/openssl/test_ssl.rb | |
parent | 945ed40862393778b1c991b00714dcaf73319c77 (diff) | |
download | ruby-d47210b1130ce49c2444628f6da543782b15cadf.tar.gz |
[ruby/openssl] ssl: remove SSL::SSLContext#tmp_ecdh_callback
The underlying API SSL_CTX_set_tmp_ecdh_callback() was removed by
LibreSSL >= 2.6.1 and OpenSSL >= 1.1.0, in other words, it is not
supported by any non-EOL versions of OpenSSL.
The wrapper was initially implemented in Ruby 2.3 and has been
deprecated since Ruby/OpenSSL 2.0 (bundled with Ruby 2.4) with explicit
warning with rb_warn().
https://github.com/ruby/openssl/commit/ee037e1460
Diffstat (limited to 'test/openssl/test_ssl.rb')
-rw-r--r-- | test/openssl/test_ssl.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb index 59c94932c9..43f1fb901f 100644 --- a/test/openssl/test_ssl.rb +++ b/test/openssl/test_ssl.rb @@ -1603,30 +1603,6 @@ end end end - def test_tmp_ecdh_callback - pend "EC is disabled" unless defined?(OpenSSL::PKey::EC) - pend "tmp_ecdh_callback is not supported" unless \ - OpenSSL::SSL::SSLContext.method_defined?(:tmp_ecdh_callback) - pend "LibreSSL 2.6 has broken SSL_CTX_set_tmp_ecdh_callback()" \ - if libressl?(2, 6, 1) - - EnvUtil.suppress_warning do # tmp_ecdh_callback is deprecated (2016-05) - called = false - ctx_proc = -> ctx { - ctx.ciphers = "DEFAULT:!kRSA:!kEDH" - ctx.tmp_ecdh_callback = -> (*args) { - called = true - OpenSSL::PKey::EC.new "prime256v1" - } - } - start_server(ctx_proc: ctx_proc) do |port| - server_connect(port) { |s| - assert called, "tmp_ecdh_callback should be called" - } - end - end - end - def test_ecdh_curves pend "EC is disabled" unless defined?(OpenSSL::PKey::EC) |