From: Zbigniew Jędrzejewski-Szmek Date: Wed, 18 Dec 2019 08:38:25 +0000 (+0100) Subject: Make openssl dependency optional again X-Git-Tag: v245-rc1~234^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b012a1f455cbc82567632bc30a07a238c61a2aaa;p=thirdparty%2Fsystemd.git Make openssl dependency optional again --- diff --git a/src/shared/openssl-util.h b/src/shared/openssl-util.h index dcb9c9ffa6a..a7dab530e4c 100644 --- a/src/shared/openssl-util.h +++ b/src/shared/openssl-util.h @@ -1,9 +1,12 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once -#include +#if HAVE_OPENSSL +# include DEFINE_TRIVIAL_CLEANUP_FUNC(X509*, X509_free); DEFINE_TRIVIAL_CLEANUP_FUNC(X509_NAME*, X509_NAME_free); DEFINE_TRIVIAL_CLEANUP_FUNC(EVP_PKEY_CTX*, EVP_PKEY_CTX_free); DEFINE_TRIVIAL_CLEANUP_FUNC(EVP_CIPHER_CTX*, EVP_CIPHER_CTX_free); + +#endif diff --git a/src/shared/pkcs11-util.h b/src/shared/pkcs11-util.h index 42f461d3719..46791eb23b7 100644 --- a/src/shared/pkcs11-util.h +++ b/src/shared/pkcs11-util.h @@ -4,15 +4,12 @@ #include #if HAVE_P11KIT -#include -#include - -#if HAVE_OPENSSL -#include -#endif +# include +# include #endif #include "macro.h" +#include "openssl-util.h" #include "time-util.h" bool pkcs11_uri_valid(const char *uri);