Add an EVP_MD_CTX_md() test

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8614)
This commit is contained in:
Matt Caswell 2019-03-29 16:29:54 +00:00
parent b7c913c820
commit 5a2bd6bc66

View file

@ -1083,7 +1083,8 @@ static int calculate_digest(const EVP_MD *md, const char *msg, size_t len,
|| !TEST_true(EVP_DigestUpdate(ctx, msg, len))
|| !TEST_true(EVP_DigestFinal_ex(ctx, out, NULL))
|| !TEST_mem_eq(out, SHA256_DIGEST_LENGTH, exptd,
SHA256_DIGEST_LENGTH))
SHA256_DIGEST_LENGTH)
|| !TEST_true(md == EVP_MD_CTX_md(ctx)))
goto err;
ret = 1;