diff options
author | Timo Teräs <timo.teras@iki.fi> | 2018-10-26 08:21:52 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2018-10-26 08:22:08 +0300 |
commit | beab8545ebb2898a2beb157a4d9424ebddf3e26f (patch) | |
tree | c85cc3d47cde7f8a1a368f4f7bfad6ccac3b1015 /src/apk_openssl.h | |
parent | 40ffdfe623c73c3fdba15fd24bd05d206eff7aad (diff) | |
download | apk-tools-beab8545ebb2898a2beb157a4d9424ebddf3e26f.tar.gz apk-tools-beab8545ebb2898a2beb157a4d9424ebddf3e26f.tar.bz2 apk-tools-beab8545ebb2898a2beb157a4d9424ebddf3e26f.tar.xz apk-tools-beab8545ebb2898a2beb157a4d9424ebddf3e26f.zip |
add support for openssl 1.1
Diffstat (limited to 'src/apk_openssl.h')
-rw-r--r-- | src/apk_openssl.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/apk_openssl.h b/src/apk_openssl.h new file mode 100644 index 0000000..c45beb9 --- /dev/null +++ b/src/apk_openssl.h @@ -0,0 +1,21 @@ +#ifndef APK_SSL_COMPAT_H +#define APK_SSL_COMPAT_H + +#include <openssl/opensslv.h> +#include <openssl/evp.h> + +#if OPENSSL_VERSION_NUMBER < 0x1010000fL || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) + +static inline EVP_MD_CTX *EVP_MD_CTX_new(void) +{ + return EVP_MD_CTX_create(); +} + +static inline void EVP_MD_CTX_free(EVP_MD_CTX *mdctx) +{ + return EVP_MD_CTX_destroy(mdctx); +} + +#endif + +#endif |