mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 15:50:51 +02:00
Add test case
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user