From f5aa3f5cc6f7450cacabaf06c1bb0973155435b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Sat, 22 Apr 2017 11:59:24 +0300 Subject: [PATCH] build fix for libressl 2.5.3 X509_up_ref is implemented in libressl 2.5.3 --- src/libopensc/sc-ossl-compat.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libopensc/sc-ossl-compat.h b/src/libopensc/sc-ossl-compat.h index a97abe42..2c853bed 100644 --- a/src/libopensc/sc-ossl-compat.h +++ b/src/libopensc/sc-ossl-compat.h @@ -98,8 +98,10 @@ extern "C" { #define X509_get_key_usage(x) (x->ex_kusage) #define X509_get_extended_key_usage(x) (x->ex_xkusage) #define EVP_PKEY_up_ref(user_key) CRYPTO_add(&user_key->references, 1, CRYPTO_LOCK_EVP_PKEY) +#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2050300fL #define X509_up_ref(cert) CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509) #endif +#endif /* * OpenSSL-1.1.0-pre5 has hidden the RSA and DSA structures