Skip to content

Commit 988ba34

Browse files
committed
address reviewer's comments
1 parent 0fa0fd2 commit 988ba34

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/internal.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25964,11 +25964,10 @@ int SendData(WOLFSSL* ssl, const void* data, size_t sz)
2596425964
outputSz = wolfSSL_GetRecordSize(ssl, (word32)sz - sent, 1);
2596525965
#if defined(WOLFSSL_DTLS) && !defined(WOLFSSL_NO_DTLS_SIZE_CHECK)
2596625966
if (ssl->options.dtls) {
25967-
int mtu;
2596825967
#if defined(WOLFSSL_DTLS_MTU)
25969-
mtu = ssl->dtlsMtuSz;
25968+
int mtu = ssl->dtlsMtuSz;
2597025969
#else
25971-
mtu = MAX_MTU;
25970+
int mtu = MAX_MTU;
2597225971
#endif
2597325972
if (outputSz > mtu) {
2597425973
error = DTLS_SIZE_ERROR;

tests/api/test_dtls.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,10 @@ int test_dtls_mtu_fragment_headroom(void)
15161516
#if !defined(WOLFSSL_AEAD_ONLY) && !defined(NO_AES) && !defined(NO_SHA)
15171517
{ wolfDTLSv1_2_client_method, wolfDTLSv1_2_server_method,
15181518
"ECDHE-RSA-AES128-SHA", 0 },
1519+
#ifdef WOLFSSL_DTLS_CID
1520+
{ wolfDTLSv1_2_client_method, wolfDTLSv1_2_server_method,
1521+
"ECDHE-RSA-AES128-SHA", 1 },
1522+
#endif
15191523
#endif
15201524
#endif
15211525
};
@@ -1532,6 +1536,7 @@ int test_dtls_mtu_fragment_headroom(void)
15321536
int ret;
15331537

15341538
XMEMSET(&test_ctx, 0, sizeof(test_ctx));
1539+
XMEMSET(payload, 'A', sizeof(payload));
15351540

15361541
ExpectIntEQ(test_memio_setup(&test_ctx, &ctx_c, &ctx_s, &ssl_c, &ssl_s,
15371542
params[i].client_meth, params[i].server_meth),

0 commit comments

Comments
 (0)