[openssl-commits] [openssl] OpenSSL_1_1_1-stable update

bernd.edlinger at hotmail.de bernd.edlinger at hotmail.de
Wed Nov 7 14:23:52 UTC 2018


The branch OpenSSL_1_1_1-stable has been updated
       via  294941aebb28329efa17acd8fe6eb8b3cc3ce345 (commit)
      from  9bc987f0086052a03982694e0ef69e9617a2b2dc (commit)


- Log -----------------------------------------------------------------
commit 294941aebb28329efa17acd8fe6eb8b3cc3ce345
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date:   Mon Nov 5 23:13:11 2018 +0100

    Rename the rand_drbg_st data member "pool" to "seed_pool"
    
    ... to make the intended use more clear and differentiate
    it from the data member "adin_pool".
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/7575)
    
    (cherry picked from commit 31f32abb8eb2a3ebd8500e6e0460b4a6791e5ed7)

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

Summary of changes:
 crypto/rand/drbg_lib.c | 14 +++++++-------
 crypto/rand/rand_lcl.h |  2 +-
 crypto/rand/rand_lib.c |  8 ++++----
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c
index de4f333..c1d89f8 100644
--- a/crypto/rand/drbg_lib.c
+++ b/crypto/rand/drbg_lib.c
@@ -487,11 +487,11 @@ int rand_drbg_restart(RAND_DRBG *drbg,
     const unsigned char *adin = NULL;
     size_t adinlen = 0;
 
-    if (drbg->pool != NULL) {
+    if (drbg->seed_pool != NULL) {
         RANDerr(RAND_F_RAND_DRBG_RESTART, ERR_R_INTERNAL_ERROR);
         drbg->state = DRBG_ERROR;
-        rand_pool_free(drbg->pool);
-        drbg->pool = NULL;
+        rand_pool_free(drbg->seed_pool);
+        drbg->seed_pool = NULL;
         return 0;
     }
 
@@ -511,8 +511,8 @@ int rand_drbg_restart(RAND_DRBG *drbg,
             }
 
             /* will be picked up by the rand_drbg_get_entropy() callback */
-            drbg->pool = rand_pool_attach(buffer, len, entropy);
-            if (drbg->pool == NULL)
+            drbg->seed_pool = rand_pool_attach(buffer, len, entropy);
+            if (drbg->seed_pool == NULL)
                 return 0;
         } else {
             if (drbg->max_adinlen < len) {
@@ -558,8 +558,8 @@ int rand_drbg_restart(RAND_DRBG *drbg,
         }
     }
 
-    rand_pool_free(drbg->pool);
-    drbg->pool = NULL;
+    rand_pool_free(drbg->seed_pool);
+    drbg->seed_pool = NULL;
 
     return drbg->state == DRBG_READY;
 }
diff --git a/crypto/rand/rand_lcl.h b/crypto/rand/rand_lcl.h
index 376efed..9a4dc32 100644
--- a/crypto/rand/rand_lcl.h
+++ b/crypto/rand/rand_lcl.h
@@ -183,7 +183,7 @@ struct rand_drbg_st {
      * with respect to how randomness is added to the RNG during reseeding
      * (see PR #4328).
      */
-    struct rand_pool_st *pool;
+    struct rand_pool_st *seed_pool;
 
     /*
      * Auxiliary pool for additional data.
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c
index 884917a..4f1a134 100644
--- a/crypto/rand/rand_lib.c
+++ b/crypto/rand/rand_lib.c
@@ -146,8 +146,8 @@ size_t rand_drbg_get_entropy(RAND_DRBG *drbg,
         return 0;
     }
 
-    if (drbg->pool != NULL) {
-        pool = drbg->pool;
+    if (drbg->seed_pool != NULL) {
+        pool = drbg->seed_pool;
         pool->entropy_requested = entropy;
     } else {
         pool = rand_pool_new(entropy, min_len, max_len);
@@ -204,7 +204,7 @@ size_t rand_drbg_get_entropy(RAND_DRBG *drbg,
     }
 
  err:
-    if (drbg->pool == NULL)
+    if (drbg->seed_pool == NULL)
         rand_pool_free(pool);
     return ret;
 }
@@ -216,7 +216,7 @@ size_t rand_drbg_get_entropy(RAND_DRBG *drbg,
 void rand_drbg_cleanup_entropy(RAND_DRBG *drbg,
                                unsigned char *out, size_t outlen)
 {
-    if (drbg->pool == NULL)
+    if (drbg->seed_pool == NULL)
         OPENSSL_secure_clear_free(out, outlen);
 }
 


More information about the openssl-commits mailing list