From: Lennart Poettering Date: Tue, 12 Nov 2019 14:08:17 +0000 (+0100) Subject: shared: add openssl helpers X-Git-Tag: v245-rc1~245^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3f6370198305a744c8d8950183ff077e607cd3eb;p=thirdparty%2Fsystemd.git shared: add openssl helpers --- diff --git a/src/shared/meson.build b/src/shared/meson.build index fc0ee28f55e..088e302249e 100644 --- a/src/shared/meson.build +++ b/src/shared/meson.build @@ -132,6 +132,7 @@ shared_sources = files(''' nscd-flush.h nsflags.c nsflags.h + openssl-util.h os-util.c os-util.h output-mode.c diff --git a/src/shared/openssl-util.h b/src/shared/openssl-util.h new file mode 100644 index 00000000000..dcb9c9ffa6a --- /dev/null +++ b/src/shared/openssl-util.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + +#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);