]> granicus.if.org Git - apache/commitdiff
Consensus is that we should not use the scoreboard as a source of entropy.
authorCliff Woolley <jwoolley@apache.org>
Fri, 1 Mar 2002 04:35:17 +0000 (04:35 +0000)
committerCliff Woolley <jwoolley@apache.org>
Fri, 1 Mar 2002 04:35:17 +0000 (04:35 +0000)
Reviewed by: OtherBill, Justin, Madhu

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93652 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/mod_ssl.h
modules/ssl/ssl_engine_init.c
modules/ssl/ssl_engine_rand.c

index bbdf46ce0684d655270831c2368fee96d1a60d1c..a9157436fa8a58ef2bc35becbec2a241c571c28d 100644 (file)
@@ -515,7 +515,6 @@ typedef struct {
     char           *szMutexFile;
     apr_lock_t     *pMutex;
     apr_array_header_t   *aRandSeed;
-    int             nScoreboardSize; /* used for builtin random seed */
     apr_hash_t     *tVHostKeys;
     apr_hash_t     *tTmpKeys;
     void           *pTmpKeys[SSL_TKPIDX_MAX];
index eb1ba3f8338cf7b12bce1b800e380482622a607c..681e9ba932a79abdf9fdc73440fec45402ac1d63 100644 (file)
@@ -163,11 +163,7 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
 
     /*
      * Seed the Pseudo Random Number Generator (PRNG)
-     *
-     * Note: scoreboard size must be fetched at init time because
-     * ap_calc_scoreboard_size() is not threadsafe
      */
-    mc->nScoreboardSize = ap_calc_scoreboard_size();
     ssl_rand_seed(s, p, SSL_RSCTX_STARTUP, "Init: ");
 
     /*
index 230646d4367d58794e1f12974baa41a1ac050d17..89e62f51b5b2e54906463e079218879218380df3 100644 (file)
@@ -81,7 +81,6 @@ int ssl_rand_seed(server_rec *s, apr_pool_t *p, ssl_rsctx_t nCtx, char *prefix)
     int nReq, nDone;
     apr_file_t *fp;
     int i, n, l;
-    int m;
 
     mc = myModConfig(s);
     nReq  = 0;
@@ -155,21 +154,6 @@ int ssl_rand_seed(server_rec *s, apr_pool_t *p, ssl_rsctx_t nCtx, char *prefix)
                 RAND_seed(stackdata+n, 128);
                 nDone += 128;
 
-                /*
-                 * seed in data extracted from the current scoreboard
-                 *
-                 * XXX: this assumes that the entire scoreboard is
-                 * allocated in one big block of memory that begins at
-                 * the location pointed to by ap_scoreboard_image->global
-                 */
-                if (ap_scoreboard_image != NULL && mc->nScoreboardSize > 16)
-                {
-                    m = ((mc->nScoreboardSize / 2) - 1);
-                    n = ssl_rand_choosenum(0, m);
-                    RAND_seed(
-                        ((unsigned char *)ap_scoreboard_image->global)+n, m);
-                    nDone += m;
-                }
             }
         }
     }