summaryrefslogtreecommitdiff
path: root/src/regress/lib/libssl/ssl/ssltest.c
diff options
context:
space:
mode:
authorbeck <>2023-07-02 17:21:33 +0000
committerbeck <>2023-07-02 17:21:33 +0000
commitddcb4efd6551a982bf29b2e8e83c9c808a1670dc (patch)
tree33bb9f6c1c9fd44a8c7064445713f67f9fe0b371 /src/regress/lib/libssl/ssl/ssltest.c
parent025f3b8ef1e0ff3017dd0079925fbf85f15a6d22 (diff)
downloadopenbsd-ddcb4efd6551a982bf29b2e8e83c9c808a1670dc.tar.gz
openbsd-ddcb4efd6551a982bf29b2e8e83c9c808a1670dc.tar.bz2
openbsd-ddcb4efd6551a982bf29b2e8e83c9c808a1670dc.zip
Disable TLS 1.0 and TLS 1.1 in libssl
Their time has long since past, and they should not be used. This change restricts ssl to versions 1.2 and 1.3, and changes the regression tests to understand we no longer speak the legacy protocols. For the moment the magical "golden" byte for byte comparison tests of raw handshake values are disabled util jsing fixes them. ok jsing@ tb@
Diffstat (limited to '')
-rw-r--r--src/regress/lib/libssl/ssl/ssltest.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/regress/lib/libssl/ssl/ssltest.c b/src/regress/lib/libssl/ssl/ssltest.c
index b4b10446e6..6b8e243073 100644
--- a/src/regress/lib/libssl/ssl/ssltest.c
+++ b/src/regress/lib/libssl/ssl/ssltest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssltest.c,v 1.39 2023/04/15 16:50:05 tb Exp $ */ 1/* $OpenBSD: ssltest.c,v 1.40 2023/07/02 17:21:32 beck Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -336,7 +336,7 @@ sv_usage(void)
336 fprintf(stderr, " -dhe1024dsa - use 1024 bit key (with 160-bit subprime) for DHE\n"); 336 fprintf(stderr, " -dhe1024dsa - use 1024 bit key (with 160-bit subprime) for DHE\n");
337 fprintf(stderr, " -no_dhe - disable DHE\n"); 337 fprintf(stderr, " -no_dhe - disable DHE\n");
338 fprintf(stderr, " -no_ecdhe - disable ECDHE\n"); 338 fprintf(stderr, " -no_ecdhe - disable ECDHE\n");
339 fprintf(stderr, " -dtls1 - use DTLSv1\n"); 339 fprintf(stderr, " -dtls1_2 - use DTLSv1.2\n");
340 fprintf(stderr, " -tls1 - use TLSv1\n"); 340 fprintf(stderr, " -tls1 - use TLSv1\n");
341 fprintf(stderr, " -tls1_2 - use TLSv1.2\n"); 341 fprintf(stderr, " -tls1_2 - use TLSv1.2\n");
342 fprintf(stderr, " -CApath arg - PEM format directory of CA's\n"); 342 fprintf(stderr, " -CApath arg - PEM format directory of CA's\n");
@@ -409,7 +409,7 @@ main(int argc, char *argv[])
409 int badop = 0; 409 int badop = 0;
410 int bio_pair = 0; 410 int bio_pair = 0;
411 int force = 0; 411 int force = 0;
412 int tls1 = 0, tls1_2 = 0, dtls1 = 0, ret = 1; 412 int tls1 = 0, tls1_2 = 0, dtls1_2 = 0, ret = 1;
413 int client_auth = 0; 413 int client_auth = 0;
414 int server_auth = 0, i; 414 int server_auth = 0, i;
415 char *app_verify_arg = "Test Callback Argument"; 415 char *app_verify_arg = "Test Callback Argument";
@@ -464,8 +464,8 @@ main(int argc, char *argv[])
464 no_dhe = 1; 464 no_dhe = 1;
465 else if (strcmp(*argv, "-no_ecdhe") == 0) 465 else if (strcmp(*argv, "-no_ecdhe") == 0)
466 no_ecdhe = 1; 466 no_ecdhe = 1;
467 else if (strcmp(*argv, "-dtls1") == 0) 467 else if (strcmp(*argv, "-dtls1_2") == 0)
468 dtls1 = 1; 468 dtls1_2 = 1;
469 else if (strcmp(*argv, "-tls1") == 0) 469 else if (strcmp(*argv, "-tls1") == 0)
470 tls1 = 1; 470 tls1 = 1;
471 else if (strcmp(*argv, "-tls1_2") == 0) 471 else if (strcmp(*argv, "-tls1_2") == 0)
@@ -565,7 +565,7 @@ bad:
565 goto end; 565 goto end;
566 } 566 }
567 567
568 if (!dtls1 && !tls1 && !tls1_2 && number > 1 && !reuse && !force) { 568 if (!dtls1_2 && !tls1 && !tls1_2 && number > 1 && !reuse && !force) {
569 fprintf(stderr, 569 fprintf(stderr,
570 "This case cannot work. Use -f to perform " 570 "This case cannot work. Use -f to perform "
571 "the test anyway (and\n-d to see what happens), " 571 "the test anyway (and\n-d to see what happens), "
@@ -588,8 +588,8 @@ bad:
588 SSL_library_init(); 588 SSL_library_init();
589 SSL_load_error_strings(); 589 SSL_load_error_strings();
590 590
591 if (dtls1) 591 if (dtls1_2)
592 meth = DTLSv1_method(); 592 meth = DTLSv1_2_method();
593 else if (tls1) 593 else if (tls1)
594 meth = TLSv1_method(); 594 meth = TLSv1_method();
595 else if (tls1_2) 595 else if (tls1_2)