diff --git a/tests/include.am b/tests/include.am index 2f2ea16bb..5ed4fe40d 100644 --- a/tests/include.am +++ b/tests/include.am @@ -29,7 +29,9 @@ EXTRA_DIST += tests/unit.h \ tests/test-tls13-pq.conf \ tests/test-tls13-pq-2.conf \ tests/test-dtls13-pq.conf \ + tests/test-dtls13-pq-frag.conf \ tests/test-dtls13-pq-2.conf \ + tests/test-dtls13-pq-2-frag.conf \ tests/test-psk.conf \ tests/test-psk-no-id.conf \ tests/test-psk-no-id-sha2.conf \ diff --git a/tests/suites.c b/tests/suites.c index fece0c243..7787701a6 100644 --- a/tests/suites.c +++ b/tests/suites.c @@ -966,10 +966,10 @@ int SuiteTest(int argc, char** argv) args.return_code = EXIT_FAILURE; goto exit; } - #ifdef HAVE_LIBOQS - /* add DTLSv13 pq tests */ - XSTRLCPY(argv0[1], "tests/test-dtls13-pq-2.conf", sizeof(argv0[1])); - printf("starting DTLSv13 post-quantum groups tests\n"); + #ifdef WOLFSSL_DTLS_CH_FRAG + /* add DTLSv13 pq frag tests */ + XSTRLCPY(argv0[1], "tests/test-dtls13-pq-frag.conf", sizeof(argv0[1])); + printf("starting DTLSv13 post-quantum groups tests with fragmentation\n"); test_harness(&args); if (args.return_code != 0) { printf("error from script %d\n", args.return_code); @@ -977,6 +977,28 @@ int SuiteTest(int argc, char** argv) goto exit; } #endif + #ifdef HAVE_LIBOQS + /* add DTLSv13 pq 2 tests */ + XSTRLCPY(argv0[1], "tests/test-dtls13-pq-2.conf", sizeof(argv0[1])); + printf("starting DTLSv13 post-quantum 2 groups tests\n"); + test_harness(&args); + if (args.return_code != 0) { + printf("error from script %d\n", args.return_code); + args.return_code = EXIT_FAILURE; + goto exit; + } + #ifdef WOLFSSL_DTLS_CH_FRAG + /* add DTLSv13 pq 2 frag tests */ + XSTRLCPY(argv0[1], "tests/test-dtls13-pq-2-frag.conf", sizeof(argv0[1])); + printf("starting DTLSv13 post-quantum 2 groups tests with fragmentation\n"); + test_harness(&args); + if (args.return_code != 0) { + printf("error from script %d\n", args.return_code); + args.return_code = EXIT_FAILURE; + goto exit; + } + #endif + #endif #endif #endif #if defined(WC_RSA_PSS) && (!defined(HAVE_FIPS) || \ diff --git a/tests/test-dtls13-pq-2-frag.conf b/tests/test-dtls13-pq-2-frag.conf new file mode 100644 index 000000000..6ea8317db --- /dev/null +++ b/tests/test-dtls13-pq-2-frag.conf @@ -0,0 +1,23 @@ +# server DTLSv1.3 with post-quantum group +-u +-v 4 +-l TLS13-AES256-GCM-SHA384 +--pqc P384_KYBER_LEVEL3 + +# client DTLSv1.3 with post-quantum group +-u +-v 4 +-l TLS13-AES256-GCM-SHA384 +--pqc P384_KYBER_LEVEL3 + +# server DTLSv1.3 with post-quantum group +-u +-v 4 +-l TLS13-AES256-GCM-SHA384 +--pqc P521_KYBER_LEVEL5 + +# client DTLSv1.3 with post-quantum group +-u +-v 4 +-l TLS13-AES256-GCM-SHA384 +--pqc P521_KYBER_LEVEL5 diff --git a/tests/test-dtls13-pq-frag.conf b/tests/test-dtls13-pq-frag.conf new file mode 100644 index 000000000..01aaf477f --- /dev/null +++ b/tests/test-dtls13-pq-frag.conf @@ -0,0 +1,24 @@ +# server DTLSv1.3 with post-quantum group +-u +-v 4 +-l TLS13-AES256-GCM-SHA384 +--pqc KYBER_LEVEL3 + +# client DTLSv1.3 with post-quantum group +-u +-v 4 +-l TLS13-AES256-GCM-SHA384 +--pqc KYBER_LEVEL3 + +# server DTLSv1.3 with post-quantum group +-u +-v 4 +-l TLS13-AES256-GCM-SHA384 +--pqc KYBER_LEVEL5 + +# client DTLSv1.3 with post-quantum group +-u +-v 4 +-l TLS13-AES256-GCM-SHA384 +--pqc KYBER_LEVEL5 +