3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

unit: Add basic test for crypto_derive_sae_pt_ecc

This commit is contained in:
Denis Kenzior 2021-07-07 12:52:27 -05:00
parent 277437f3d6
commit 3f1e4cce65

View File

@ -835,6 +835,11 @@ static void test_pt_pwe(const void *data)
l_ecc_scalar_free(u1); l_ecc_scalar_free(u1);
l_ecc_scalar_free(u2); l_ecc_scalar_free(u2);
p1 = crypto_derive_sae_pt_ecc(19, ssid, password, identifier);
assert(p1);
assert(l_ecc_points_are_equal(p1, pt));
l_ecc_point_free(p1);
if (memcmp(mac1, mac2, 6) > 0) { if (memcmp(mac1, mac2, 6) > 0) {
memcpy(sorted_macs, mac1, 6); memcpy(sorted_macs, mac1, 6);
memcpy(sorted_macs + 6, mac2, 6); memcpy(sorted_macs + 6, mac2, 6);