From 2c7b5a2c5fccd1e475151f58a50450272211e6a0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 4 Jun 2020 01:41:50 +0300 Subject: [PATCH] tests: Skip too short SAE-PK passwords in positive testing Lambda >= 12 is needed with Sec = 2, so drop the shorter password lengths in the sae_pk and module_wpa_supplicant test cases. Signed-off-by: Jouni Malinen --- src/common/common_module_tests.c | 6 ------ tests/hwsim/test_sae_pk.py | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/common/common_module_tests.c b/src/common/common_module_tests.c index 77d6001c8..8a7d9fe25 100644 --- a/src/common/common_module_tests.c +++ b/src/common/common_module_tests.c @@ -563,12 +563,6 @@ static int sae_pk_tests(void) { "aaaa-aaaa-aaaa", (u8 *) "\x00\x00\x00\x00\x00\x00\x00\x00" }, { "aaaa-aaaa-aa", (u8 *) "\x00\x00\x00\x00\x00\x00\x00" }, { "aaaa-aaaa", (u8 *) "\x00\x00\x00\x00\x00" }, - { "aaaa-aaa", (u8 *) "\x00\x00\x00\x00\x00" }, - { "aaaa-a", (u8 *) "\x00\x00\x00\x00" }, - { "aeaa-a", (u8 *) "\x01\x00\x00\x00" }, - { "7777-7", (u8 *) "\xff\xff\xff\x80" }, - { "7777-77", (u8 *) "\xff\xff\xff\xfc" }, - { "7777-777", (u8 *) "\xff\xff\xff\xff\xe0" }, { "7777-7777", (u8 *) "\xff\xff\xff\xff\xff" }, { "7777-7777-7", (u8 *) "\xff\xff\xff\xff\xff\xf8" }, { "7777-7777-77", (u8 *) "\xff\xff\xff\xff\xff\xff\xc0" }, diff --git a/tests/hwsim/test_sae_pk.py b/tests/hwsim/test_sae_pk.py index dfecbc5e9..4cd95cdc6 100644 --- a/tests/hwsim/test_sae_pk.py +++ b/tests/hwsim/test_sae_pk.py @@ -36,7 +36,7 @@ def test_sae_pk(dev, apdev): m = "431ff8322f93b9dc50ded9f3d14ace22" pk = "MHcCAQEEIAJIGlfnteonDb7rQyP/SGQjwzrZAnfrXIm4280VWajYoAoGCCqGSM49AwEHoUQDQgAEeRkstKQV+FSAMqBayqFknn2nAQsdsh/MhdX6tiHOTAFin/sUMFRMyspPtIu7YvlKdsexhI0jPVhaYZn1jKWhZg==" - for i in range(6, len(pw) + 1): + for i in range(14, len(pw) + 1): p = pw[:i] if p.endswith('-'): continue