Unverified Commit 5c85a4a3 by Christian Brauner Committed by GitHub

Merge pull request #3140 from caioboffo/fix3139

Ensures OpenSSL compatibility with older versions of EVP API.
parents 2a92bddc b138bfcf
......@@ -344,11 +344,11 @@ static int do_sha1_hash(const char *buf, int buflen, unsigned char *md_value, un
return -1;
}
mdctx = EVP_MD_CTX_new();
mdctx = EVP_MD_CTX_create();
EVP_DigestInit_ex(mdctx, md, NULL);
EVP_DigestUpdate(mdctx, buf, buflen);
EVP_DigestFinal_ex(mdctx, md_value, md_len);
EVP_MD_CTX_free(mdctx);
EVP_MD_CTX_destroy(mdctx);
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