diff --git a/src/users.c b/src/users.c index 9619d8a..2cf02a0 100644 --- a/src/users.c +++ b/src/users.c @@ -7,6 +7,11 @@ #include "bbs.h" #include "inih/ini.h" +#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER) +#define EVP_MD_CTX_new EVP_MD_CTX_create +#define EVP_MD_CTX_free EVP_MD_CTX_destroy +#endif + extern struct bbs_config conf; extern struct user_record *gUser; diff --git a/utils/magiftpd/magiftpd.c b/utils/magiftpd/magiftpd.c index 4b90985..4789c4a 100644 --- a/utils/magiftpd/magiftpd.c +++ b/utils/magiftpd/magiftpd.c @@ -19,6 +19,11 @@ #include "magiftpd.h" #include "../../src/inih/ini.h" +#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER) +#define EVP_MD_CTX_new EVP_MD_CTX_create +#define EVP_MD_CTX_free EVP_MD_CTX_destroy +#endif + static struct ftpclient **clients; static int client_count = 0; diff --git a/utils/reset_pass/reset_pass.c b/utils/reset_pass/reset_pass.c index 616f531..50adfde 100644 --- a/utils/reset_pass/reset_pass.c +++ b/utils/reset_pass/reset_pass.c @@ -5,6 +5,11 @@ #include #include +#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER) +#define EVP_MD_CTX_new EVP_MD_CTX_create +#define EVP_MD_CTX_free EVP_MD_CTX_destroy +#endif + char *hash_sha256(char *pass, char *salt) { char *buffer = (char *)malloc(strlen(pass) + strlen(salt) + 1); char *shash = NULL;