Latest update.

This commit is contained in:
2020-04-25 19:56:17 +09:00
parent 2015c00c43
commit 80ef640063
5977 changed files with 13451 additions and 5979 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -19,6 +19,8 @@
#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)
{
@@ -39,7 +41,7 @@ int ossl_prov_print_dsa(BIO *out, DSA *dsa, enum dsa_print_type type)
{
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) {
@@ -66,15 +68,13 @@ int ossl_prov_print_dsa(BIO *out, DSA *dsa, enum dsa_print_type 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))
@@ -82,11 +82,7 @@ int ossl_prov_print_dsa(BIO *out, DSA *dsa, enum dsa_print_type type)
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;