From: Lev Stipakov Date: Wed, 6 Oct 2021 09:07:09 +0000 (+0300) Subject: Fix loading PKCS12 files on Windows X-Git-Tag: v2.6_beta1~424 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af5de933a0633436e0fe00c42464f4a7ab5ac509;p=thirdparty%2Fopenvpn.git Fix loading PKCS12 files on Windows 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 Message-Id: <20211006090709.200-1-lstipakov@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22920.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index 241206fb2..9a7cb9c64 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.