Skip to content

Commit

Permalink
ssl_test.c: Allow using DHE with TLS-1.2 and older versions
Browse files Browse the repository at this point in the history
Reviewed-by: Tim Hudson <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
(Merged from openssl#26715)
  • Loading branch information
t8m committed Feb 14, 2025
1 parent c59f5f1 commit 0575755
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/ssl_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,14 +509,18 @@ static int test_handshake(int idx)
goto err;

if (!SSL_CTX_config(server_ctx, "server")
|| !SSL_CTX_set_dh_auto(server_ctx, 1)
|| !SSL_CTX_config(client_ctx, "client")) {
goto err;
}

if (server2_ctx != NULL && !SSL_CTX_config(server2_ctx, "server2"))
if (server2_ctx != NULL
&& (!SSL_CTX_config(server2_ctx, "server2")
|| !SSL_CTX_set_dh_auto(server2_ctx, 1)))
goto err;
if (resume_server_ctx != NULL
&& !SSL_CTX_config(resume_server_ctx, "resume-server"))
&& (!SSL_CTX_config(resume_server_ctx, "resume-server")
|| !SSL_CTX_set_dh_auto(resume_server_ctx, 1)))
goto err;
if (resume_client_ctx != NULL
&& !SSL_CTX_config(resume_client_ctx, "resume-client"))
Expand Down

0 comments on commit 0575755

Please sign in to comment.