openssl: Improve compatibility to newer BoringSSL releases

Closes strongswan/strongswan#352
This commit is contained in:
Tobias Brunner
2021-08-24 14:20:37 +02:00
parent 1d64b6c462
commit 57e68ab9c5
5 changed files with 14 additions and 8 deletions
@@ -153,10 +153,15 @@ time_t openssl_asn1_to_time(const ASN1_TIME *time);
/**
* Compatibility macros
*/
#ifdef OPENSSL_IS_BORINGSSL
#if defined(OPENSSL_IS_BORINGSSL) && \
(!defined(BORINGSSL_API_VERSION) || BORINGSSL_API_VERSION < 10)
#define EVP_PKEY_base_id(p) EVP_PKEY_type(p->type)
#endif
#ifndef OPENSSL_INIT_ENGINE_ALL_BUILTIN
#define OPENSSL_INIT_ENGINE_ALL_BUILTIN 0
#endif
/**
* Macros to define fallback getters/setters to access keys (BIGNUM*) for types
* that were made opaque with OpenSSL 1.1.0.