]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix building nt_password_hash with gnutls
authorAndrey Utkin <andrey_utkin@gentoo.org>
Sat, 14 Apr 2018 23:34:35 +0000 (00:34 +0100)
committerJouni Malinen <j@w1.fi>
Sun, 15 Apr 2018 18:55:06 +0000 (21:55 +0300)
Even with

    CONFIG_TLS=gnutls
    CONFIG_CRYPTO=gnutls

in .config, nt_password_hash was linked with libcrypto instead of
libgcrypt, which caused linkage failure.

Signed-off-by: Andrey Utkin <andrey_utkin@gentoo.org>
hostapd/Makefile

index 98ce1151f0d1d4111e94ec44ef7574a17d11f416..616dbe2cc2c75b15b7353db2a21fa67bcf4e148f 100644 (file)
@@ -688,6 +688,7 @@ NEED_SHA256=y
 NEED_TLS_PRF_SHA256=y
 LIBS += -lcrypto
 LIBS_h += -lcrypto
+LIBS_n += -lcrypto
 ifdef CONFIG_TLS_ADD_DL
 LIBS += -ldl
 LIBS_h += -ldl
@@ -716,6 +717,7 @@ endif
 ifeq ($(CONFIG_CRYPTO), gnutls)
 LIBS += -lgcrypt
 LIBS_h += -lgcrypt
+LIBS_n += -lgcrypt
 CONFIG_INTERNAL_RC4=y
 CONFIG_INTERNAL_DH_GROUP5=y
 endif
@@ -1301,9 +1303,6 @@ ifdef CONFIG_WPA_TRACE
 NOBJS += ../src/utils/trace.o
 LIBS_n += -lbfd
 endif
-ifdef TLS_FUNCS
-LIBS_n += -lcrypto
-endif
 
 HOBJS += hlr_auc_gw.o ../src/utils/common.o ../src/utils/wpa_debug.o ../src/utils/os_$(CONFIG_OS).o ../src/utils/wpabuf.o ../src/crypto/milenage.o
 HOBJS += ../src/crypto/aes-encblock.o