From 85f74867efa13c30436a4363b7c2efc77d40b71c Mon Sep 17 00:00:00 2001 From: gyee-penguin Date: Fri, 17 Mar 2023 13:45:30 -0700 Subject: [PATCH] Fixed compile error with OpenSSL 1.0 systems (#3739) (#3912) --- Crypto/src/Envelope.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Crypto/src/Envelope.cpp b/Crypto/src/Envelope.cpp index bfce72685..c74fc25da 100644 --- a/Crypto/src/Envelope.cpp +++ b/Crypto/src/Envelope.cpp @@ -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); }