build fix for libressl 2.5.3

X509_up_ref is implemented in libressl 2.5.3
This commit is contained in:
Timo Teräs 2017-04-22 11:59:24 +03:00 committed by Frank Morgner
parent 2114dea687
commit f5aa3f5cc6
1 changed files with 2 additions and 0 deletions

View File

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