diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-12-18 09:38:25 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-12-18 11:24:44 +0100 |
commit | b012a1f455cbc82567632bc30a07a238c61a2aaa (patch) | |
tree | 3664cace03f6d29391963e3dc9e4243e099ec13d | |
parent | 4023637a8ab0654c1acd10d684ee13d0f95a18f5 (diff) | |
download | systemd-b012a1f455cbc82567632bc30a07a238c61a2aaa.tar.gz |
Make openssl dependency optional again
-rw-r--r-- | src/shared/openssl-util.h | 5 | ||||
-rw-r--r-- | src/shared/pkcs11-util.h | 9 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/shared/openssl-util.h b/src/shared/openssl-util.h index dcb9c9ffa6..a7dab530e4 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 <openssl/pem.h> +#if HAVE_OPENSSL +# include <openssl/pem.h> 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 42f461d371..46791eb23b 100644 --- a/src/shared/pkcs11-util.h +++ b/src/shared/pkcs11-util.h @@ -4,15 +4,12 @@ #include <stdbool.h> #if HAVE_P11KIT -#include <p11-kit/p11-kit.h> -#include <p11-kit/uri.h> - -#if HAVE_OPENSSL -#include <openssl/pem.h> -#endif +# include <p11-kit/p11-kit.h> +# include <p11-kit/uri.h> #endif #include "macro.h" +#include "openssl-util.h" #include "time-util.h" bool pkcs11_uri_valid(const char *uri); |