summaryrefslogtreecommitdiff
path: root/src/regress/lib
diff options
context:
space:
mode:
authorjsing <>2021-02-07 14:52:17 +0000
committerjsing <>2021-02-07 14:52:17 +0000
commit5a642e2e581776f13874ce5444f9f27501465e56 (patch)
tree060afa21749de4eb225e7fced9e8f41ea9993357 /src/regress/lib
parent5d448d2a409a6e63d9f2092effe4d82d0c0ed012 (diff)
downloadopenbsd-5a642e2e581776f13874ce5444f9f27501465e56.tar.gz
openbsd-5a642e2e581776f13874ce5444f9f27501465e56.tar.bz2
openbsd-5a642e2e581776f13874ce5444f9f27501465e56.zip
Enable auto DHE and disable session tickets for some tests.
This allows us to drop the server messages that we intend on dropping.
Diffstat (limited to 'src/regress/lib')
-rw-r--r--src/regress/lib/libssl/dtls/dtlstest.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/regress/lib/libssl/dtls/dtlstest.c b/src/regress/lib/libssl/dtls/dtlstest.c
index 4274dee7f6..7292ea1cf6 100644
--- a/src/regress/lib/libssl/dtls/dtlstest.c
+++ b/src/regress/lib/libssl/dtls/dtlstest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dtlstest.c,v 1.6 2021/02/06 07:34:34 jsing Exp $ */ 1/* $OpenBSD: dtlstest.c,v 1.7 2021/02/07 14:52:17 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2020 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2020 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -344,6 +344,7 @@ dtls_server(int sock, long options, long mtu)
344 344
345 SSL_CTX_set_cookie_generate_cb(ssl_ctx, dtls_cookie_generate); 345 SSL_CTX_set_cookie_generate_cb(ssl_ctx, dtls_cookie_generate);
346 SSL_CTX_set_cookie_verify_cb(ssl_ctx, dtls_cookie_verify); 346 SSL_CTX_set_cookie_verify_cb(ssl_ctx, dtls_cookie_verify);
347 SSL_CTX_set_dh_auto(ssl_ctx, 2);
347 SSL_CTX_set_options(ssl_ctx, options); 348 SSL_CTX_set_options(ssl_ctx, options);
348 SSL_CTX_set_read_ahead(ssl_ctx, 1); 349 SSL_CTX_set_read_ahead(ssl_ctx, 1);
349 350
@@ -563,34 +564,34 @@ static const struct dtls_test dtls_tests[] = {
563 }, 564 },
564 { 565 {
565 .desc = "DTLS with dropped ServerHello", 566 .desc = "DTLS with dropped ServerHello",
566 .ssl_options = 0, 567 .ssl_options = SSL_OP_NO_TICKET,
567 .server_bbio_off = 1, 568 .server_bbio_off = 1,
568 .server_drops = { 1 }, 569 .server_drops = { 1 },
569 }, 570 },
570 { 571 {
571 .desc = "DTLS with dropped server Certificate", 572 .desc = "DTLS with dropped server Certificate",
572 .ssl_options = 0, 573 .ssl_options = SSL_OP_NO_TICKET,
573 .server_bbio_off = 1, 574 .server_bbio_off = 1,
574 .server_drops = { 2 }, 575 .server_drops = { 2 },
575 }, 576 },
576 { 577 {
577 .desc = "DTLS with dropped ServerKeyExchange", 578 .desc = "DTLS with dropped ServerKeyExchange",
578 .ssl_options = 0, 579 .ssl_options = SSL_OP_NO_TICKET,
579 .server_bbio_off = 1, 580 .server_bbio_off = 1,
580 .server_drops = { 3 }, 581 .server_drops = { 3 },
581 }, 582 },
582#if 0
583 /*
584 * These three currently result in the server accept completing and the
585 * client looping on a timeout. Presumably the server should not
586 * complete until the client Finished is received...
587 */
588 { 583 {
589 .desc = "DTLS with dropped ServerHelloDone", 584 .desc = "DTLS with dropped ServerHelloDone",
590 .ssl_options = 0, 585 .ssl_options = SSL_OP_NO_TICKET,
591 .server_bbio_off = 1, 586 .server_bbio_off = 1,
592 .server_drops = { 4 }, 587 .server_drops = { 4 },
593 }, 588 },
589#if 0
590 /*
591 * These two result in the server accept completing and the
592 * client looping on a timeout. Presumably the server should not
593 * complete until the client Finished is received...
594 */
594 { 595 {
595 .desc = "DTLS with dropped server CCS", 596 .desc = "DTLS with dropped server CCS",
596 .ssl_options = 0, 597 .ssl_options = 0,
@@ -611,7 +612,7 @@ static const struct dtls_test dtls_tests[] = {
611 .client_drops = { 2 }, 612 .client_drops = { 2 },
612 }, 613 },
613 { 614 {
614 .desc = "DTLS with dropped Client CCS", 615 .desc = "DTLS with dropped client CCS",
615 .ssl_options = 0, 616 .ssl_options = 0,
616 .client_bbio_off = 1, 617 .client_bbio_off = 1,
617 .client_drops = { 3 }, 618 .client_drops = { 3 },