mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
* modules/ssl/ssl_engine_init.c (ssl_init_server_certs): For OpenSSL
1.1+, disable auto DH parameter selection if parameters have been manually configured. This fixes a regression in r1890067 after which manually configured parameters are ignored. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893876 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1589,7 +1589,14 @@ static apr_status_t ssl_init_server_certs(server_rec *s,
|
|||||||
certfile = APR_ARRAY_IDX(mctx->pks->cert_files, 0, const char *);
|
certfile = APR_ARRAY_IDX(mctx->pks->cert_files, 0, const char *);
|
||||||
if (certfile && !modssl_is_engine_id(certfile)
|
if (certfile && !modssl_is_engine_id(certfile)
|
||||||
&& (dh = ssl_dh_GetParamFromFile(certfile))) {
|
&& (dh = ssl_dh_GetParamFromFile(certfile))) {
|
||||||
|
/* ### This should be replaced with SSL_CTX_set0_tmp_dh_pkey()
|
||||||
|
* for OpenSSL 3.0+. */
|
||||||
SSL_CTX_set_tmp_dh(mctx->ssl_ctx, dh);
|
SSL_CTX_set_tmp_dh(mctx->ssl_ctx, dh);
|
||||||
|
#if !MODSSL_USE_OPENSSL_PRE_1_1_API
|
||||||
|
/* OpenSSL ignores manually configured DH params if automatic
|
||||||
|
* selection if enabled, so disable auto selection here. */
|
||||||
|
SSL_CTX_set_dh_auto(mctx->ssl_ctx, 0);
|
||||||
|
#endif
|
||||||
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02540)
|
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02540)
|
||||||
"Custom DH parameters (%d bits) for %s loaded from %s",
|
"Custom DH parameters (%d bits) for %s loaded from %s",
|
||||||
modssl_DH_bits(dh), vhost_id, certfile);
|
modssl_DH_bits(dh), vhost_id, certfile);
|
||||||
|
Reference in New Issue
Block a user