Lines Matching refs:dsa
101 static int dsa_key_todata(DSA *dsa, OSSL_PARAM_BLD *bld, OSSL_PARAM params[], in dsa_key_todata() argument
106 if (dsa == NULL) in dsa_key_todata()
109 DSA_get0_key(dsa, &pub, &priv); in dsa_key_todata()
135 const DSA *dsa = keydata; in dsa_has() local
138 if (!ossl_prov_is_running() || dsa == NULL) in dsa_has()
144 ok = ok && (DSA_get0_pub_key(dsa) != NULL); in dsa_has()
146 ok = ok && (DSA_get0_priv_key(dsa) != NULL); in dsa_has()
148 ok = ok && (DSA_get0_p(dsa) != NULL && DSA_get0_g(dsa) != NULL); in dsa_has()
196 DSA *dsa = keydata; in dsa_import() local
199 if (!ossl_prov_is_running() || dsa == NULL) in dsa_import()
206 ok = ok && ossl_dsa_ffc_params_fromdata(dsa, params); in dsa_import()
212 ok = ok && ossl_dsa_key_fromdata(dsa, params, include_private); in dsa_import()
221 DSA *dsa = keydata; in dsa_export() local
226 if (!ossl_prov_is_running() || dsa == NULL) in dsa_export()
237 ok = ok && ossl_ffc_params_todata(ossl_dsa_get0_params(dsa), tmpl, NULL); in dsa_export()
242 ok = ok && dsa_key_todata(dsa, tmpl, NULL, include_private); in dsa_export()
317 DSA *dsa = key; in dsa_get_params() local
321 && !OSSL_PARAM_set_int(p, DSA_bits(dsa))) in dsa_get_params()
324 && !OSSL_PARAM_set_int(p, DSA_security_bits(dsa))) in dsa_get_params()
327 && !OSSL_PARAM_set_int(p, DSA_size(dsa))) in dsa_get_params()
332 return ossl_ffc_params_todata(ossl_dsa_get0_params(dsa), NULL, params) in dsa_get_params()
333 && dsa_key_todata(dsa, NULL, params, 1); in dsa_get_params()
352 static int dsa_validate_domparams(const DSA *dsa, int checktype) in dsa_validate_domparams() argument
356 return ossl_dsa_check_params(dsa, checktype, &status); in dsa_validate_domparams()
359 static int dsa_validate_public(const DSA *dsa) in dsa_validate_public() argument
364 DSA_get0_key(dsa, &pub_key, NULL); in dsa_validate_public()
367 return ossl_dsa_check_pub_key(dsa, pub_key, &status); in dsa_validate_public()
370 static int dsa_validate_private(const DSA *dsa) in dsa_validate_private() argument
375 DSA_get0_key(dsa, NULL, &priv_key); in dsa_validate_private()
378 return ossl_dsa_check_priv_key(dsa, priv_key, &status); in dsa_validate_private()
383 const DSA *dsa = keydata; in dsa_validate() local
393 ok = ok && dsa_validate_domparams(dsa, checktype); in dsa_validate()
396 ok = ok && dsa_validate_public(dsa); in dsa_validate()
399 ok = ok && dsa_validate_private(dsa); in dsa_validate()
404 ok = ok && ossl_dsa_check_pairwise(dsa); in dsa_validate()
442 DSA *dsa = templ; in dsa_gen_set_template() local
444 if (!ossl_prov_is_running() || gctx == NULL || dsa == NULL) in dsa_gen_set_template()
446 gctx->ffc_params = ossl_dsa_get0_params(dsa); in dsa_gen_set_template()
597 DSA *dsa = NULL; in dsa_gen() local
616 dsa = ossl_dsa_new(gctx->libctx); in dsa_gen()
617 if (dsa == NULL) in dsa_gen()
643 ffc = ossl_dsa_get0_params(dsa); in dsa_gen()
664 if (ossl_dsa_generate_ffc_parameters(dsa, gctx->gen_type, in dsa_gen()
676 if (DSA_generate_key(dsa) <= 0) in dsa_gen()
682 DSA_free(dsa); in dsa_gen()
683 dsa = NULL; in dsa_gen()
686 return dsa; in dsa_gen()
704 DSA *dsa = NULL; in dsa_load() local
706 if (ossl_prov_is_running() && reference_sz == sizeof(dsa)) { in dsa_load()
708 dsa = *(DSA **)reference; in dsa_load()
711 return dsa; in dsa_load()