diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2021-02-18 16:30:37 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2021-02-26 10:50:30 +1000 |
commit | 5af02212a5331cc30389246bb94f97fbcdebc23a (patch) | |
tree | 9ab888f6216de22d3e3532d2e6083755401452d3 /providers/implementations | |
parent | 19dbb742cdf68d8ada6338a025491a3b46b9ebe1 (diff) |
Fix external symbols related to dsa keys
Partial fix for #12964
This adds ossl_ names for the following symbols:
dsa_check_pairwise, dsa_check_params, dsa_check_priv_key, dsa_check_pub_key, dsa_check_pub_key_partial,
dsa_do_sign_int, dsa_ffc_params_fromdata,
dsa_generate_ffc_parameters, dsa_generate_public_key,
dsa_get0_params, dsa_key_fromdata, dsa_new_with_ctx, dsa_pkey_method, dsa_sign_int
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14231)
Diffstat (limited to 'providers/implementations')
-rw-r--r-- | providers/implementations/encode_decode/encode_key2text.c | 4 | ||||
-rw-r--r-- | providers/implementations/keymgmt/dsa_kmgmt.c | 34 | ||||
-rw-r--r-- | providers/implementations/signature/dsa.c | 2 |
3 files changed, 20 insertions, 20 deletions
diff --git a/providers/implementations/encode_decode/encode_key2text.c b/providers/implementations/encode_decode/encode_key2text.c index 4b4cfc8fa7..103a647467 100644 --- a/providers/implementations/encode_decode/encode_key2text.c +++ b/providers/implementations/encode_decode/encode_key2text.c @@ -24,7 +24,7 @@ #include "internal/ffc.h" #include "crypto/bn.h" /* bn_get_words() */ #include "crypto/dh.h" /* ossl_dh_get0_params() */ -#include "crypto/dsa.h" /* dsa_get0_params() */ +#include "crypto/dsa.h" /* ossl_dsa_get0_params() */ #include "crypto/ec.h" /* ec_key_get_libctx */ #include "crypto/ecx.h" /* ECX_KEY, etc... */ #include "crypto/rsa.h" /* RSA_PSS_PARAMS_30, etc... */ @@ -315,7 +315,7 @@ static int dsa_to_text(BIO *out, const void *key, int selection) } } if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) { - params = dsa_get0_params((DSA *)dsa); + params = ossl_dsa_get0_params((DSA *)dsa); if (params == NULL) { ERR_raise(ERR_LIB_PROV, PROV_R_NOT_PARAMETERS); return 0; diff --git a/providers/implementations/keymgmt/dsa_kmgmt.c b/providers/implementations/keymgmt/dsa_kmgmt.c index a02a3e6b01..18313aa329 100644 --- a/providers/implementations/keymgmt/dsa_kmgmt.c +++ b/providers/implementations/keymgmt/dsa_kmgmt.c @@ -117,7 +117,7 @@ static void *dsa_newdata(void *provctx) { if (!ossl_prov_is_running()) return NULL; - return dsa_new_with_ctx(PROV_LIBCTX_OF(provctx)); + return ossl_dsa_new(PROV_LIBCTX_OF(provctx)); } static void dsa_freedata(void *keydata) @@ -160,8 +160,8 @@ static int dsa_match(const void *keydata1, const void *keydata2, int selection) ok = ok && BN_cmp(DSA_get0_priv_key(dsa1), DSA_get0_priv_key(dsa2)) == 0; if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) { - FFC_PARAMS *dsaparams1 = dsa_get0_params((DSA *)dsa1); - FFC_PARAMS *dsaparams2 = dsa_get0_params((DSA *)dsa2); + FFC_PARAMS *dsaparams1 = ossl_dsa_get0_params((DSA *)dsa1); + FFC_PARAMS *dsaparams2 = ossl_dsa_get0_params((DSA *)dsa2); ok = ok && ossl_ffc_params_cmp(dsaparams1, dsaparams2, 1); } @@ -180,9 +180,9 @@ static int dsa_import(void *keydata, int selection, const OSSL_PARAM params[]) return 0; if ((selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0) - ok = ok && dsa_ffc_params_fromdata(dsa, params); + ok = ok && ossl_dsa_ffc_params_fromdata(dsa, params); if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) - ok = ok && dsa_key_fromdata(dsa, params); + ok = ok && ossl_dsa_key_fromdata(dsa, params); return ok; } @@ -199,7 +199,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 && ossl_ffc_params_todata(dsa_get0_params(dsa), tmpl, NULL); + ok = ok && ossl_ffc_params_todata(ossl_dsa_get0_params(dsa), tmpl, NULL); if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) ok = ok && dsa_key_todata(dsa, tmpl, NULL); @@ -289,7 +289,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 ossl_ffc_params_todata(dsa_get0_params(dsa), NULL, params) + return ossl_ffc_params_todata(ossl_dsa_get0_params(dsa), NULL, params) && dsa_key_todata(dsa, NULL, params); } @@ -313,7 +313,7 @@ static int dsa_validate_domparams(const DSA *dsa, int checktype) { int status = 0; - return dsa_check_params(dsa, checktype, &status); + return ossl_dsa_check_params(dsa, checktype, &status); } static int dsa_validate_public(const DSA *dsa) @@ -324,7 +324,7 @@ static int dsa_validate_public(const DSA *dsa) DSA_get0_key(dsa, &pub_key, NULL); if (pub_key == NULL) return 0; - return dsa_check_pub_key(dsa, pub_key, &status); + return ossl_dsa_check_pub_key(dsa, pub_key, &status); } static int dsa_validate_private(const DSA *dsa) @@ -335,7 +335,7 @@ static int dsa_validate_private(const DSA *dsa) DSA_get0_key(dsa, NULL, &priv_key); if (priv_key == NULL) return 0; - return dsa_check_priv_key(dsa, priv_key, &status); + return ossl_dsa_check_priv_key(dsa, priv_key, &status); } static int dsa_validate(const void *keydata, int selection, int checktype) @@ -361,7 +361,7 @@ static int dsa_validate(const void *keydata, int selection, int checktype) /* If the whole key is selected, we do a pairwise validation */ if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_KEYPAIR) - ok = ok && dsa_check_pairwise(dsa); + ok = ok && ossl_dsa_check_pairwise(dsa); return ok; } @@ -397,7 +397,7 @@ static int dsa_gen_set_template(void *genctx, void *templ) if (!ossl_prov_is_running() || gctx == NULL || dsa == NULL) return 0; - gctx->ffc_params = dsa_get0_params(dsa); + gctx->ffc_params = ossl_dsa_get0_params(dsa); return 1; } @@ -514,7 +514,7 @@ static void *dsa_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) if (!ossl_prov_is_running() || gctx == NULL) return NULL; - dsa = dsa_new_with_ctx(gctx->libctx); + dsa = ossl_dsa_new(gctx->libctx); if (dsa == NULL) return NULL; @@ -524,7 +524,7 @@ static void *dsa_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) if (gencb != NULL) BN_GENCB_set(gencb, dsa_gencb, genctx); - ffc = dsa_get0_params(dsa); + ffc = ossl_dsa_get0_params(dsa); /* Copy the template value if one was passed */ if (gctx->ffc_params != NULL && !ossl_ffc_params_copy(ffc, gctx->ffc_params)) @@ -546,9 +546,9 @@ static void *dsa_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) } if ((gctx->selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) { - if (dsa_generate_ffc_parameters(dsa, gctx->gen_type, - gctx->pbits, gctx->qbits, - gencb) <= 0) + if (ossl_dsa_generate_ffc_parameters(dsa, gctx->gen_type, + gctx->pbits, gctx->qbits, + gencb) <= 0) goto end; } ossl_ffc_params_enable_flags(ffc, FFC_PARAM_FLAG_VALIDATE_LEGACY, diff --git a/providers/implementations/signature/dsa.c b/providers/implementations/signature/dsa.c index 620bfa845c..81e435c419 100644 --- a/providers/implementations/signature/dsa.c +++ b/providers/implementations/signature/dsa.c @@ -223,7 +223,7 @@ static int dsa_sign(void *vpdsactx, unsigned char *sig, size_t *siglen, if (mdsize != 0 && tbslen != mdsize) return 0; - ret = dsa_sign_int(0, tbs, tbslen, sig, &sltmp, pdsactx->dsa); + ret = ossl_dsa_sign_int(0, tbs, tbslen, sig, &sltmp, pdsactx->dsa); if (ret <= 0) return 0; |