summaryrefslogtreecommitdiffstats
path: root/test/evp_test.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-09-24 11:42:23 +0200
committerMatt Caswell <matt@openssl.org>2020-10-01 10:25:20 +0200
commitd8652be06e2778e8898453a391deb7253e1a35a2 (patch)
treefe40e22edb39642aa7ae633320c1900388f2e7ee /test/evp_test.c
parentPerl util to do with_libctx renaming (diff)
downloadopenssl-d8652be06e2778e8898453a391deb7253e1a35a2.tar.xz
openssl-d8652be06e2778e8898453a391deb7253e1a35a2.zip
Run the withlibctx.pl script
Automatically rename all instances of _with_libctx() to _ex() as per our coding style. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12970)
Diffstat (limited to 'test/evp_test.c')
-rw-r--r--test/evp_test.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/test/evp_test.c b/test/evp_test.c
index a146f4726f..d7e40f214e 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -1160,15 +1160,12 @@ static int mac_test_run_pkey(EVP_TEST *t)
t->err = "MAC_KEY_CREATE_ERROR";
goto err;
}
- key = EVP_PKEY_new_CMAC_key_with_libctx(expected->key,
- expected->key_len,
- EVP_CIPHER_name(cipher),
- libctx, NULL);
+ key = EVP_PKEY_new_CMAC_key_ex(expected->key, expected->key_len,
+ EVP_CIPHER_name(cipher), libctx, NULL);
} else {
- key = EVP_PKEY_new_raw_private_key_with_libctx(libctx,
- OBJ_nid2sn(expected->type),
- NULL, expected->key,
- expected->key_len);
+ key = EVP_PKEY_new_raw_private_key_ex(libctx,
+ OBJ_nid2sn(expected->type), NULL,
+ expected->key, expected->key_len);
}
if (key == NULL) {
t->err = "MAC_KEY_CREATE_ERROR";
@@ -1188,7 +1185,7 @@ static int mac_test_run_pkey(EVP_TEST *t)
t->err = "INTERNAL_ERROR";
goto err;
}
- if (!EVP_DigestSignInit_with_libctx(mctx, &pctx, mdname, libctx, NULL, key)) {
+ if (!EVP_DigestSignInit_ex(mctx, &pctx, mdname, libctx, NULL, key)) {
t->err = "DIGESTSIGNINIT_ERROR";
goto err;
}
@@ -2895,13 +2892,13 @@ static int digestsigver_test_parse(EVP_TEST *t,
return 1;
}
if (mdata->is_verify) {
- if (!EVP_DigestVerifyInit_with_libctx(mdata->ctx, &mdata->pctx,
- name, libctx, NULL, pkey))
+ if (!EVP_DigestVerifyInit_ex(mdata->ctx, &mdata->pctx, name, libctx,
+ NULL, pkey))
t->err = "DIGESTVERIFYINIT_ERROR";
return 1;
}
- if (!EVP_DigestSignInit_with_libctx(mdata->ctx, &mdata->pctx,
- name, libctx, NULL, pkey))
+ if (!EVP_DigestSignInit_ex(mdata->ctx, &mdata->pctx, name, libctx, NULL,
+ pkey))
t->err = "DIGESTSIGNINIT_ERROR";
return 1;
}
@@ -3415,11 +3412,11 @@ start:
return 0;
}
if (klist == &private_keys)
- pkey = EVP_PKEY_new_raw_private_key_with_libctx(libctx, strnid, NULL,
- keybin, keylen);
+ pkey = EVP_PKEY_new_raw_private_key_ex(libctx, strnid, NULL, keybin,
+ keylen);
else
- pkey = EVP_PKEY_new_raw_public_key_with_libctx(libctx, strnid, NULL,
- keybin, keylen);
+ pkey = EVP_PKEY_new_raw_public_key_ex(libctx, strnid, NULL, keybin,
+ keylen);
if (pkey == NULL && !key_unsupported()) {
TEST_info("Can't read %s data", pp->key);
OPENSSL_free(keybin);