diff options
author | Matt Caswell <matt@openssl.org> | 2019-03-29 16:29:54 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2019-04-03 15:44:36 +0100 |
commit | 5a2bd6bc66a902ed7aa681e93f0e339c0441e228 (patch) | |
tree | e15ad54c6fc65af48a8a9cc43ef894ea3e23d724 /test | |
parent | b7c913c820a80f8534ead1dc49b569280fcb1f9a (diff) |
Add an EVP_MD_CTX_md() test
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8614)
Diffstat (limited to 'test')
-rw-r--r-- | test/evp_extra_test.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c index f07ae94ad3..f763bb5d2a 100644 --- a/test/evp_extra_test.c +++ b/test/evp_extra_test.c @@ -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; |