Jayashankar Padath | a013560 | 2019-04-22 16:22:58 +0530 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | // With OpenSSL 1.1.0, some functions were deprecated. Need to abstract them |
Manojkiran Eda | 19dd56b | 2024-06-17 14:29:52 +0530 | [diff] [blame] | 4 | // to make the code backward compatible with older OpenSSL versions. |
Jayashankar Padath | a013560 | 2019-04-22 16:22:58 +0530 | [diff] [blame] | 5 | // Reference: https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes |
| 6 | #if OPENSSL_VERSION_NUMBER < 0x10100000L |
| 7 | |
| 8 | #include <openssl/evp.h> |
| 9 | |
Adriana Kobylak | 58aa750 | 2020-06-08 11:12:11 -0500 | [diff] [blame] | 10 | extern "C" |
| 11 | { |
Patrick Williams | 04d78d1 | 2023-10-20 11:18:26 -0500 | [diff] [blame] | 12 | EVP_MD_CTX* EVP_MD_CTX_new(void); |
| 13 | void EVP_MD_CTX_free(EVP_MD_CTX* ctx); |
Jayashankar Padath | a013560 | 2019-04-22 16:22:58 +0530 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | #endif // OPENSSL_VERSION_NUMBER < 0x10100000L |