diff --git a/utils/crypto.cpp b/utils/crypto.cpp index e6963720..189f3e56 100644 --- a/utils/crypto.cpp +++ b/utils/crypto.cpp @@ -131,7 +131,9 @@ namespace RSA_verify_signature(const RSA* rsa, const std::vector& signature, const std::string& uuid, bool& is_authentic) { std::unique_ptr> public_key{EVP_PKEY_new(), EVP_PKEY_free}; -#ifdef __APPLE__ + // Versions of OpenSSL greater than 1.1 use new and free instead of create and destroy. + // TODO: This #if should be replaced with a better cmake OpenSSL functionality that enforces a minimum OpenSSL version. +#if (OPENSSL_VERSION_NUMBER < 0x1010000fL) std::unique_ptr> RSA_verification_context{EVP_MD_CTX_create(), EVP_MD_CTX_destroy}; #else std::unique_ptr> RSA_verification_context{EVP_MD_CTX_new(), EVP_MD_CTX_free};