diff options
author | Matt Caswell <matt@openssl.org> | 2020-09-24 10:42:23 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-10-01 09:25:20 +0100 |
commit | d8652be06e2778e8898453a391deb7253e1a35a2 (patch) | |
tree | fe40e22edb39642aa7ae633320c1900388f2e7ee /providers/implementations | |
parent | aedac96c1172ca9a9efe72e027e935504b599e2f (diff) |
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 'providers/implementations')
-rw-r--r-- | providers/implementations/asymciphers/rsa_enc.c | 11 | ||||
-rw-r--r-- | providers/implementations/kdfs/scrypt.c | 8 | ||||
-rw-r--r-- | providers/implementations/keymgmt/dh_kmgmt.c | 8 | ||||
-rw-r--r-- | providers/implementations/keymgmt/ec_kmgmt.c | 4 |
4 files changed, 15 insertions, 16 deletions
diff --git a/providers/implementations/asymciphers/rsa_enc.c b/providers/implementations/asymciphers/rsa_enc.c index cceb131105..0ce2054e7d 100644 --- a/providers/implementations/asymciphers/rsa_enc.c +++ b/providers/implementations/asymciphers/rsa_enc.c @@ -165,12 +165,11 @@ static int rsa_encrypt(void *vprsactx, unsigned char *out, size_t *outlen, return 0; } ret = - rsa_padding_add_PKCS1_OAEP_mgf1_with_libctx(prsactx->libctx, tbuf, - rsasize, in, inlen, - prsactx->oaep_label, - prsactx->oaep_labellen, - prsactx->oaep_md, - prsactx->mgf1_md); + rsa_padding_add_PKCS1_OAEP_mgf1_ex(prsactx->libctx, tbuf, rsasize, + in, inlen, prsactx->oaep_label, + prsactx->oaep_labellen, + prsactx->oaep_md, + prsactx->mgf1_md); if (!ret) { OPENSSL_free(tbuf); diff --git a/providers/implementations/kdfs/scrypt.c b/providers/implementations/kdfs/scrypt.c index b4cebd0646..23d6f7b4ad 100644 --- a/providers/implementations/kdfs/scrypt.c +++ b/providers/implementations/kdfs/scrypt.c @@ -488,15 +488,15 @@ static int scrypt_alg(const char *pass, size_t passlen, X = (uint32_t *)(B + Blen); T = X + 32 * r; V = T + 32 * r; - if (pkcs5_pbkdf2_hmac_with_libctx(pass, passlen, salt, saltlen, 1, sha256, - (int)Blen, B, libctx, propq) == 0) + if (pkcs5_pbkdf2_hmac_ex(pass, passlen, salt, saltlen, 1, sha256, (int)Blen, + B, libctx, propq) == 0) goto err; for (i = 0; i < p; i++) scryptROMix(B + 128 * r * i, r, N, X, T, V); - if (pkcs5_pbkdf2_hmac_with_libctx(pass, passlen, B, (int)Blen, 1, sha256, - keylen, key, libctx, propq) == 0) + if (pkcs5_pbkdf2_hmac_ex(pass, passlen, B, (int)Blen, 1, sha256, keylen, + key, libctx, propq) == 0) goto err; rv = 1; err: diff --git a/providers/implementations/keymgmt/dh_kmgmt.c b/providers/implementations/keymgmt/dh_kmgmt.c index 7086df4509..6a1db6a733 100644 --- a/providers/implementations/keymgmt/dh_kmgmt.c +++ b/providers/implementations/keymgmt/dh_kmgmt.c @@ -136,7 +136,7 @@ static void *dh_newdata(void *provctx) DH *dh = NULL; if (ossl_prov_is_running()) { - dh = dh_new_with_libctx(PROV_LIBRARY_CONTEXT_OF(provctx)); + dh = dh_new_ex(PROV_LIBRARY_CONTEXT_OF(provctx)); if (dh != NULL) { DH_clear_flags(dh, DH_FLAG_TYPE_MASK); DH_set_flags(dh, DH_FLAG_TYPE_DH); @@ -149,7 +149,7 @@ static void *dhx_newdata(void *provctx) { DH *dh = NULL; - dh = dh_new_with_libctx(PROV_LIBRARY_CONTEXT_OF(provctx)); + dh = dh_new_ex(PROV_LIBRARY_CONTEXT_OF(provctx)); if (dh != NULL) { DH_clear_flags(dh, DH_FLAG_TYPE_MASK); DH_set_flags(dh, DH_FLAG_TYPE_DHX); @@ -608,12 +608,12 @@ static void *dh_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) gctx->group_nid = dh_get_named_group_uid_from_size(gctx->pbits); if (gctx->group_nid == NID_undef) return NULL; - dh = dh_new_by_nid_with_libctx(gctx->libctx, gctx->group_nid); + dh = dh_new_by_nid_ex(gctx->libctx, gctx->group_nid); if (dh == NULL) return NULL; ffc = dh_get0_params(dh); } else { - dh = dh_new_with_libctx(gctx->libctx); + dh = dh_new_ex(gctx->libctx); if (dh == NULL) return NULL; ffc = dh_get0_params(dh); diff --git a/providers/implementations/keymgmt/ec_kmgmt.c b/providers/implementations/keymgmt/ec_kmgmt.c index 7a6e37607d..b1019293b7 100644 --- a/providers/implementations/keymgmt/ec_kmgmt.c +++ b/providers/implementations/keymgmt/ec_kmgmt.c @@ -236,7 +236,7 @@ void *ec_newdata(void *provctx) { if (!ossl_prov_is_running()) return NULL; - return EC_KEY_new_with_libctx(PROV_LIBRARY_CONTEXT_OF(provctx), NULL); + return EC_KEY_new_ex(PROV_LIBRARY_CONTEXT_OF(provctx), NULL); } static @@ -1050,7 +1050,7 @@ static void *ec_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) if (!ossl_prov_is_running() || gctx == NULL - || (ec = EC_KEY_new_with_libctx(gctx->libctx, NULL)) == NULL) + || (ec = EC_KEY_new_ex(gctx->libctx, NULL)) == NULL) return NULL; if (gctx->gen_group == NULL) { |