#include "prov/implementations.h" /* rsa_keymgmt_functions */
#include "prov/providercommonerr.h" /* PROV_R_BN_ERROR */
#include "serializer_local.h"
+#include "internal/ffc.h"
+#include "crypto/dsa.h"
OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_dsa_new(void)
{
{
const char *type_label = NULL;
const BIGNUM *priv_key = NULL, *pub_key = NULL;
- const BIGNUM *p = NULL, *q = NULL, *g = NULL;
+ const BIGNUM *p = NULL;
switch (type) {
goto null_err;
}
- p = DSA_get0_p(dsa);
- q = DSA_get0_q(dsa);
- g = DSA_get0_p(dsa);
- if (p == NULL || q == NULL || g == NULL)
+ p = DSA_get0_p(dsa);
+ if (p == NULL)
goto null_err;
- if (ossl_prov_bio_printf(out, "%s: (%d bit)\n", type_label, BN_num_bits(p))
- <= 0)
+ if (ossl_prov_bio_printf(out, "%s: (%d bit)\n", type_label,
+ BN_num_bits(p)) <= 0)
goto err;
if (priv_key != NULL
&& !ossl_prov_print_labeled_bignum(out, "priv:", priv_key))
if (pub_key != NULL
&& !ossl_prov_print_labeled_bignum(out, "pub: ", pub_key))
goto err;
- if (!ossl_prov_print_labeled_bignum(out, "P: ", p))
- goto err;
- if (!ossl_prov_print_labeled_bignum(out, "Q: ", q))
- goto err;
- if (!ossl_prov_print_labeled_bignum(out, "G: ", g))
+ if (!ffc_params_prov_print(out, dsa_get0_params(dsa)))
goto err;
return 1;