]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wolfSSL: Fix a link error when WPS NFC is disabled
authorMasashi Honma <masashi.honma@gmail.com>
Wed, 27 Oct 2021 01:10:57 +0000 (10:10 +0900)
committerJouni Malinen <j@w1.fi>
Wed, 3 Nov 2021 11:04:16 +0000 (13:04 +0200)
/usr/bin/ld: /home/honma/git/hostap/build/wpa_supplicant/src/wps/wps.o: in function `wps_deinit':
/home/honma/git/hostap/wpa_supplicant/../src/wps/wps.c:184: undefined reference to `dh5_free'
/usr/bin/ld: /home/honma/git/hostap/build/wpa_supplicant/src/wps/wps_common.o: in function `wps_derive_keys':
/home/honma/git/hostap/wpa_supplicant/../src/wps/wps_common.c:83: undefined reference to `dh5_derive_shared'
/usr/bin/ld: /home/honma/git/hostap/wpa_supplicant/../src/wps/wps_common.c:84: undefined reference to `dh5_free'
/usr/bin/ld: /home/honma/git/hostap/build/wpa_supplicant/src/wps/wps_attr_build.o: in function `wps_build_public_key':
/home/honma/git/hostap/wpa_supplicant/../src/wps/wps_attr_build.c:68: undefined reference to `dh5_free'
/usr/bin/ld: /home/honma/git/hostap/wpa_supplicant/../src/wps/wps_attr_build.c:69: undefined reference to `dh5_init'
collect2: error: ld returned 1 exit status
make: *** [Makefile:1892: wpa_supplicant] Error 1

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
src/crypto/crypto_wolfssl.c

index 2e4bf8962b550b9bbdb9843024803d2de9bc5bc1..6f116eb62f531e0c46611aaad460969075ea69c4 100644 (file)
@@ -609,7 +609,7 @@ void crypto_cipher_deinit(struct crypto_cipher *ctx)
 #endif
 
 
-#ifdef CONFIG_WPS_NFC
+#ifdef CONFIG_WPS
 
 static const unsigned char RFC3526_PRIME_1536[] = {
        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0F, 0xDA, 0xA2,
@@ -695,6 +695,8 @@ done:
 }
 
 
+#ifdef CONFIG_WPS_NFC
+
 void * dh5_init_fixed(const struct wpabuf *priv, const struct wpabuf *publ)
 {
        DhKey *ret = NULL;
@@ -736,6 +738,8 @@ done:
        return ret;
 }
 
+#endif /* CONFIG_WPS_NFC */
+
 
 struct wpabuf * dh5_derive_shared(void *ctx, const struct wpabuf *peer_public,
                                  const struct wpabuf *own_private)
@@ -772,7 +776,7 @@ void dh5_free(void *ctx)
        XFREE(ctx, NULL, DYNAMIC_TYPE_TMP_BUFFER);
 }
 
-#endif /* CONFIG_WPS_NFC */
+#endif /* CONFIG_WPS */
 
 
 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey,