Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions tests/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -69194,6 +69194,8 @@ static int test_tls_multi_handshakes_one_record(void)
struct test_memio_ctx test_ctx;
WOLFSSL_CTX *ctx_c = NULL, *ctx_s = NULL;
WOLFSSL *ssl_c = NULL, *ssl_s = NULL;
RecordLayerHeader* rh = NULL;
byte *len ;
int newRecIdx = RECORD_HEADER_SZ;
int idx = 0;

Expand All @@ -69211,7 +69213,10 @@ static int test_tls_multi_handshakes_one_record(void)
while (idx < test_ctx.c_len) {
word16 recLen;

ato16(((RecordLayerHeader*)(test_ctx.c_buff + idx))->length, &recLen);
rh = (RecordLayerHeader*)(test_ctx.c_buff + idx);
len = &rh->length[0];

ato16((const byte*)len, &recLen);
idx += RECORD_HEADER_SZ;

XMEMMOVE(test_ctx.c_buff + newRecIdx, test_ctx.c_buff + idx,
Expand All @@ -69220,8 +69225,9 @@ static int test_tls_multi_handshakes_one_record(void)
newRecIdx += recLen;
idx += recLen;
}
c16toa(newRecIdx - RECORD_HEADER_SZ,
((RecordLayerHeader*)test_ctx.c_buff)->length);
rh = (RecordLayerHeader*)(test_ctx.c_buff);
len = &rh->length[0];
c16toa(newRecIdx - RECORD_HEADER_SZ, len);
test_ctx.c_len = newRecIdx;

ExpectIntEQ(wolfSSL_connect(ssl_c), -1);
Expand Down