Core/Crypto: Fixed build with openssl 1.1

(cherry picked from commit 9368823c8d)
This commit is contained in:
daMaex
2022-06-14 23:32:34 +02:00
committed by Shauren
parent 3fa46c6dc1
commit 4d1ae6cf06
2 changed files with 3 additions and 1 deletions

View File

@@ -23,7 +23,7 @@ Trinity::Crypto::ARC4::ARC4() : _ctx(EVP_CIPHER_CTX_new())
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
_cipher = EVP_CIPHER_fetch(nullptr, "RC4", nullptr);
#else
_cipher = EVP_rc4();
EVP_CIPHER const* _cipher = EVP_rc4();
#endif
EVP_CIPHER_CTX_init(_ctx);

View File

@@ -38,7 +38,9 @@ namespace Trinity::Crypto
template <typename Container>
void UpdateData(Container& c) { UpdateData(std::data(c), std::size(c)); }
private:
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
EVP_CIPHER* _cipher;
#endif
EVP_CIPHER_CTX* _ctx;
};
}