diff options
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 0000000000..c45beb9cd1 --- /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 |