From patchwork Wed Oct 27 01:10:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masashi Honma X-Patchwork-Id: 1546696 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=VRznAZSB; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=E51Kh4z9; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hf9fD3Njcz9sS8 for ; Wed, 27 Oct 2021 12:12:36 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=tGNHjX9+wrnTaAjBWPZ7m8L+sT61E6U6iX7LfnO5r9A=; b=VRznAZSBsUurq9 uPoReRdkT20SHCFs7//CajtsI15vCJEbYJgPlxpe+pguNgHlA0WmB7IJtEK+jIYqOR1OH1DrlY7VO /DtJlCgZC073aSmdRRgT28NwpklhLPzTDMxhTsxwVZlDlcnK42cF4Tw/QDAY8cjXofHy9MDjPeKB8 eUOd1YFINc6RJnxI1F0HMarbHPqECjcusEO43nrb+n4cwNGV1ke9DalTeESk/KMhJyPqRfSnLvKYr epRb84yqeoImAmrJYv9dlHUhbQQvUwZFQtxr72w0CU7M1VopnDfjRzDjfvJXwZiuuCRWEfQcVkZOn uak1Sp0IXa58YoAaM6Gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfXTG-003SfF-Oj; Wed, 27 Oct 2021 01:11:14 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfXTD-003Sew-Ex for hostap@lists.infradead.org; Wed, 27 Oct 2021 01:11:12 +0000 Received: by mail-pf1-x433.google.com with SMTP id k26so1129147pfi.5 for ; Tue, 26 Oct 2021 18:11:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=l3nGLkNUL+zmLavIJqg1q1F61X5/Vx8JZPFSOXT1hB4=; b=E51Kh4z9CIsKhafTe+oerCMki9qmQXYJiOs1FhF0/QFVKfMZOo9P3Sl7BOjwv+s80/ bb90kAWQ8PEnTRBwXLw0l809oP0zkMpi8L+Rzy+WKnxOVp24kxRo7Nk24m6GwtOZdzpw /5X4uh8vi+5a1IrFPsajzAQzmnToyjVgKWYthP/acuu00J9tE464inRIo/kcaTHytzUQ qJj8cLnnAaQmzHxDfti8XsEcji8MEwglZix/N6ir+gv3fK0jte3Za+tDQ9J9AdOjBHaG MCfGuLS6Ea40n8Kn8RL2CW7FrIEsx2vvxTsR7ft0x3jOIfXzp5Qf+UC0bX/KR2ehi4iD P1zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=l3nGLkNUL+zmLavIJqg1q1F61X5/Vx8JZPFSOXT1hB4=; b=WaRizwn+JwcCtSvcrBqas/HVOzSXK3JrxPTZSsjLnlRH8Agt8CLUhq5N5V/g7OT60F q91mfnuKwdyeHeo7BImJXUqb4qML7eBK605w0XYVsO7EulhcRdU+1WSixGc+TBDGsVYv a9cKiGFy57wlPCzSQ/lRZbDd/ZcJ/RCB6S4IE5i0XdVwa9xMkfMN4nKMtMF50LoHiGrl oFEvUb4WYVFE5z7PnPu1OSkaQ7cbPfbVhQP5fVJDBg6WQX/KoB6U2L01OI7OsUKM7YzB 6XNqkaqEqDsB8CGEe6+VBQDsy3lpgnQCsmCBCsgN0PIKFxptK4LsDpxYHh5k1GwZMLS1 A93Q== X-Gm-Message-State: AOAM530Ky99K4/llpPxiE8ZxSFN1r5Qh7oY66qqEkJf298t2P2dnB+mg QG+0VQBn8wrXlfUpkKLFN/WviKHdWt0= X-Google-Smtp-Source: ABdhPJyhB34xk/KLLn8lhqXYAkLq4wfbRvgbZgVnLh5DyLp8w2u3wsJmAH5w5j7rFc3ewoF9nrlkew== X-Received: by 2002:a63:7f0f:: with SMTP id a15mr18364604pgd.9.1635297070026; Tue, 26 Oct 2021 18:11:10 -0700 (PDT) Received: from gtx1060.flets-east.jp ([2409:11:53c0:1f00:bfe5:13ae:6a24:93f3]) by smtp.gmail.com with ESMTPSA id b16sm24777742pfm.58.2021.10.26.18.11.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 18:11:09 -0700 (PDT) From: Masashi Honma To: hostap@lists.infradead.org Cc: Masashi Honma Subject: [PATCH] wolfSSL: Fix a link error when WPS NFC is disabled Date: Wed, 27 Oct 2021 10:10:57 +0900 Message-Id: <20211027011057.39631-1-masashi.honma@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211026_181111_542634_BFC5F144 X-CRM114-Status: GOOD ( 14.78 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: /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 [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:433 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [masashi.honma[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org /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 --- src/crypto/crypto_wolfssl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/crypto/crypto_wolfssl.c b/src/crypto/crypto_wolfssl.c index 2e4bf8962..6f116eb62 100644 --- a/src/crypto/crypto_wolfssl.c +++ b/src/crypto/crypto_wolfssl.c @@ -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,