Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
fixing the openssl issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rnistuk committed Sep 6, 2018
1 parent a93a26e commit e790015
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/crypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ namespace
RSA_verify_signature(const RSA* rsa, const std::vector<unsigned char>& signature, const std::string& uuid, bool& is_authentic)
{
std::unique_ptr<EVP_PKEY, std::function<void(EVP_PKEY*)>> 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<EVP_MD_CTX, std::function<void(EVP_MD_CTX*)>> RSA_verification_context{EVP_MD_CTX_create(), EVP_MD_CTX_destroy};
#else
std::unique_ptr<EVP_MD_CTX, std::function<void(EVP_MD_CTX*)>> RSA_verification_context{EVP_MD_CTX_new(), EVP_MD_CTX_free};
Expand Down

0 comments on commit e790015

Please sign in to comment.