summaryrefslogtreecommitdiffstats
path: root/test/acvp_test.c
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-07-26 17:32:05 +1000
committerShane Lontis <shane.lontis@oracle.com>2020-08-09 17:34:52 +1000
commit0ab18e7924727f7b613edc187f3a5074d0ce9bc6 (patch)
tree15d960fa8fd6adca2f9bf74621fada77098a8be5 /test/acvp_test.c
parent11eef7e766ad76158be8da497fba2bc048b02ca1 (diff)
Add EVP signature with libctx methods.
-Added EVP_SignFinal_with_libctx() and EVP_VerifyFinal_with_libctx() -Renamed EVP_DigestSignInit_ex() and EVP_DigestVerifyInit_with_libctx() to EVP_DigestSignInit_with_libctx() and EVP_DigestVerifyInit_with_libctx() Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11884)
Diffstat (limited to 'test/acvp_test.c')
-rw-r--r--test/acvp_test.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/acvp_test.c b/test/acvp_test.c
index 737d2c61bb..b33881d4db 100644
--- a/test/acvp_test.c
+++ b/test/acvp_test.c
@@ -92,8 +92,9 @@ static int sig_gen(EVP_PKEY *pkey, OSSL_PARAM *params, const char *digest_name,
if (!TEST_ptr(sig = OPENSSL_malloc(sz))
|| !TEST_ptr(md_ctx = EVP_MD_CTX_new())
- || !TEST_int_eq(EVP_DigestSignInit_ex(md_ctx, NULL, digest_name, NULL,
- pkey, libctx), 1)
+ || !TEST_int_eq(EVP_DigestSignInit_with_libctx(md_ctx, NULL,
+ digest_name, libctx, NULL,
+ pkey), 1)
|| !TEST_int_gt(EVP_DigestSign(md_ctx, sig, &sig_len, msg, msg_len), 0))
goto err;
*sig_out = sig;
@@ -296,8 +297,9 @@ static int ecdsa_sigver_test(int id)
ret = TEST_int_gt((sig_len = i2d_ECDSA_SIG(sign, &sig)), 0)
&& TEST_ptr(md_ctx = EVP_MD_CTX_new())
- && TEST_true(EVP_DigestVerifyInit_ex(md_ctx, NULL, tst->digest_alg,
- NULL, pkey, libctx)
+ && TEST_true(EVP_DigestVerifyInit_with_libctx(md_ctx, NULL,
+ tst->digest_alg,
+ libctx, NULL, pkey)
&& TEST_int_eq(EVP_DigestVerify(md_ctx, sig, sig_len,
tst->msg, tst->msg_len), tst->pass));
err:
@@ -1238,8 +1240,9 @@ static int rsa_sigver_test(int id)
|| !TEST_true(rsa_create_pkey(&pkey, tst->n, tst->n_len,
tst->e, tst->e_len, NULL, 0, bn_ctx))
|| !TEST_ptr(md_ctx = EVP_MD_CTX_new())
- || !TEST_true(EVP_DigestVerifyInit_ex(md_ctx, &pkey_ctx, tst->digest_alg,
- NULL, pkey, libctx)
+ || !TEST_true(EVP_DigestVerifyInit_with_libctx(md_ctx, &pkey_ctx,
+ tst->digest_alg,
+ libctx, NULL, pkey)
|| !TEST_true(EVP_PKEY_CTX_set_params(pkey_ctx, params))
|| !TEST_int_eq(EVP_DigestVerify(md_ctx, tst->sig, tst->sig_len,
tst->msg, tst->msg_len), tst->pass)))