From: Arne Schwabe Date: Wed, 16 Feb 2022 12:56:53 +0000 (+0100) Subject: Fix mbed TLS compile if OpenSSL headers are not available X-Git-Tag: v2.6_beta1~269 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8a2794824ded011a1ed58aeb95321332b1ae684;p=thirdparty%2Fopenvpn.git Fix mbed TLS compile if OpenSSL headers are not available We unconditionally include openssl/opensslv.h which fails if OpenSSL header are not available. Signed-off-by: Arne Schwabe Acked-by: Gert Doering Message-Id: <20220216125653.4080943-1-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23804.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/xkey_common.h b/src/openvpn/xkey_common.h index e58748b42..16242b003 100644 --- a/src/openvpn/xkey_common.h +++ b/src/openvpn/xkey_common.h @@ -25,6 +25,9 @@ #ifndef XKEY_COMMON_H_ #define XKEY_COMMON_H_ +/* Guard to only enable if OpenSSL is used and not trigger an error if mbed + * TLS is compiled without OpenSSL being installed */ +#if defined(ENABLE_CRYPTO_OPENSSL) #include #if OPENSSL_VERSION_NUMBER >= 0x30000010L && !defined(DISABLE_XKEY_PROVIDER) #define HAVE_XKEY_PROVIDER 1 @@ -169,4 +172,6 @@ xkey_max_saltlen(int modBits, int hLen) } #endif /* HAVE_XKEY_PROVIDER */ +#endif /* ENABLE_CRYPTO_OPENSSL */ + #endif /* XKEY_COMMON_H_ */