Tiny changes to previous patch (the log message was meant to be
authorBodo Möller <bodo@openssl.org>
Sun, 30 Jan 2000 02:40:38 +0000 (02:40 +0000)
committerBodo Möller <bodo@openssl.org>
Sun, 30 Jan 2000 02:40:38 +0000 (02:40 +0000)
"Make DSA_generate_parameters faster").

CHANGES
crypto/dsa/dsa_gen.c

diff --git a/CHANGES b/CHANGES
index df2f1bb..f706c10 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -27,7 +27,7 @@
      current invocation of the inner loop.
      [Bodo Moeller]
 
-  *) New functions BN_is_prime_fasttest that optionally does trial
+  *) New function BN_is_prime_fasttest that optionally does trial
      division before starting the Rabin-Miller test and has
      an additional BN_CTX * argument (whereas BN_is_prime always
      has to allocate at least one BN_CTX).
index f7e0b58..710a4fa 100644 (file)
@@ -131,7 +131,7 @@ DSA *DSA_generate_parameters(int bits, unsigned char *seed_in, int seed_len,
                {
                for (;;) /* find q */
                        {
-                       int seed_is_random = 0;
+                       int seed_is_random;
 
                        /* step 1 */
                        if (callback != NULL) callback(0,m++,cb_arg);
@@ -142,8 +142,10 @@ DSA *DSA_generate_parameters(int bits, unsigned char *seed_in, int seed_len,
                                seed_is_random = 1;
                                }
                        else
-                               /* use random seed if 'seed_in' turns out to be bad */
-                               seed_len=0;
+                               {
+                               seed_is_random = 0;
+                               seed_len=0; /* use random seed if 'seed_in' turns out to be bad*/
+                               }
                        memcpy(buf,seed,SHA_DIGEST_LENGTH);
                        memcpy(buf2,seed,SHA_DIGEST_LENGTH);
                        /* precompute "SEED + 1" for step 7: */