summaryrefslogtreecommitdiffstats
path: root/crypto/dsa/dsa_key.c
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-01-24 14:09:33 +1000
committerShane Lontis <shane.lontis@oracle.com>2020-01-24 14:09:33 +1000
commitdc8de3e6f1eed18617dc42d41dec6c6566c2ac0c (patch)
tree5cf78a6ef780836f16831f2776c0dc155047d742 /crypto/dsa/dsa_key.c
parent21d08b9ee9c0f7fabcad27b5d0b0c8c16f7dd1e9 (diff)
Modify DSA and DH keys to use a shared FFC_PARAMS struct
This is required in order to share code for FIPS related parameter generation and validation routinues. Note the 'counter' field is now stored as a integer (as that is the form required for generation/validation functions). Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10860)
Diffstat (limited to 'crypto/dsa/dsa_key.c')
-rw-r--r--crypto/dsa/dsa_key.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/dsa/dsa_key.c b/crypto/dsa/dsa_key.c
index 6e5039a696..efc125253e 100644
--- a/crypto/dsa/dsa_key.c
+++ b/crypto/dsa/dsa_key.c
@@ -38,7 +38,7 @@ static int dsa_builtin_keygen(DSA *dsa)
priv_key = dsa->priv_key;
do
- if (!BN_priv_rand_range(priv_key, dsa->q))
+ if (!BN_priv_rand_range(priv_key, dsa->params.q))
goto err;
while (BN_is_zero(priv_key)) ;
@@ -55,7 +55,7 @@ static int dsa_builtin_keygen(DSA *dsa)
goto err;
BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME);
- if (!BN_mod_exp(pub_key, dsa->g, prk, dsa->p, ctx)) {
+ if (!BN_mod_exp(pub_key, dsa->params.g, prk, dsa->params.p, ctx)) {
BN_free(prk);
goto err;
}