diff mbox

FILS: Fix compilation with CONFIG_FILS=y

Message ID 1443433532-10882-1-git-send-email-masashi.honma@gmail.com
State Accepted
Headers show

Commit Message

Masashi Honma Sept. 28, 2015, 9:45 a.m. UTC
Compilation of the hostapd with CONFIG_FILS=y fails with messages below.

../src/common/wpa_common.o: In function `fils_key_auth_sk':
/home/honma/hostap/hostapd/../src/common/wpa_common.c:352: undefined reference to `hmac_sha384_vector'
/home/honma/hostap/hostapd/../src/common/wpa_common.c:323: undefined reference to `hmac_sha384_vector'
../src/common/wpa_common.o: In function `fils_pmk_to_ptk':
/home/honma/hostap/hostapd/../src/common/wpa_common.c:257: undefined reference to `sha384_prf'
collect2: ld returned 1 exit status
make: *** [hostapd] Error 1

In addition, wpa_supplicant compilation fails also.

../src/common/wpa_common.o: In function `fils_key_auth_sk':
/home/honma/hostap/wpa_supplicant/../src/common/wpa_common.c:352: undefined reference to `hmac_sha384_vector'
/home/honma/hostap/wpa_supplicant/../src/common/wpa_common.c:323: undefined reference to `hmac_sha384_vector'
../src/common/wpa_common.o: In function `fils_pmk_to_ptk':
/home/honma/hostap/wpa_supplicant/../src/common/wpa_common.c:257: undefined reference to `sha384_prf'
../src/common/wpa_common.o: In function `fils_domain_name_hash':
/home/honma/hostap/wpa_supplicant/../src/common/wpa_common.c:1870: undefined reference to `crc32'
collect2: ld returned 1 exit status
make: *** [wpa_supplicant] Error 1

This patch fixes these issues.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
---
 hostapd/Makefile        | 1 +
 wpa_supplicant/Makefile | 6 ++++++
 2 files changed, 7 insertions(+)

Comments

Jouni Malinen Oct. 1, 2015, 8:03 p.m. UTC | #1
On Mon, Sep 28, 2015 at 06:45:32PM +0900, Masashi Honma wrote:
> Compilation of the hostapd with CONFIG_FILS=y fails with messages below.
...

> This patch fixes these issues.

Thanks! I merged this into the earlier commits in the fils branch since
that is still very much a moving target and subject to significant
cleanup before being ready for merging into the master branch.
diff mbox

Patch

diff --git a/hostapd/Makefile b/hostapd/Makefile
index b062735..31a5d95 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -243,6 +243,7 @@  ifdef CONFIG_FILS
 CFLAGS += -DCONFIG_FILS
 NEED_CRC32=y
 NEED_AES_GCM=y
+NEED_SHA384=y
 endif
 
 ifdef CONFIG_WNM
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 7efd7e0..68afae7 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -247,7 +247,9 @@  endif
 
 ifdef CONFIG_FILS
 CFLAGS += -DCONFIG_FILS
+NEED_CRC32=y
 NEED_AES_GCM=y
+NEED_SHA384=y
 endif
 
 ifdef CONFIG_WNM
@@ -1324,6 +1326,10 @@  ifdef NEED_ECC
 CFLAGS += -DCONFIG_ECC
 endif
 
+ifdef NEED_CRC32
+OBJS += ../src/utils/crc32.o
+endif
+
 ifdef CONFIG_NO_RANDOM_POOL
 CFLAGS += -DCONFIG_NO_RANDOM_POOL
 else