From: Lev Stipakov Date: Wed, 6 Oct 2021 12:07:09 +0300 Message-Id: <20211006090709.200-1-lstipakov@...277...> Subject: [Openvpn-devel] [PATCH] Fix loading PKCS12 files on Windows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openvpn-devel@lists.sourceforge.net Cc: Lev Stipakov 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 --- 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. -- 2.23.0.windows.1