Browse Source

Add dtls 1.3 PQC suites tests

Juliusz Sosinowicz 5 months ago
parent
commit
8bc79a0b43
4 changed files with 73 additions and 2 deletions
  1. 2 0
      tests/include.am
  2. 24 2
      tests/suites.c
  3. 23 0
      tests/test-dtls13-pq-2-frag.conf
  4. 24 0
      tests/test-dtls13-pq-frag.conf

+ 2 - 0
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 \

+ 24 - 2
tests/suites.c

@@ -966,10 +966,31 @@ int SuiteTest(int argc, char** argv)
         args.return_code = EXIT_FAILURE;
         goto exit;
     }
+    #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);
+        args.return_code = EXIT_FAILURE;
+        goto exit;
+    }
+    #endif
     #ifdef HAVE_LIBOQS
-    /* add DTLSv13 pq tests */
+    /* add DTLSv13 pq 2 tests */
     XSTRLCPY(argv0[1], "tests/test-dtls13-pq-2.conf", sizeof(argv0[1]));
-    printf("starting DTLSv13 post-quantum groups tests\n");
+    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);
@@ -978,6 +999,7 @@ int SuiteTest(int argc, char** argv)
     }
     #endif
     #endif
+    #endif
 #endif
 #if defined(WC_RSA_PSS) && (!defined(HAVE_FIPS) || \
      (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2))) && \

+ 23 - 0
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

+ 24 - 0
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
+