minimum supported openssl version
Roumen Petrov <[email protected]> Sun, 27 Nov 2016 10:34:18 +0200
| Newsgroups | gmane.text.xml.xmlsec |
|---|---|
| Message-ID | <[email protected]> |
Hi, If OpenSSL versions before 1.* are sill supported attached patch (0005-EVP_PKEY_base_id-compatibility.patch) restore build with them. The name of header file openssl11_wrapper.h is specific to an particular version. Perhaps if could be change to be more generic. For instance openssl-compat.h, openssl-ports.h, etc, also with underscore. Regards, Roumen _______________________________________________ xmlsec mailing list [email protected] http://www.aleksey.com/mailman/listinfo/xmlsec
0005-EVP_PKEY_base_id-compatibility.patch
(text/x-diff, 950 B)
From 50d9e90557005dbbecbd5d1df6fb185c18c6e62c Mon Sep 17 00:00:00 2001 From: Roumen Petrov <[email protected]> Date: Fri, 25 Nov 2016 22:59:49 +0200 Subject: [PATCH 5/5] EVP_PKEY_base_id compatibility --- src/openssl/openssl11_wrapper.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/openssl/openssl11_wrapper.h b/src/openssl/openssl11_wrapper.h index 9e62c75..87d4e21 100644 --- a/src/openssl/openssl11_wrapper.h +++ b/src/openssl/openssl11_wrapper.h @@ -9,6 +9,14 @@ * same syntax. This file won't be required once OpenSSL 1.1.0 is the minimum * suported version. */ + +#if (OPENSSL_VERSION_NUMBER < 0x10000000) +static inline int +EVP_PKEY_base_id(const EVP_PKEY *pkey) { + return EVP_PKEY_type(pkey->type); +} +#endif /* (OPENSSL_VERSION_NUMBER < 0x10000000) */ + #if (OPENSSL_VERSION_NUMBER < 0x10100000) #define EVP_PKEY_up_ref(pKey) CRYPTO_add(&((pKey)->references), 1, CRYPTO_LOCK_EVP_PKEY) -- 1.8.4