From 1b836c0a8b97da3ef7b279fac51c06041b165d91 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 8 Nov 2017 14:42:22 +0100 Subject: [PATCH] crypto: Use DEFINE_STACK_OF() OpenSSL 1.1 makes it possible to use DEFINE_STACK_OF() instead of IMPLEMENT_STACK_OF() + mkstack.pl's output. Signed-off-by: Sebastian Andrzej Siewior --- bacula/src/lib/crypto.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bacula/src/lib/crypto.c b/bacula/src/lib/crypto.c index c172efb2b5..4b9f0f2a2f 100644 --- a/bacula/src/lib/crypto.c +++ b/bacula/src/lib/crypto.c @@ -194,9 +194,11 @@ IMPLEMENT_ASN1_FUNCTIONS(SignerInfo) IMPLEMENT_ASN1_FUNCTIONS(RecipientInfo) IMPLEMENT_ASN1_FUNCTIONS(SignatureData) IMPLEMENT_ASN1_FUNCTIONS(CryptoData) -IMPLEMENT_STACK_OF(SignerInfo) -IMPLEMENT_STACK_OF(RecipientInfo) +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) +DEFINE_STACK_OF(SignerInfo); +DEFINE_STACK_OF(RecipientInfo); +#else /* * SignerInfo and RecipientInfo stack macros, generated by OpenSSL's util/mkstack.pl. */ @@ -260,6 +262,7 @@ IMPLEMENT_STACK_OF(RecipientInfo) #define ASN1_seq_unpack_RecipientInfo(buf, len, d2i_func, free_func) \ SKM_ASN1_seq_unpack(RecipientInfo, (buf), (len), (d2i_func), (free_func)) /* End of util/mkstack.pl block */ +#endif /* X509 Public/Private Key Pair Structure */ struct X509_Keypair { -- 2.39.5