diff options
author | Pauli <paul.dale@oracle.com> | 2020-09-30 15:07:24 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-10-06 09:04:19 +1000 |
commit | 5357c10624bedaeed984ef4ff370096911ee2ddf (patch) | |
tree | 9b8481eaf37bc1fdef4a90d1300f027e3edcb3a7 /providers | |
parent | 69340cafb4a894c469a392ce517b2e092758f1c4 (diff) |
ffc: add _ossl to exported but internal functions
The functions updated are:
ffc_generate_private_key, ffc_named_group_from_uid,
ffc_named_group_to_uid, ffc_params_FIPS186_2_gen_verify,
ffc_params_FIPS186_2_generate, ffc_params_FIPS186_2_validate,
ffc_params_FIPS186_4_gen_verify, ffc_params_FIPS186_4_generate,
ffc_params_FIPS186_4_validate, ffc_params_cleanup, ffc_params_cmp,
ffc_params_copy, ffc_params_enable_flags, ffc_params_flags_from_name,
ffc_params_flags_to_name, ffc_params_fromdata,
ffc_params_get0_pqg, ffc_params_get_validate_params,
ffc_params_init, ffc_params_print, ffc_params_set0_j,
ffc_params_set0_pqg, ffc_params_set_flags, ffc_params_set_gindex,
ffc_params_set_h, ffc_params_set_pcounter, ffc_params_set_seed,
ffc_params_set_validate_params, ffc_params_simple_validate,
ffc_params_todata, ffc_params_validate_unverifiable_g, ffc_set_digest,
ffc_set_group_pqg, ffc_validate_private_key, ffc_validate_public_key
and ffc_validate_public_key_partial.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13041)
Diffstat (limited to 'providers')
-rw-r--r-- | providers/implementations/encode_decode/encode_key2text.c | 2 | ||||
-rw-r--r-- | providers/implementations/keymgmt/dh_kmgmt.c | 24 | ||||
-rw-r--r-- | providers/implementations/keymgmt/dsa_kmgmt.c | 22 |
3 files changed, 24 insertions, 24 deletions
diff --git a/providers/implementations/encode_decode/encode_key2text.c b/providers/implementations/encode_decode/encode_key2text.c index ef9b4a91e1..638e16ec27 100644 --- a/providers/implementations/encode_decode/encode_key2text.c +++ b/providers/implementations/encode_decode/encode_key2text.c @@ -157,7 +157,7 @@ static int ffc_params_to_text(BIO *out, const FFC_PARAMS *ffc) { if (ffc->nid != NID_undef) { #ifndef OPENSSL_NO_DH - const char *name = ffc_named_group_from_uid(ffc->nid); + const char *name = ossl_ffc_named_group_from_uid(ffc->nid); if (name == NULL) goto err; diff --git a/providers/implementations/keymgmt/dh_kmgmt.c b/providers/implementations/keymgmt/dh_kmgmt.c index 6a1db6a733..b0d89f792a 100644 --- a/providers/implementations/keymgmt/dh_kmgmt.c +++ b/providers/implementations/keymgmt/dh_kmgmt.c @@ -198,7 +198,7 @@ static int dh_match(const void *keydata1, const void *keydata2, int selection) FFC_PARAMS *dhparams1 = dh_get0_params((DH *)dh1); FFC_PARAMS *dhparams2 = dh_get0_params((DH *)dh2); - ok = ok && ffc_params_cmp(dhparams1, dhparams2, 1); + ok = ok && ossl_ffc_params_cmp(dhparams1, dhparams2, 1); } return ok; } @@ -239,7 +239,7 @@ static int dh_export(void *keydata, int selection, OSSL_CALLBACK *param_cb, return 0; if ((selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0) - ok = ok && ffc_params_todata(dh_get0_params(dh), tmpl, NULL); + ok = ok && ossl_ffc_params_todata(dh_get0_params(dh), tmpl, NULL); if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) ok = ok && dh_key_todata(dh, tmpl, NULL); @@ -337,7 +337,7 @@ static ossl_inline int dh_get_params(void *key, OSSL_PARAM params[]) return 0; } - return ffc_params_todata(dh_get0_params(dh), NULL, params) + return ossl_ffc_params_todata(dh_get0_params(dh), NULL, params) && dh_key_todata(dh, NULL, params); } @@ -511,7 +511,7 @@ static int dh_gen_set_params(void *genctx, const OSSL_PARAM params[]) p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_GROUP_NAME); if (p != NULL) { if (p->data_type != OSSL_PARAM_UTF8_STRING - || ((gctx->group_nid = ffc_named_group_to_uid(p->data)) == NID_undef)) { + || ((gctx->group_nid = ossl_ffc_named_group_to_uid(p->data)) == NID_undef)) { ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT); return 0; } @@ -620,20 +620,20 @@ static void *dh_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) /* Copy the template value if one was passed */ if (gctx->ffc_params != NULL - && !ffc_params_copy(ffc, gctx->ffc_params)) + && !ossl_ffc_params_copy(ffc, gctx->ffc_params)) goto end; - if (!ffc_params_set_seed(ffc, gctx->seed, gctx->seedlen)) + if (!ossl_ffc_params_set_seed(ffc, gctx->seed, gctx->seedlen)) goto end; if (gctx->gindex != -1) { - ffc_params_set_gindex(ffc, gctx->gindex); + ossl_ffc_params_set_gindex(ffc, gctx->gindex); if (gctx->pcounter != -1) - ffc_params_set_pcounter(ffc, gctx->pcounter); + ossl_ffc_params_set_pcounter(ffc, gctx->pcounter); } else if (gctx->hindex != 0) { - ffc_params_set_h(ffc, gctx->hindex); + ossl_ffc_params_set_h(ffc, gctx->hindex); } if (gctx->mdname != NULL) { - if (!ffc_set_digest(ffc, gctx->mdname, gctx->mdprops)) + if (!ossl_ffc_set_digest(ffc, gctx->mdname, gctx->mdprops)) goto end; } gctx->cb = osslcb; @@ -664,8 +664,8 @@ static void *dh_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) goto end; if (gctx->priv_len > 0) DH_set_length(dh, (long)gctx->priv_len); - ffc_params_enable_flags(ffc, FFC_PARAM_FLAG_VALIDATE_LEGACY, - gctx->gen_type == DH_PARAMGEN_TYPE_FIPS_186_2); + ossl_ffc_params_enable_flags(ffc, FFC_PARAM_FLAG_VALIDATE_LEGACY, + gctx->gen_type == DH_PARAMGEN_TYPE_FIPS_186_2); if (DH_generate_key(dh) <= 0) goto end; } diff --git a/providers/implementations/keymgmt/dsa_kmgmt.c b/providers/implementations/keymgmt/dsa_kmgmt.c index 74c40e4536..5cf5c78514 100644 --- a/providers/implementations/keymgmt/dsa_kmgmt.c +++ b/providers/implementations/keymgmt/dsa_kmgmt.c @@ -159,7 +159,7 @@ static int dsa_match(const void *keydata1, const void *keydata2, int selection) FFC_PARAMS *dsaparams1 = dsa_get0_params((DSA *)dsa1); FFC_PARAMS *dsaparams2 = dsa_get0_params((DSA *)dsa2); - ok = ok && ffc_params_cmp(dsaparams1, dsaparams2, 1); + ok = ok && ossl_ffc_params_cmp(dsaparams1, dsaparams2, 1); } return ok; } @@ -195,7 +195,7 @@ static int dsa_export(void *keydata, int selection, OSSL_CALLBACK *param_cb, goto err; if ((selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0) - ok = ok && ffc_params_todata(dsa_get0_params(dsa), tmpl, NULL); + ok = ok && ossl_ffc_params_todata(dsa_get0_params(dsa), tmpl, NULL); if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) ok = ok && dsa_key_todata(dsa, tmpl, NULL); @@ -285,7 +285,7 @@ static ossl_inline int dsa_get_params(void *key, OSSL_PARAM params[]) if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL && !OSSL_PARAM_set_utf8_string(p, DSA_DEFAULT_MD)) return 0; - return ffc_params_todata(dsa_get0_params(dsa), NULL, params) + return ossl_ffc_params_todata(dsa_get0_params(dsa), NULL, params) && dsa_key_todata(dsa, NULL, params); } @@ -513,21 +513,21 @@ static void *dsa_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) ffc = dsa_get0_params(dsa); /* Copy the template value if one was passed */ if (gctx->ffc_params != NULL - && !ffc_params_copy(ffc, gctx->ffc_params)) + && !ossl_ffc_params_copy(ffc, gctx->ffc_params)) goto end; if (gctx->seed != NULL - && !ffc_params_set_seed(ffc, gctx->seed, gctx->seedlen)) + && !ossl_ffc_params_set_seed(ffc, gctx->seed, gctx->seedlen)) goto end; if (gctx->gindex != -1) { - ffc_params_set_gindex(ffc, gctx->gindex); + ossl_ffc_params_set_gindex(ffc, gctx->gindex); if (gctx->pcounter != -1) - ffc_params_set_pcounter(ffc, gctx->pcounter); + ossl_ffc_params_set_pcounter(ffc, gctx->pcounter); } else if (gctx->hindex != 0) { - ffc_params_set_h(ffc, gctx->hindex); + ossl_ffc_params_set_h(ffc, gctx->hindex); } if (gctx->mdname != NULL) { - if (!ffc_set_digest(ffc, gctx->mdname, gctx->mdprops)) + if (!ossl_ffc_set_digest(ffc, gctx->mdname, gctx->mdprops)) goto end; } if ((gctx->selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) { @@ -537,8 +537,8 @@ static void *dsa_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) gencb) <= 0) goto end; } - ffc_params_enable_flags(ffc, FFC_PARAM_FLAG_VALIDATE_LEGACY, - gctx->gen_type == DSA_PARAMGEN_TYPE_FIPS_186_2); + ossl_ffc_params_enable_flags(ffc, FFC_PARAM_FLAG_VALIDATE_LEGACY, + gctx->gen_type == DSA_PARAMGEN_TYPE_FIPS_186_2); if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { if (ffc->p == NULL || ffc->q == NULL |