diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-09-09 12:14:36 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-09-09 12:14:36 +0000 |
commit | 1a3914fe0cb3f1bcfeb7e80bbcb72bc7f279892d (patch) | |
tree | f4df00e107223d75b90babe453bc1f72744a25fb /crypto/dsa | |
parent | b7e3cb31a55e662b4f16f15e196019dac5e07293 (diff) |
Seed PRNG with DSA and ECDSA digests for additional protection against
possible PRNG state duplication.
Diffstat (limited to 'crypto/dsa')
-rw-r--r-- | crypto/dsa/dsa_sign.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/dsa/dsa_sign.c b/crypto/dsa/dsa_sign.c index 6ac8e486e8..17555e5892 100644 --- a/crypto/dsa/dsa_sign.c +++ b/crypto/dsa/dsa_sign.c @@ -60,6 +60,7 @@ #include "cryptlib.h" #include <openssl/dsa.h> +#include <openssl/rand.h> DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) { @@ -70,6 +71,7 @@ int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig, unsigned int *siglen, DSA *dsa) { DSA_SIG *s; + RAND_seed(dgst, dlen); s=DSA_do_sign(dgst,dlen,dsa); if (s == NULL) { |