[openssl-commits] [openssl] master update
Dr. Stephen Henson
steve at openssl.org
Mon Mar 7 22:19:37 UTC 2016
The branch master has been updated
via e1d9f1ab39eeab0c3c2b9415e0aaaa8c05858f77 (commit)
from f7c4584b15320d94863daba2996eee21dde23732 (commit)
- Log -----------------------------------------------------------------
commit e1d9f1ab39eeab0c3c2b9415e0aaaa8c05858f77
Author: Dr. Stephen Henson <steve at openssl.org>
Date: Mon Mar 7 17:31:00 2016 +0000
Remove kinv/r fields from DSA structure.
The kinv/r fields in the DSA structure are not used by OpenSSL internally
and should not be used in general.
Reviewed-by: Rich Salz <rsalz at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/dsa/dsa_lib.c | 2 --
crypto/dsa/dsa_ossl.c | 12 ++----------
include/openssl/dsa.h | 2 --
3 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/crypto/dsa/dsa_lib.c b/crypto/dsa/dsa_lib.c
index f892973..f7795b2 100644
--- a/crypto/dsa/dsa_lib.c
+++ b/crypto/dsa/dsa_lib.c
@@ -180,8 +180,6 @@ void DSA_free(DSA *r)
BN_clear_free(r->g);
BN_clear_free(r->pub_key);
BN_clear_free(r->priv_key);
- BN_clear_free(r->kinv);
- BN_clear_free(r->r);
OPENSSL_free(r);
}
diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c
index cbc1e41..0874e89 100644
--- a/crypto/dsa/dsa_ossl.c
+++ b/crypto/dsa/dsa_ossl.c
@@ -158,16 +158,8 @@ static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
if (ctx == NULL)
goto err;
redo:
- if ((dsa->kinv == NULL) || (dsa->r == NULL)) {
- if (!dsa_sign_setup(dsa, ctx, &kinv, &r, dgst, dlen))
- goto err;
- } else {
- kinv = dsa->kinv;
- dsa->kinv = NULL;
- r = dsa->r;
- dsa->r = NULL;
- noredo = 1;
- }
+ if (!dsa_sign_setup(dsa, ctx, &kinv, &r, dgst, dlen))
+ goto err;
if (dlen > BN_num_bytes(dsa->q))
/*
diff --git a/include/openssl/dsa.h b/include/openssl/dsa.h
index 643fee4..a338eae 100644
--- a/include/openssl/dsa.h
+++ b/include/openssl/dsa.h
@@ -164,8 +164,6 @@ struct dsa_st {
BIGNUM *g;
BIGNUM *pub_key; /* y public key */
BIGNUM *priv_key; /* x private key */
- BIGNUM *kinv; /* Signing pre-calc */
- BIGNUM *r; /* Signing pre-calc */
int flags;
/* Normally used to cache montgomery values */
BN_MONT_CTX *method_mont_p;
More information about the openssl-commits
mailing list