[PATCH] hostapd: apply patch to fix building openssl variant

Paul Blazejowski paulb at blazebox.homeip.net
Mon Jul 4 08:24:43 PDT 2022


Add patch from:
https://patchwork.ozlabs.org/project/hostap/patch/20220622121355.1337612-1-a.heider@gmail.com/

Fixes: dab9103 ("hostapd: update to 2022-06-02")

Signed-off-by: Paul Blazejowski <paulb at blazebox.homeip.net>
---
 .../patches/992-openssl-include-rsa.patch     | 177 ++++++++++++++++++
 1 file changed, 177 insertions(+)
 create mode 100644 package/network/services/hostapd/patches/992-openssl-include-rsa.patch

diff --git a/package/network/services/hostapd/patches/992-openssl-include-rsa.patch b/package/network/services/hostapd/patches/992-openssl-include-rsa.patch
new file mode 100644
index 0000000000..dccf4fa639
--- /dev/null
+++ b/package/network/services/hostapd/patches/992-openssl-include-rsa.patch
@@ -0,0 +1,177 @@
+From patchwork Wed Jun 22 12:13:55 2022
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+X-Patchwork-Submitter: Andre Heider <a.heider at gmail.com>
+X-Patchwork-Id: 1650717
+Return-Path: 
+ <hostap-bounces+incoming=patchwork.ozlabs.org at lists.infradead.org>
+X-Original-To: incoming at patchwork.ozlabs.org
+Delivered-To: patchwork-incoming at 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=lGQ5d+3r;
+	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=oZEzEVkh;
+	dkim-atps=neutral
+Authentication-Results: ozlabs.org;
+ spf=none (no SPF record) smtp.mailfrom=lists.infradead.org
+ (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;
+ envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org at lists.infradead.org;
+ receiver=<UNKNOWN>)
+Received: from bombadil.infradead.org (bombadil.infradead.org
+ [IPv6:2607:7c80:54:3::133])
+	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
+	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest
+ SHA256)
+	(No client certificate requested)
+	by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LYbtd5SsXz9s09
+	for <incoming at patchwork.ozlabs.org>; Thu, 30 Jun 2022 21:38:17 +1000 (AEST)
+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:To
+	:From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:
+	Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:
+	List-Owner; bh=fJOJgONq7Ju4Q8DO2ZSGDAeBzziAezJxsd/RJ0evEYA=; b=lGQ5d+3rmD0HXm
+	Ozg9mP9AIal1oNDzQnahgss+OBx60Vy6MJj/ih6ehdkfsuxDgEkhhXQGqhDvuSHzarGTTsKeYbT0I
+	anoweLH1hr1gLGtymPyCE3lV+5fr0BZPQCF2X3scgHpr9GeLIdIJyjxVo7HVUTrAUfltU7emKR/Vh
+	U6ecBu8S+MnDI4iLPycr2zDwvl7Ow6utk1855gESBkYXcVpa1AHlZWLB0rTCk8VVkJtjhin8X+ep+
+	1n6wrdISdWoYQ4lyrr8ECG8MNl1Bh4dXxDZ2ZWxV2CQUv9FBmJp6EA78WFYbl8Qz4ASjcLofdjPOa
+	D3ff/lHW8y1xEnP9NusA==;
+Received: from localhost ([::1] helo=bombadil.infradead.org)
+	by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux))
+	id 1o6sTt-00GsCE-1f; Thu, 30 Jun 2022 11:37:09 +0000
+Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629])
+	by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux))
+	id 1o3zFC-00AJUB-6C
+	for hostap at lists.infradead.org; Wed, 22 Jun 2022 12:14:03 +0000
+Received: by mail-ej1-x629.google.com with SMTP id pk21so10677564ejb.2
+        for <hostap at lists.infradead.org>;
+ Wed, 22 Jun 2022 05:14:01 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=20210112;
+        h=from:to:subject:date:message-id:mime-version
+         :content-transfer-encoding;
+        bh=AMNUmfKzCqd/kswglg673XVAd11meZfmFouCh8nGnos=;
+        b=oZEzEVkh0EBcihV+npOUKXF8yX0QxuT+Sw3R97FtGdxrK1N8rLwQIIy42H5Ult+vZ4
+         CE+P1m1KCl+hNkLAUGGewovoWAsQQQqvBeyi7/7Icc6ElvLTTrixpVXDa0YnylesgCjZ
+         fkgSvjXztT7G3iJ0XmAqehtEFJp+0bz0Ax5UhmTSG1fhI9xxDH3Ttq/3u1DmPEi1s4Bs
+         N53J7MsclvD+7AngWfnTL6S4+AH0Ijxi/Owlcdg+TR4jiNetjJZSltXJwtTv5WLm/6BW
+         FhgrAiYk84/S1M5OC3UvV8djnyAqRUr8rTCx2cTrontLAADJdnu7d3GkfPvdRNdM0vhC
+         Q6ew==
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=1e100.net; s=20210112;
+        h=x-gm-message-state:from:to:subject:date:message-id:mime-version
+         :content-transfer-encoding;
+        bh=AMNUmfKzCqd/kswglg673XVAd11meZfmFouCh8nGnos=;
+        b=czNmd80ZOdR+EiGdluvj4w2JrBDUWXIibUlJGhpzjeV+xl/YyUus+5Fj94mnU1rBmC
+         yZLABXjgjOwi/YVy8nWtXsEOdKVhflpC/FfXuRBruMUIacGnq/dzGfTE1cMi2iMCl5ld
+         p+tumWJaYe2oDs4UILL9xnAKi+RH0IVqJ898jcw9W8Y5J1iGlipqczp8OlqX3ZLgEODa
+         cNt6G90vYELnEHHARACMM1BtS9zi+BrfTwcHmFHT3y2QuOnhISrDVtz4+gEtHcma94iz
+         lI1CExnrbQjPsgQMoG6FvPiggr1QehqDAaOB6ZwbEU+xB0zSbS8Ezt2teCKY2stHSBc6
+         IA3g==
+X-Gm-Message-State: AJIora9L96QN7b8RxT9Sqyy15WfSKv93NJfmZRRtaucnG5sSDdPfx+ih
+	afk+6a6alTTE8T/HZzuHpYu+azvoRE/weQ==
+X-Google-Smtp-Source: 
+ AGRyM1sJCJJtzaYbJU0tvk/cfiyfzOzGtz+ja3ugU6RLGYccQ+wKLGpknpk3tObMhvK/csNm81XLTQ==
+X-Received: by 2002:a17:907:1c06:b0:6df:b257:cbb3 with SMTP id
+ nc6-20020a1709071c0600b006dfb257cbb3mr2799188ejc.631.1655900040810;
+        Wed, 22 Jun 2022 05:14:00 -0700 (PDT)
+Received: from localhost.localdomain (a89-182-216-51.net-htp.de.
+ [89.182.216.51])
+        by smtp.gmail.com with ESMTPSA id
+ b19-20020a17090630d300b00722c44f9301sm4796642ejb.224.2022.06.22.05.14.00
+        for <hostap at lists.infradead.org>
+        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
+        Wed, 22 Jun 2022 05:14:00 -0700 (PDT)
+From: Andre Heider <a.heider at gmail.com>
+To: hostap at lists.infradead.org
+Subject: [PATCH] OpenSSL: Include rsa.h for all OpenSSL versions
+Date: Wed, 22 Jun 2022 14:13:55 +0200
+Message-Id: <20220622121355.1337612-1-a.heider at gmail.com>
+X-Mailer: git-send-email 2.35.1
+MIME-Version: 1.0
+X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 
+X-CRM114-CacheID: sfid-20220622_051402_283512_B2D55CA5 
+X-CRM114-Status: GOOD (  12.45  )
+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:  This fixes the build with OpenSSL 1.1.1:
+ ../src/crypto/crypto_openssl.c:
+    In function 'crypto_rsa_oaep_sha256_decrypt':
+ ../src/crypto/crypto_openssl.c:4404:49:
+    error: 'RSA_PKCS1_OAEP_PADDING' undeclare [...]
+ 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
+                             [2a00:1450:4864:20:0:0:0:629 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
+                             [a.heider[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-Mailman-Approved-At: Thu, 30 Jun 2022 04:37:07 -0700
+X-BeenThere: hostap at lists.infradead.org
+X-Mailman-Version: 2.1.34
+Precedence: list
+List-Id: <hostap.lists.infradead.org>
+List-Unsubscribe: <http://lists.infradead.org/mailman/options/hostap>,
+ <mailto:hostap-request at lists.infradead.org?subject=unsubscribe>
+List-Archive: <http://lists.infradead.org/pipermail/hostap/>
+List-Post: <mailto:hostap at lists.infradead.org>
+List-Help: <mailto:hostap-request at lists.infradead.org?subject=help>
+List-Subscribe: <http://lists.infradead.org/mailman/listinfo/hostap>,
+ <mailto:hostap-request at lists.infradead.org?subject=subscribe>
+Sender: "Hostap" <hostap-bounces at lists.infradead.org>
+Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org at lists.infradead.org
+
+This fixes the build with OpenSSL 1.1.1:
+../src/crypto/crypto_openssl.c: In function 'crypto_rsa_oaep_sha256_decrypt':
+../src/crypto/crypto_openssl.c:4404:49: error: 'RSA_PKCS1_OAEP_PADDING' undeclared (first use in this function)
+
+Signed-off-by: Andre Heider <a.heider at gmail.com>
+---
+ src/crypto/crypto_openssl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c
+index 08e9f2645..a20c8fe78 100644
+--- a/src/crypto/crypto_openssl.c
++++ b/src/crypto/crypto_openssl.c
+@@ -16,6 +16,7 @@
+ #include <openssl/dh.h>
+ #include <openssl/hmac.h>
+ #include <openssl/rand.h>
++#include <openssl/rsa.h>
+ #include <openssl/pem.h>
+ #ifdef CONFIG_ECC
+ #include <openssl/ec.h>
+@@ -25,7 +26,6 @@
+ #include <openssl/provider.h>
+ #include <openssl/core_names.h>
+ #include <openssl/param_build.h>
+-#include <openssl/rsa.h>
+ #include <openssl/encoder.h>
+ #include <openssl/decoder.h>
+ #else /* OpenSSL version >= 3.0 */
-- 
2.37.0




More information about the openwrt-devel mailing list