Fixed compile error with OpenSSL 1.0 systems (#3739) (#3912)

This commit is contained in:
gyee-penguin 2023-03-17 13:45:30 -07:00 committed by GitHub
parent 60faa4fb58
commit 85f74867ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,8 +29,12 @@ Envelope::Envelope(int cipherNID): _pCipher(EVP_get_cipherbynid(cipherNID)),
{
poco_check_ptr(_pCipher);
poco_check_ptr(_pCtx);
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
if (1 != EVP_CIPHER_CTX_init(_pCtx))
handleErrors(std::string("Envelope():EVP_CIPHER_CTX_init()"));
#else
EVP_CIPHER_CTX_init(_pCtx);
#endif
_iv.resize(ivSize(), 0);
}