shared: add openssl helpers

This commit is contained in:
Lennart Poettering 2019-11-12 15:08:17 +01:00
parent fb4b0465ab
commit 3f63701983
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#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);