mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 17:59:25 +01:00
unit: Add basic test for crypto_derive_sae_pt_ecc
This commit is contained in:
parent
277437f3d6
commit
3f1e4cce65
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user