Skip to content

Commit 191b827

Browse files
committed
Fix from review
1 parent b218b29 commit 191b827

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

tests/api/test_tls.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -799,11 +799,16 @@ int test_tls12_etm_failed_resumption(void)
799799
ExpectIntEQ(wolfSSL_set_cipher_list(ssl_s, cbcSuite), WOLFSSL_SUCCESS);
800800
ExpectIntEQ(wolfSSL_set_session(ssl_c, sess), WOLFSSL_SUCCESS);
801801
ExpectIntEQ(test_memio_do_handshake(ssl_c, ssl_s, 10, NULL), 0);
802-
/* The server should NOT have actually resumed (fresh ctx, empty cache). */
803-
ExpectIntEQ(ssl_s->options.resuming, 0);
804-
/* And — the regression check — encrypt-then-MAC must still be active. */
805-
ExpectIntEQ(ssl_s->options.encThenMac, 1);
806-
ExpectIntEQ(ssl_c->options.encThenMac, 1);
802+
if (ssl_s != NULL) {
803+
/* The server should NOT have actually resumed (fresh ctx, empty
804+
* cache). */
805+
ExpectIntEQ(ssl_s->options.resuming, 0);
806+
/* And - the regression check - encrypt-then-MAC must still be
807+
* active. */
808+
ExpectIntEQ(ssl_s->options.encThenMac, 1);
809+
}
810+
if (ssl_c != NULL)
811+
ExpectIntEQ(ssl_c->options.encThenMac, 1);
807812

808813
wolfSSL_SESSION_free(sess);
809814
wolfSSL_free(ssl_c);

0 commit comments

Comments
 (0)