]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Make openssl dependency optional again 14377/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 18 Dec 2019 08:38:25 +0000 (09:38 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 18 Dec 2019 10:24:44 +0000 (11:24 +0100)
src/shared/openssl-util.h
src/shared/pkcs11-util.h

index dcb9c9ffa6ac5ac2b30fc8227912d43da57cd5c1..a7dab530e4c83349a3e86ebb3ffd735e322857e9 100644 (file)
@@ -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
index 42f461d37190a2dee05615fe63f7c870a44b9ef1..46791eb23b74c1a627282e9da3c63ad179d343ca 100644 (file)
@@ -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);