[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

Rich Salz rsalz at openssl.org
Mon Aug 31 17:46:42 UTC 2015


The branch OpenSSL_1_0_2-stable has been updated
       via  df1565ed9cebb6933ee7c6e762abcfefd1cd3846 (commit)
      from  cf633fa00244e39eea2f2c0b623f7d5bbefa904e (commit)


- Log -----------------------------------------------------------------
commit df1565ed9cebb6933ee7c6e762abcfefd1cd3846
Author: Ben Kaduk <bkaduk at akamai.com>
Date:   Fri Aug 28 12:41:50 2015 -0400

    GH367 follow-up, for more clarity
    
    Signed-off-by: Rich Salz <rsalz at akamai.com>
    Reviewed-by: Emilia Käsper <emilia at openssl.org>
    (cherry picked from commit 36ac7bc8a9c856bcdff6eecdaca128ccc5430a1e)

-----------------------------------------------------------------------

Summary of changes:
 crypto/dsa/dsa_gen.c                   | 8 ++++----
 doc/crypto/DSA_generate_parameters.pod | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c
index 847c874..f65790c 100644
--- a/crypto/dsa/dsa_gen.c
+++ b/crypto/dsa/dsa_gen.c
@@ -167,7 +167,7 @@ int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits,
         if (seed_len < (size_t)qsize)
             return 0;
         if (seed_len > (size_t)qsize) {
-            /* Don't overflow seed local variable. */
+            /* Only consume as much seed as is expected. */
             seed_len = qsize;
         }
         memcpy(seed, seed_in, seed_len);
@@ -194,13 +194,13 @@ int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits,
 
     for (;;) {
         for (;;) {              /* find q */
-            int seed_is_random = seed_in == NULL;
+            int use_random_seed = (seed_in == NULL);
 
             /* step 1 */
             if (!BN_GENCB_call(cb, 0, m++))
                 goto err;
 
-            if (seed_is_random) {
+            if (use_random_seed) {
                 if (RAND_bytes(seed, qsize) <= 0)
                     goto err;
             } else {
@@ -232,7 +232,7 @@ int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits,
 
             /* step 4 */
             r = BN_is_prime_fasttest_ex(q, DSS_prime_checks, ctx,
-                                        seed_is_random, cb);
+                                        use_random_seed, cb);
             if (r > 0)
                 break;
             if (r != 0)
diff --git a/doc/crypto/DSA_generate_parameters.pod b/doc/crypto/DSA_generate_parameters.pod
index 7db1522..116ff09 100644
--- a/doc/crypto/DSA_generate_parameters.pod
+++ b/doc/crypto/DSA_generate_parameters.pod
@@ -25,7 +25,7 @@ for use in the DSA and stores the result in B<dsa>.
 
 B<bits> is the length of the prime p to be generated.
 For lengths under 2048 bits, the length of q is 160 bits; for lengths
-at least 2048, it is set to 256 bits.
+greater than or equal to 2048 bits, the length of q is set to 256 bits.
 
 If B<seed> is NULL, the primes will be generated at random.
 If B<seed_len> is less than the length of q, an error is returned.


More information about the openssl-commits mailing list