Skip to content

Commit 3cba5c6

Browse files
committed
fixup! dtls13: additional epoch checks
1 parent 3f56003 commit 3cba5c6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/api/test_dtls.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ int test_wolfSSL_dtls_cid_parse(void)
598598

599599
int test_dtls13_epochs(void) {
600600
EXPECT_DECLS;
601-
#if defined(WOLFSSL_DTLS13)
601+
#if defined(WOLFSSL_DTLS13) && !defined(NO_WOLFSSL_CLIENT)
602602
WOLFSSL_CTX* ctx = NULL;
603603
WOLFSSL* ssl = NULL;
604604
byte input[20];
@@ -612,13 +612,13 @@ int test_dtls13_epochs(void) {
612612
ExpectTrue(ssl->options.tls1_3 = 1);
613613

614614
inOutIdx = 0;
615-
ssl->keys.curEpoch64 = w64From32(0x0, 0x0);
615+
if (ssl != NULL) ssl->keys.curEpoch64 = w64From32(0x0, 0x0);
616616
ExpectIntEQ(DoApplicationData(ssl, input, &inOutIdx, 0), SANITY_MSG_E);
617617
inOutIdx = 0;
618-
ssl->keys.curEpoch64 = w64From32(0x0, 0x2);
618+
if (ssl != NULL) ssl->keys.curEpoch64 = w64From32(0x0, 0x2);
619619
ExpectIntEQ(DoApplicationData(ssl, input, &inOutIdx, 0), SANITY_MSG_E);
620620

621-
ssl->keys.curEpoch64 = w64From32(0x0, 0x1);
621+
if (ssl != NULL) ssl->keys.curEpoch64 = w64From32(0x0, 0x1);
622622
ExpectIntEQ(Dtls13CheckEpoch(ssl, client_hello), SANITY_MSG_E);
623623
ExpectIntEQ(Dtls13CheckEpoch(ssl, server_hello), SANITY_MSG_E);
624624
ExpectIntEQ(Dtls13CheckEpoch(ssl, hello_verify_request), SANITY_MSG_E);

0 commit comments

Comments
 (0)