Fix test failures due to not re-arming DH params

pull/10978/head
Kareem 2026-08-28 11:19:58 -07:00
parent b0acc953d8
commit a219b2f2be
1 changed files with 7 additions and 0 deletions

View File

@ -576,6 +576,10 @@ int test_tls_ems_clear_reuse(void)
ExpectIntEQ(wolfSSL_clear(ssl_s), WOLFSSL_SUCCESS);
test_memio_clear_buffer(&test_ctx, 0);
test_memio_clear_buffer(&test_ctx, 1);
#ifndef NO_DH
/* The handshake released the DH params: re-arm like test_memio_setup. */
SetDH(ssl_s);
#endif
ExpectIntEQ(ssl_c->options.haveEMS, 1);
ExpectIntEQ(ssl_s->options.haveEMS, 0);
@ -591,6 +595,9 @@ int test_tls_ems_clear_reuse(void)
ExpectIntEQ(wolfSSL_clear(ssl_s), WOLFSSL_SUCCESS);
test_memio_clear_buffer(&test_ctx, 0);
test_memio_clear_buffer(&test_ctx, 1);
#ifndef NO_DH
SetDH(ssl_s);
#endif
ExpectIntEQ(wolfSSL_DisableExtendedMasterSecret(ssl_c), WOLFSSL_SUCCESS);
ExpectIntEQ(test_memio_do_handshake(ssl_c, ssl_s, 10, NULL), 0);
ExpectIntEQ(ssl_c->options.haveEMS, 0);