Add test case

This commit is contained in:
Eric Blankenhorn
2026-02-24 07:50:44 -06:00
parent 67de2349da
commit 4f8f11bcba
+5
View File
@@ -24070,6 +24070,11 @@ static int test_export_keying_material_cb(WOLFSSL_CTX *ctx, WOLFSSL *ssl)
NULL, 0, 0), 0);
ExpectIntEQ(wolfSSL_export_keying_material(ssl, ekm, sizeof(ekm),
"key expansion", XSTR_SIZEOF("key expansion"), NULL, 0, 0), 0);
/* contextLen overflow: values exceeding UINT16_MAX must be rejected to
* prevent integer overflow in seedLen calculation (ZD #21242). */
ExpectIntEQ(wolfSSL_export_keying_material(ssl, ekm, sizeof(ekm),
"Test label", XSTR_SIZEOF("Test label"), ekm,
(size_t)UINT16_MAX + 1, 1), 0);
return EXPECT_RESULT();
}