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

unit: Fix SAE unit test failure

The SAE unit test was written when group 19 was preferred by default for
all SAE connections.  However, we have now started to prefer higher
security groups.  Trick the test into using group 19 by wrapping
l_ecc_supported_ike_groups implementation to return just curve 19 as a
supported curve.
This commit is contained in:
Denis Kenzior 2021-07-15 17:18:10 -05:00
parent eab0bf6e8a
commit 64211c292d
2 changed files with 9 additions and 0 deletions

View File

@ -523,6 +523,7 @@ unit_test_sae_SOURCES = unit/test-sae.c \
src/util.h src/util.c \
src/mpdu.h src/mpdu.c
unit_test_sae_LDADD = $(ell_ldadd)
unit_test_sae_LDFLAGS = -Wl,-wrap,l_ecc_supported_ike_groups
unit_test_p2p_SOURCES = unit/test-p2p.c src/wscutil.h src/wscutil.c \
src/crypto.h src/crypto.c \

View File

@ -36,6 +36,14 @@
#include "src/auth-proto.h"
#include "src/crypto.h"
const unsigned int *__wrap_l_ecc_supported_ike_groups(void);
const unsigned int *__wrap_l_ecc_supported_ike_groups(void)
{
static unsigned int supported_ike_groups[2] = { 19, 0 };
return supported_ike_groups;
}
struct test_handshake_state {
struct handshake_state super;
};