ssl: use SSL_CTX_set_dh_auto() by default #924
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enable automatic DH parameters for TLS 1.2 or earlier when neither
SSLSocket#tmp_dh
norSSLSocket#tmp_dh_callback
is set. This is supported since OpenSSL 1.1.0.This allows us to remove the default
tmp_dh_callback
proc defined inlib/openssl/ssl.rb
, which uses hard-coded parameters and is not Ractor-shareable.Also, a few cleanups in related code:
provider: load "default" provider in test_openssl_legacy_provider
Explicitly load both the "default" and "legacy" providers in the test case.
The "legacy" provider is intended to be used with the "default" provider. The "default" provider is typically loaded automatically, but that only happens when no other provider has been loaded yet.
ssl: fix extconf.rb check for SSL_CTX_set0_tmp_dh_pkey()
Check for the function we actually use. Both SSL_set0_tmp_dh_pkey() and SSL_CTX_set0_tmp_dh_pkey() were added in OpenSSL 3.0.
ssl: refactor tmp_dh_callback handling
tmp_dh_callback no longer has a default value. It also no longer has to share code with tmp_ecdh_callback, which was removed in v3.0.0.