security: Add support for OpenSSL 1.1.0 API
Change-Id: I8deb4c5c5cbc1755b492ccd12707d83764a91ad7
Refs: #3757
diff --git a/src/security/transform/private-key.cpp b/src/security/transform/private-key.cpp
index 0c61817..8dfef00 100644
--- a/src/security/transform/private-key.cpp
+++ b/src/security/transform/private-key.cpp
@@ -241,7 +241,11 @@
{
ENSURE_PRIVATE_KEY_LOADED(m_impl->key);
+#if OPENSSL_VERSION_NUMBER < 0x1010000fL
switch (EVP_PKEY_type(m_impl->key->type)) {
+#else
+ switch (EVP_PKEY_base_id(m_impl->key)) {
+#endif // OPENSSL_VERSION_NUMBER < 0x1010000fL
case EVP_PKEY_RSA:
return rsaDecrypt(cipherText, cipherLen);
default: