Unverified Commit d745e3b2 by Caio B. Silva Committed by Christian Brauner

Ensures OpenSSL compatibility with older versions of EVP API.

parent 34a4e3a2
...@@ -344,11 +344,11 @@ static int do_sha1_hash(const char *buf, int buflen, unsigned char *md_value, un ...@@ -344,11 +344,11 @@ static int do_sha1_hash(const char *buf, int buflen, unsigned char *md_value, un
return -1; return -1;
} }
mdctx = EVP_MD_CTX_new(); mdctx = EVP_MD_CTX_create();
EVP_DigestInit_ex(mdctx, md, NULL); EVP_DigestInit_ex(mdctx, md, NULL);
EVP_DigestUpdate(mdctx, buf, buflen); EVP_DigestUpdate(mdctx, buf, buflen);
EVP_DigestFinal_ex(mdctx, md_value, md_len); EVP_DigestFinal_ex(mdctx, md_value, md_len);
EVP_MD_CTX_free(mdctx); EVP_MD_CTX_destroy(mdctx);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment