Add session resumption testing for DTLS

This commit is contained in:
Juliusz Sosinowicz 2020-06-18 14:18:02 +02:00
parent b590e06f42
commit 03c5359fcd
5 changed files with 1060 additions and 3 deletions

View File

@ -3407,8 +3407,6 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
(void)ClientRead(sslResume, reply, sizeof(reply)-1, sendGET,
"Server resume: ", 0);
/* try to send session break */
(void)ClientWrite(sslResume, msg, msgSz, " resume 2", 0);
ret = wolfSSL_shutdown(sslResume);
if (wc_shutdown && ret == WOLFSSL_SHUTDOWN_NOT_DONE)

View File

@ -2139,6 +2139,10 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
dtlsUDP, dtlsSCTP, serverReadyFile ? 1 : 0, doListen);
doListen = 0; /* Don't listen next time */
if (port == 0) {
port = readySignal->port;
}
if (SSL_set_fd(ssl, clientfd) != WOLFSSL_SUCCESS) {
err_sys_ex(catastrophic, "error in setting fd");
}

View File

@ -34,6 +34,7 @@ EXTRA_DIST += tests/test.conf \
tests/test-dtls-group.conf \
tests/test-dtls-reneg-client.conf \
tests/test-dtls-reneg-server.conf \
tests/test-dtls-resume.conf \
tests/test-dtls-sha2.conf \
tests/test-sctp.conf \
tests/test-sctp-sha2.conf \

View File

@ -822,7 +822,7 @@ int SuiteTest(int argc, char** argv)
args.return_code = EXIT_FAILURE;
goto exit;
}
/* add dtls grouping suites */
/* add dtls grouping tests */
strcpy(argv0[1], "tests/test-dtls-group.conf");
printf("starting dtls message grouping tests\n");
test_harness(&args);
@ -831,6 +831,15 @@ int SuiteTest(int argc, char** argv)
args.return_code = EXIT_FAILURE;
goto exit;
}
/* add dtls session resumption tests */
strcpy(argv0[1], "tests/test-dtls-resume.conf");
printf("starting dtls session resumption 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 HAVE_SECURE_RENEGOTIATION
/* add dtls renegotiation tests */
strcpy(argv0[1], "tests/test-dtls-reneg-client.conf");

1045
tests/test-dtls-resume.conf Normal file

File diff suppressed because it is too large Load Diff