tests: add negative version negotation tests

pull/5524/head
Marco Oliverio 2022-09-05 14:43:20 +02:00
parent b3ecdd2ecb
commit 6e4a3ecdbd
3 changed files with 33 additions and 0 deletions

View File

@ -45,6 +45,7 @@ EXTRA_DIST += tests/unit.h \
tests/test-dtls-srtp-fails.conf \
tests/test-dtls13.conf \
tests/test-dtls13-downgrade.conf \
tests/test-dtls13-downgrade-fails.conf \
tests/test-dtls13-psk.conf \
tests/test-dtls13-cid.conf \
tests/test-sctp.conf \

View File

@ -1151,6 +1151,18 @@ int SuiteTest(int argc, char** argv)
args.return_code = EXIT_FAILURE;
goto exit;
}
args.argc = 3;
strcpy(argv0[1], "tests/test-dtls13-downgrade-fails.conf");
strcpy(argv0[2], "expFail");
printf("starting DTLSv1.3 suite - downgrade - (expFails)\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;
}
args.argc = 2;
XMEMSET(argv0[2], 0, sizeof(argv0[2]));
#endif /* WOLFSSL_NO_TLS12 */
#ifndef NO_PSK

View File

@ -0,0 +1,20 @@
# server DTLSv1.3
-v4
-u
-l TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
# client DTLSv1.2
-v 3
-u
-l TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
# server DTLSv1.3
-vd
-7 3
-u
-l TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
# client DTLSv1.0
-v 2
-u
-l TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA