forked from wolfSSL/wolfssl
DTLS test cases
This commit is contained in:
committed by
Unknown
parent
4e60e4b3b7
commit
d88f6f1156
@ -15459,15 +15459,20 @@ int ProcessReply(WOLFSSL* ssl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (IsEncryptionOn(ssl, 0) && ssl->options.handShakeDone) {
|
if (IsEncryptionOn(ssl, 0) && ssl->options.handShakeDone) {
|
||||||
ssl->buffers.inputBuffer.idx += ssl->keys.padSz;
|
|
||||||
ssl->curSize -= (word16)ssl->keys.padSz;
|
|
||||||
#ifdef HAVE_AEAD
|
#ifdef HAVE_AEAD
|
||||||
if (ssl->specs.cipher_type == aead &&
|
if (ssl->specs.cipher_type == aead) {
|
||||||
ssl->specs.bulk_cipher_algorithm != wolfssl_chacha)
|
if (ssl->specs.bulk_cipher_algorithm != wolfssl_chacha)
|
||||||
ssl->curSize -= AESGCM_EXP_IV_SZ;
|
ssl->curSize -= AESGCM_EXP_IV_SZ;
|
||||||
|
ssl->buffers.inputBuffer.idx += ssl->specs.aead_mac_size;
|
||||||
|
ssl->curSize -= ssl->specs.aead_mac_size;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
ssl->buffers.inputBuffer.idx += ssl->keys.padSz;
|
||||||
|
ssl->curSize -= (word16)ssl->keys.padSz;
|
||||||
ssl->curSize -= ssl->specs.iv_size;
|
ssl->curSize -= ssl->specs.iv_size;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
|
#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
|
||||||
if (ssl->options.startedETMRead) {
|
if (ssl->options.startedETMRead) {
|
||||||
|
@ -822,6 +822,34 @@ int SuiteTest(int argc, char** argv)
|
|||||||
args.return_code = EXIT_FAILURE;
|
args.return_code = EXIT_FAILURE;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
/* add dtls grouping suites */
|
||||||
|
strcpy(argv0[1], "tests/test-dtls-group.conf");
|
||||||
|
printf("starting dtls message grouping 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");
|
||||||
|
printf("starting dtls secure renegotiation client 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;
|
||||||
|
}
|
||||||
|
strcpy(argv0[1], "tests/test-dtls-reneg-server.conf");
|
||||||
|
printf("starting dtls secure renegotiation server 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;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#ifdef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
|
#ifdef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
|
||||||
/* add dtls extra suites */
|
/* add dtls extra suites */
|
||||||
strcpy(argv0[1], "tests/test-dtls-sha2.conf");
|
strcpy(argv0[1], "tests/test-dtls-sha2.conf");
|
||||||
|
1045
tests/test-dtls-group.conf
Normal file
1045
tests/test-dtls-group.conf
Normal file
File diff suppressed because it is too large
Load Diff
1045
tests/test-dtls-reneg-client.conf
Normal file
1045
tests/test-dtls-reneg-client.conf
Normal file
File diff suppressed because it is too large
Load Diff
1045
tests/test-dtls-reneg-server.conf
Normal file
1045
tests/test-dtls-reneg-server.conf
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user