From patchwork Tue Oct 5 22:07:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lev Stipakov X-Patchwork-Id: 1978 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director12.mail.ord1d.rsapps.net ([172.28.255.1]) by backend30.mail.ord1d.rsapps.net with LMTP id CBWcAKNnXWECMwAAIUCqbw (envelope-from ) for ; Wed, 06 Oct 2021 05:08:51 -0400 Received: from proxy9.mail.ord1c.rsapps.net ([172.28.255.1]) by director12.mail.ord1d.rsapps.net with LMTP id qKRdAKNnXWHtbwAAIasKDg (envelope-from ) for ; Wed, 06 Oct 2021 05:08:51 -0400 Received: from smtp9.gate.ord1c ([172.28.255.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy9.mail.ord1c.rsapps.net with LMTPS id aF4lAKNnXWFIAwAAgxtkuw (envelope-from ) for ; Wed, 06 Oct 2021 05:08:51 -0400 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: smtp9.gate.ord1c.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=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: 0534b1da-2685-11ec-8cf8-0026b95bddb7-1-1 Received: from [216.105.38.7] ([216.105.38.7:42314] helo=lists.sourceforge.net) by smtp9.gate.ord1c.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 68/49-15515-2A76D516; Wed, 06 Oct 2021 05:08:50 -0400 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1mY2tv-000539-1X; Wed, 06 Oct 2021 09:07:47 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mY2tl-00052f-SK for openvpn-devel@lists.sourceforge.net; Wed, 06 Oct 2021 09:07:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding: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=XMRTggL+c298ao169FMBB/MSiTrWmTxmBCvvXV7JdA8=; b=ggYu3R8w3Z+5e10mdTn+yEZRCw S6gsVF/TSVGtjdyMotFM+tB8E2Call1Aluu7KpNDNrCN26e1RU+FA/YwOn2QPPtAPU2BGE9XqatOU Wie2Q55AqwfNkJdOPan8LxSZQgXtOJCHjV3i+N/YQdd7r7WaZWFVTb7+RwSKYVGvaTUg=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version: Content-Type:Content-Transfer-Encoding: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=XMRTggL+c298ao169FMBB/MSiTrWmTxmBCvvXV7JdA8=; b=VSY7xvo6K48Ac0w/MwBFboySsO 6ARKxcL7HhqOuX8NV9/k0xwDgHo24UDOWjXCY2LntA5iarnnJxbiWtvU8hLJa+Ai849GCU1jUGKnY Ie82NIie+gwwGE41gx4fLi9l+zVcmRgRnt933dpQd2FMrDKM9WkwdyhI8ey2TWMpiVvw=; Received: from mail-wr1-f42.google.com ([209.85.221.42]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) id 1mY2tb-008LF4-Vp for openvpn-devel@lists.sourceforge.net; Wed, 06 Oct 2021 09:07:33 +0000 Received: by mail-wr1-f42.google.com with SMTP id r10so6593732wra.12 for ; Wed, 06 Oct 2021 02:07:27 -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; bh=XMRTggL+c298ao169FMBB/MSiTrWmTxmBCvvXV7JdA8=; b=peqo2FcVBU7twr+3clofwsgNPuhHxtm6KR7nP/rEnI88VZLkEKbAeqrkXtHCMaJ+21 e+96tTd81cBnsO/IVcczsOaXWZqsbMQKJ5m38Vk5h64UkQwX3KxJqf2mFDFuNB1+iCoT lR/NgE6Koo2sYPcE4ztavOBwMF1/aWocKQkRK6B0K2OLAH7nsIRO8asyiMS+0vG2xapf uznhn2Z/7y/BsUzxYvQ63efsDDUgJnsI3KLUc4E5AD39WcmGaFvd/ww5Ss+dUagMzHHY hZlu242FdmFTM0RrmshMVXamlQn+A5Uehyt7O7S9Yis3UlR8aAPe1GIz377jKOOchTNr rlfA== 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; bh=XMRTggL+c298ao169FMBB/MSiTrWmTxmBCvvXV7JdA8=; b=zlW+jrxq1xQKNMQMCodxCTBZjbQD5eGzO7NRhPtmt2IFOimBosCUQt+wCfUVoWZsrr yLmlbEUXreev63EESf5ksdv3bW1QDxUov9D2RJqoJkvK3Yxg194qBeq+sPJbnResHLve YDkNXTrV/Kkdp1EonBMXmubpe+fz9S69DThvGvgKcaNYH9LxzsypUhPhyJT6tiK5hL0F WpIiye0W8VCkt+T8vWI9S91+l1aAlS/ABqooOH907rIAPMafr7JKqhIBl7arXLMyTv5T o5Tw786T5faeznhl73OtIs18M/Ni24QB9YoVcwbNzprSz0EtNX9q3tagd4PSuKOzCJT1 spjQ== X-Gm-Message-State: AOAM531Ebo5h6Ir1Qo3hq5aicWNXP1HwvwEDL0TTLuw3i8gv1/uF3SZX 73bs7W+LglqLVccpM9GjPVQSEUF91BY= X-Google-Smtp-Source: ABdhPJz+WFbmU4OmBJeYcKSqdklzDjVv3RQlc/h7RBKrQ0ioNzAkz5BiokPahR7ZaZjqGIGsijZbrw== X-Received: by 2002:a05:6000:184c:: with SMTP id c12mr27732729wri.150.1633511241374; Wed, 06 Oct 2021 02:07:21 -0700 (PDT) Received: from LAPTOP-4L3N7KFS.localdomain (nat2.panoulu.net. [185.38.2.2]) by smtp.gmail.com with ESMTPSA id f7sm2146634wmj.20.2021.10.06.02.07.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 02:07:21 -0700 (PDT) From: Lev Stipakov To: openvpn-devel@lists.sourceforge.net Date: Wed, 6 Oct 2021 12:07:09 +0300 Message-Id: <20211006090709.200-1-lstipakov@gmail.com> X-Mailer: git-send-email 2.17.1 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: Lev Stipakov Starting from 2.5.4 we have switched to MSVC builds, including dependencies such as OpenSSL. When we link with natively-built OpenSSL .DLLs (not cross compiled with MinGW), we are expected to include applink.c, which provides glue between OpenSSL BIO layer and compiler run-time. This doesn't [...] Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.42 listed in list.dnswl.org] 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 [lstipakov[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.42 listed in wl.mailspike.net] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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 X-Headers-End: 1mY2tb-008LF4-Vp Subject: [Openvpn-devel] [PATCH] Fix loading PKCS12 files on Windows 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: Lev Stipakov MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Lev Stipakov Starting from 2.5.4 we have switched to MSVC builds, including dependencies such as OpenSSL. When we link with natively-built OpenSSL .DLLs (not cross compiled with MinGW), we are expected to include applink.c, which provides glue between OpenSSL BIO layer and compiler run-time. This doesn't apply to ARM64. Failure to do that results in "no OPENSSL_Applink" fatal error when calling, for example, d2i_PKCS12_fp(), which we do when loading PKCS12 files. Signed-off-by: Lev Stipakov Acked-by: Gert Doering --- src/openvpn/ssl_openssl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index 31d94f2b..27fb66aa 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -65,6 +65,10 @@ #include #endif +#if defined(_MSC_VER) && !defined(_M_ARM64) +#include +#endif + /* * Allocate space in SSL objects in which to store a struct tls_session * pointer back to parent.