diff options
author | Jouni Malinen <j@w1.fi> | 2015-10-25 22:42:14 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2015-10-25 22:42:14 (GMT) |
commit | 8f3ea3175f80e75b326720f29b55a6888d8605cf (patch) | |
tree | 20fb569f4ada6adee524a2fe75f26ef41dfe6693 | |
parent | 1248e58492300ac23e0072a4ca9e14ab8abee13c (diff) | |
download | hostap-8f3ea3175f80e75b326720f29b55a6888d8605cf.zip hostap-8f3ea3175f80e75b326720f29b55a6888d8605cf.tar.gz hostap-8f3ea3175f80e75b326720f29b55a6888d8605cf.tar.bz2 |
tests: Fix build without CONFIG_ERP=y
hmac_sha256_kdf() got pulled in only if CONFIG_ERP=y is set. Fix
test_sha256() by making the test case conditional on the function being
present.
Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r-- | src/crypto/crypto_module_tests.c | 2 | ||||
-rw-r--r-- | wpa_supplicant/Android.mk | 1 | ||||
-rw-r--r-- | wpa_supplicant/Makefile | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/crypto/crypto_module_tests.c b/src/crypto/crypto_module_tests.c index 2d508c1..2b19a4a 100644 --- a/src/crypto/crypto_module_tests.c +++ b/src/crypto/crypto_module_tests.c @@ -1576,6 +1576,7 @@ static int test_sha256(void) key = os_malloc(8161); if (key) { +#ifdef CONFIG_HMAC_SHA256_KDF int res; res = hmac_sha256_kdf((u8 *) "secret", 6, "label", @@ -1593,6 +1594,7 @@ static int test_sha256(void) "Unexpected hmac_sha256_kdf(outlen=8161) success"); errors++; } +#endif /* CONFIG_HMAC_SHA256_KDF */ os_free(key); } diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk index efdb198..ef698d0 100644 --- a/wpa_supplicant/Android.mk +++ b/wpa_supplicant/Android.mk @@ -1277,6 +1277,7 @@ ifdef NEED_TLS_PRF_SHA256 SHA256OBJS += src/crypto/sha256-tlsprf.c endif ifdef NEED_HMAC_SHA256_KDF +L_CFLAGS += -DCONFIG_HMAC_SHA256_KDF SHA256OBJS += src/crypto/sha256-kdf.c endif OBJS += $(SHA256OBJS) diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index d6bebe3..61f8f18 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -1301,6 +1301,7 @@ ifdef NEED_TLS_PRF_SHA256 SHA256OBJS += ../src/crypto/sha256-tlsprf.o endif ifdef NEED_HMAC_SHA256_KDF +CFLAGS += -DCONFIG_HMAC_SHA256_KDF OBJS += ../src/crypto/sha256-kdf.o endif OBJS += $(SHA256OBJS) |