From 191b82757941bc273b5a54168aed22fbb18e0448 Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Thu, 9 Apr 2026 10:14:45 -0500 Subject: [PATCH] Fix from review --- tests/api/test_tls.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/api/test_tls.c b/tests/api/test_tls.c index 9e398f2474..4a46c796f4 100644 --- a/tests/api/test_tls.c +++ b/tests/api/test_tls.c @@ -799,11 +799,16 @@ int test_tls12_etm_failed_resumption(void) ExpectIntEQ(wolfSSL_set_cipher_list(ssl_s, cbcSuite), WOLFSSL_SUCCESS); ExpectIntEQ(wolfSSL_set_session(ssl_c, sess), WOLFSSL_SUCCESS); ExpectIntEQ(test_memio_do_handshake(ssl_c, ssl_s, 10, NULL), 0); - /* The server should NOT have actually resumed (fresh ctx, empty cache). */ - ExpectIntEQ(ssl_s->options.resuming, 0); - /* And — the regression check — encrypt-then-MAC must still be active. */ - ExpectIntEQ(ssl_s->options.encThenMac, 1); - ExpectIntEQ(ssl_c->options.encThenMac, 1); + if (ssl_s != NULL) { + /* The server should NOT have actually resumed (fresh ctx, empty + * cache). */ + ExpectIntEQ(ssl_s->options.resuming, 0); + /* And - the regression check - encrypt-then-MAC must still be + * active. */ + ExpectIntEQ(ssl_s->options.encThenMac, 1); + } + if (ssl_c != NULL) + ExpectIntEQ(ssl_c->options.encThenMac, 1); wolfSSL_SESSION_free(sess); wolfSSL_free(ssl_c);