tests: add negative version negotation tests
This commit is contained in:
parent
b3ecdd2ecb
commit
6e4a3ecdbd
@ -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 \
|
||||
|
@ -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
|
||||
|
20
tests/test-dtls13-downgrade-fails.conf
Normal file
20
tests/test-dtls13-downgrade-fails.conf
Normal 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
|
Loading…
x
Reference in New Issue
Block a user