httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: httpd-2.0/modules/ssl ssl_engine_init.c
Date Wed, 13 Mar 2002 04:38:36 GMT
dougm       02/03/12 20:38:36

  Modified:    modules/ssl ssl_engine_init.c
  Log:
  only call: ssl_rand_seed(s, p, SSL_RSCTX_STARTUP, "Init: ");
  
  once at startup.  if there is value in calling it more than once at
  startup, it should be done explicitly rather than hidden in
  ssl_tmp_keys_init().
  
  switch to ptemp pool when calling ssl_rand_seed() at startup.
  
  Revision  Changes    Path
  1.54      +10 -10    httpd-2.0/modules/ssl/ssl_engine_init.c
  
  Index: ssl_engine_init.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_init.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- ssl_engine_init.c	13 Mar 2002 01:15:14 -0000	1.53
  +++ ssl_engine_init.c	13 Mar 2002 04:38:35 -0000	1.54
  @@ -178,11 +178,8 @@
   #define MODSSL_TMP_KEY_INIT_DH(s, bits) \
       ssl_tmp_key_init_dh(s, bits, SSL_TMP_KEY_DH_##bits)
   
  -static void ssl_tmp_keys_init(server_rec *s, apr_pool_t *p)
  +static void ssl_tmp_keys_init(server_rec *s)
   {
  -    /* seed PRNG */
  -    ssl_rand_seed(s, p, SSL_RSCTX_STARTUP, "Init: ");
  -
       ssl_log(s, SSL_LOG_INFO,
               "Init: Generating temporary RSA private keys (512/1024 bits)");
   
  @@ -264,8 +261,16 @@
       ssl_util_thread_setup(base_server, p);
   #endif
   
  +    /*
  +     * Seed the Pseudo Random Number Generator (PRNG)
  +     * only need ptemp here; nothing inside allocated from the pool
  +     * needs to live once we return from ssl_rand_seed().
  +     */
  +    ssl_rand_seed(base_server, ptemp, SSL_RSCTX_STARTUP, "Init: ");
  +
       ssl_pphrase_Handle(base_server, p);
  -    ssl_tmp_keys_init(base_server, p);
  +
  +    ssl_tmp_keys_init(base_server);
   
       /*
        * SSL external crypto device ("engine") support
  @@ -296,11 +301,6 @@
        * initialize session caching
        */
       ssl_scache_init(base_server, p);
  -
  -    /*
  -     * Seed the Pseudo Random Number Generator (PRNG)
  -     */
  -    ssl_rand_seed(base_server, p, SSL_RSCTX_STARTUP, "Init: ");
   
       /*
        *  initialize servers
  
  
  

Mime
View raw message