summaryrefslogtreecommitdiffstats
path: root/test/evp_extra_test.c
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-11-04 11:06:26 +0100
committerTomas Mraz <tomas@openssl.org>2021-11-12 16:39:33 +0100
commitae6b68b761b9c5f30897747487ea943ccfab53ba (patch)
tree906e62f740b692ad51d031a240e95fc23375c2b5 /test/evp_extra_test.c
parent680827a15f12c3b37a6335fcb992555cf300730e (diff)
do_sigver_init: Allow reinitialization of an existing operation.
Fixes #16936 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16964)
Diffstat (limited to 'test/evp_extra_test.c')
-rw-r--r--test/evp_extra_test.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c
index df97f448ab..a8ae3e44e0 100644
--- a/test/evp_extra_test.c
+++ b/test/evp_extra_test.c
@@ -1316,6 +1316,13 @@ static int test_EVP_DigestVerifyInit(void)
|| !TEST_true(EVP_DigestVerifyFinal(md_ctx, kSignature,
sizeof(kSignature))))
goto out;
+
+ /* test with reinitialization */
+ if (!TEST_true(EVP_DigestVerifyInit(md_ctx, NULL, NULL, NULL, NULL))
+ || !TEST_true(EVP_DigestVerifyUpdate(md_ctx, kMsg, sizeof(kMsg)))
+ || !TEST_true(EVP_DigestVerifyFinal(md_ctx, kSignature,
+ sizeof(kSignature))))
+ goto out;
ret = 1;
out: