Skip to content

Commit 38f7161

Browse files
t8mquarckster
authored andcommitted
ssl_test.c: Allow using DHE with TLS-1.2 and older versions
Reviewed-by: Tim Hudson <[email protected]> Reviewed-by: Neil Horman <[email protected]> (Merged from openssl#26715)
1 parent d559124 commit 38f7161

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/ssl_test.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -509,14 +509,18 @@ static int test_handshake(int idx)
509509
goto err;
510510

511511
if (!SSL_CTX_config(server_ctx, "server")
512+
|| !SSL_CTX_set_dh_auto(server_ctx, 1)
512513
|| !SSL_CTX_config(client_ctx, "client")) {
513514
goto err;
514515
}
515516

516-
if (server2_ctx != NULL && !SSL_CTX_config(server2_ctx, "server2"))
517+
if (server2_ctx != NULL
518+
&& (!SSL_CTX_config(server2_ctx, "server2")
519+
|| !SSL_CTX_set_dh_auto(server2_ctx, 1)))
517520
goto err;
518521
if (resume_server_ctx != NULL
519-
&& !SSL_CTX_config(resume_server_ctx, "resume-server"))
522+
&& (!SSL_CTX_config(resume_server_ctx, "resume-server")
523+
|| !SSL_CTX_set_dh_auto(resume_server_ctx, 1)))
520524
goto err;
521525
if (resume_client_ctx != NULL
522526
&& !SSL_CTX_config(resume_client_ctx, "resume-client"))

0 commit comments

Comments
 (0)