From patchwork Fri Jan 21 09:10:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sommerseth X-Patchwork-Id: 2243 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director9.mail.ord1d.rsapps.net ([172.27.255.7]) by backend41.mail.ord1d.rsapps.net with LMTP id kBM1MY8T62EGewAAqwncew (envelope-from ) for ; Fri, 21 Jan 2022 15:11:59 -0500 Received: from proxy17.mail.iad3a.rsapps.net ([172.27.255.7]) by director9.mail.ord1d.rsapps.net with LMTP id sNgGOY8T62FHYwAAalYnBA (envelope-from ) for ; Fri, 21 Jan 2022 15:11:59 -0500 Received: from smtp3.gate.iad3a ([172.27.255.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy17.mail.iad3a.rsapps.net with LMTPS id WHgKG5AT62EbDgAAR4KW9A (envelope-from ) for ; Fri, 21 Jan 2022 15:12:00 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp3.gate.iad3a.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=sf.lists.topphemmelig.net; dmarc=fail (p=none; dis=none) header.from=sf.lists.topphemmelig.net X-Suspicious-Flag: YES X-Classification-ID: 632f3a1a-7af6-11ec-a20b-525400af4d07-1-1 Received: from [216.105.38.7] ([216.105.38.7:43470] helo=lists.sourceforge.net) by smtp3.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 05/2D-17216-F831BE16; Fri, 21 Jan 2022 15:11:59 -0500 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nB0FS-0003h7-Qd; Fri, 21 Jan 2022 20:11:01 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nB0FS-0003h1-5B for openvpn-devel@lists.sourceforge.net; Fri, 21 Jan 2022 20:11:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=279tmA0bbclm/yi1wM6ro2OFIu2y1HipbkNMnptEmzk=; b=BxdiJFH+FRCj1ju2UIbro6YzQG o0VLZy4XXbVWgCkTcgK/pbs44a5FjBFpXTByD/0eEoujt/O8umGMNsnPfTlWU+X91Ku0DEJ9liPIi M38Lp+D2xaI9XtVJaCxUjPnMvLyoJcJRkwVrlcefqwetDKP6JAkpM1dDpuAv1i09DELQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=279tmA0bbclm/yi1wM6ro2OFIu2y1HipbkNMnptEmzk=; b=R z/KfpcCMuHKsZDonFIt262vWByjQ5zc1HV6ELfdZz5o9sr8ZxPgOovmWC/tFFfFYYCVwPynB5XTE/ rbQv9DGDwz2sM3RUFZ+PObZ4bne0L9EdWKfFs77ljOGFliVNypNSgW2FE+NKIXXcVZCTKgeoK9lNr 71TA1+kWpwSxHvY0=; Received: from mx1.basenordic.cloud ([217.170.196.134]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1nB0FM-006bg3-Rm for openvpn-devel@lists.sourceforge.net; Fri, 21 Jan 2022 20:11:00 +0000 Received: from localhost (unknown [127.0.0.1]) by mx1.basenordic.cloud (Postfix) with ESMTP id 49793E715; Fri, 21 Jan 2022 20:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sf.lists.topphemmelig.net; s=inouz9eefah2too5; t=1642795844; bh=279tmA0bbclm/yi1wM6ro2OFIu2y1HipbkNMnptEmzk=; h=From:To:Cc:Subject:Date:From; b=oQHmf/x+ssIy1Hg921jKn7cBTIGLrhhH2ymIvx41mx0q8kJ4YYlsnMXpo0WEDA9DV 2zIJ5eQgV3v56wrYTZMwRO/juiVu8262d2A9s3KlU6S5T7oTDDzIiBScrvI8oOQ+Ee sQbr3wIMVsOqa9dLt4AdCgeLHKJmgvglSF6MMYaV3oHe0Hw4v1DQIUP3RKAEgv3QGD LwoupMMBCjWJxr0GZAI1xu2PxoqXKzU3o3ZF6biqFRwlTNwu7Qfn+yfyJF/T7E+36C sAowgIAF+uODYK7vTiCDE0qLL8Kmy00LvYiSenMHvbwQQifua8dOf1MzrYOHoJAyko GUqvt1IymqMTw== Received: from mx1.basenordic.cloud ([127.0.0.1]) by localhost (mx1.basenordic.cloud [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9Y6ptsfshcG7; Fri, 21 Jan 2022 21:10:43 +0100 (CET) Received: from xplorer.net (unknown [10.35.7.11]) by mx1.basenordic.cloud (Postfix) with ESMTP id 8959FE712; Fri, 21 Jan 2022 21:10:43 +0100 (CET) From: David Sommerseth To: openvpn-devel@lists.sourceforge.net Date: Fri, 21 Jan 2022 21:10:38 +0100 Message-Id: <20220121201038.49684-1-openvpn@sf.lists.topphemmelig.net> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", 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: From: David Sommerseth With commit 544330fefedc87, the openssl_compat.h got included in crypto.c. This caused issues when building against mbed TLS, which this compat layer is not targeting. Content analysis details: (-2.4 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [217.170.196.134 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1nB0FM-006bg3-Rm Subject: [Openvpn-devel] [PATCH] crypto: Fix mbedtls builds X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Sommerseth Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: David Sommerseth With commit 544330fefedc87, the openssl_compat.h got included in crypto.c. This caused issues when building against mbed TLS, which this compat layer is not targeting. This issue is resolved by only including this header when the OpenSSL library is in use. The OPENSSL_FIPS macro should never be set when compiling against the mbed TLS library. But we check against the main ENABLE_CRYPTO_OPENSSL macro here, in case future updates adds more OpenSSL specific fragments. Signed-off-by: David Sommerseth --- src/openvpn/crypto.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openvpn/crypto.c b/src/openvpn/crypto.c index 5f6ad675..d55ca099 100644 --- a/src/openvpn/crypto.c +++ b/src/openvpn/crypto.c @@ -34,7 +34,9 @@ #include "error.h" #include "integer.h" #include "platform.h" +#ifdef ENABLE_CRYPTO_OPENSSL #include "openssl_compat.h" +#endif #include "memdbg.h"