diff options
author | Nikolay Sivov <nsivov@codeweavers.com> | 2020-09-02 23:14:14 +0300 |
---|---|---|
committer | Nikolay Sivov <nsivov@codeweavers.com> | 2020-09-02 23:15:05 +0300 |
commit | d634d051e32ac0c4f8b5bb16d43adc5ab695d76d (patch) | |
tree | cd9eef79d21caca97e6423e1b6478856df999d2d | |
parent | c3072208437f56371bc772671595becbcf85c119 (diff) | |
download | gnutls-d634d051e32ac0c4f8b5bb16d43adc5ab695d76d.tar.gz |
Move RSA key parameter counter fixup closer to exponent update helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
-rw-r--r-- | lib/nettle/pk.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/nettle/pk.c b/lib/nettle/pk.c index 29698461d5..e9a380857c 100644 --- a/lib/nettle/pk.c +++ b/lib/nettle/pk.c @@ -3342,13 +3342,12 @@ wrap_nettle_pk_fixup(gnutls_pk_algorithm_t algo, TOMPZ(params->params[RSA_PRIME1])) == 0) return gnutls_assert_val(GNUTLS_E_PK_INVALID_PRIVKEY); - /* marks RSA_COEF as present */ - params->params_nr = RSA_PRIVATE_PARAMS - 2; - /* calculate exp1 [6] and exp2 [7] */ zrelease_mpi_key(¶ms->params[RSA_E1]); zrelease_mpi_key(¶ms->params[RSA_E2]); + /* marks RSA_COEF as present */ + params->params_nr = RSA_PRIVATE_PARAMS - 2; ret = calc_rsa_exp(params); if (ret < 0) return gnutls_assert_val(ret); |