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 mod_ssl.h ssl_engine_config.c ssl_engine_init.c ssl_engine_pphrase.c
Date Thu, 28 Feb 2002 00:28:05 GMT
dougm       02/02/27 16:28:05

  Modified:    modules/ssl mod_ssl.h ssl_engine_config.c ssl_engine_init.c
                        ssl_engine_pphrase.c
  Log:
  switch SSLModConfigRec.tPublicCert to ssl_asn1_table api to prevent
  leakage on restarts.
  
  Revision  Changes    Path
  1.63      +1 -1      httpd-2.0/modules/ssl/mod_ssl.h
  
  Index: mod_ssl.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.h,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- mod_ssl.h	28 Feb 2002 00:23:32 -0000	1.62
  +++ mod_ssl.h	28 Feb 2002 00:28:05 -0000	1.63
  @@ -518,7 +518,7 @@
       int             nScoreboardSize; /* used for builtin random seed */
       apr_hash_t     *tTmpKeys;
       void           *pTmpKeys[SSL_TKPIDX_MAX];
  -    ssl_ds_table   *tPublicCert;
  +    apr_hash_t     *tPublicCert;
       apr_hash_t     *tPrivateKey;
   #ifdef SSL_EXPERIMENTAL_ENGINE
       char           *szCryptoDevice;
  
  
  
  1.25      +1 -1      httpd-2.0/modules/ssl/ssl_engine_config.c
  
  Index: ssl_engine_config.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_config.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- ssl_engine_config.c	28 Feb 2002 00:23:32 -0000	1.24
  +++ ssl_engine_config.c	28 Feb 2002 00:28:05 -0000	1.25
  @@ -102,7 +102,7 @@
           mc->pMutex                 = NULL;
           mc->aRandSeed              = apr_array_make(pPool, 4, sizeof(ssl_randseed_t));
           mc->tPrivateKey            = apr_hash_make(pPool);
  -        mc->tPublicCert            = ssl_ds_table_make(pPool, sizeof(ssl_asn1_t));
  +        mc->tPublicCert            = apr_hash_make(pPool);
           mc->tTmpKeys               = apr_hash_make(pPool);
   #ifdef SSL_EXPERIMENTAL_ENGINE
           mc->szCryptoDevice         = NULL;
  
  
  
  1.31      +2 -2      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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- ssl_engine_init.c	28 Feb 2002 00:23:32 -0000	1.30
  +++ ssl_engine_init.c	28 Feb 2002 00:28:05 -0000	1.31
  @@ -590,7 +590,7 @@
        */
       ok = FALSE;
       cp = apr_psprintf(p, "%s:RSA", cpVHostID);
  -    if ((asn1 = (ssl_asn1_t *)ssl_ds_table_get(mc->tPublicCert, cp)) != NULL) {
  +    if ((asn1 = ssl_asn1_table_get(mc->tPublicCert, cp)) != NULL) {
           ssl_log(s, SSL_LOG_TRACE,
                   "Init: (%s) Configuring RSA server certificate", cpVHostID);
           ucp = asn1->cpData;
  @@ -609,7 +609,7 @@
           ok = TRUE;
       }
       cp = apr_psprintf(p, "%s:DSA", cpVHostID);
  -    if ((asn1 = (ssl_asn1_t *)ssl_ds_table_get(mc->tPublicCert, cp)) != NULL) {
  +    if ((asn1 = ssl_asn1_table_get(mc->tPublicCert, cp)) != NULL) {
           ssl_log(s, SSL_LOG_TRACE,
                   "Init: (%s) Configuring DSA server certificate", cpVHostID);
           ucp = asn1->cpData;
  
  
  
  1.17      +3 -4      httpd-2.0/modules/ssl/ssl_engine_pphrase.c
  
  Index: ssl_engine_pphrase.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_pphrase.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ssl_engine_pphrase.c	28 Feb 2002 00:23:32 -0000	1.16
  +++ ssl_engine_pphrase.c	28 Feb 2002 00:28:05 -0000	1.17
  @@ -200,10 +200,9 @@
                * configuration structures).
                */
               cp = apr_psprintf(mc->pPool, "%s:%s", cpVHostID, an);
  -            asn1 = (ssl_asn1_t *)ssl_ds_table_push(mc->tPublicCert, cp);
  -            asn1->nData  = i2d_X509(pX509Cert, NULL);
  -            asn1->cpData = apr_palloc(mc->pPool, asn1->nData);
  -            ucp = asn1->cpData; i2d_X509(pX509Cert, &ucp); /* 2nd arg increments
*/
  +            length = i2d_X509(pX509Cert, NULL);
  +            ucp = ssl_asn1_table_set(mc->tPublicCert, cp, length);
  +            (void)i2d_X509(pX509Cert, &ucp); /* 2nd arg increments */
   
               /*
                * Free the X509 structure
  
  
  

Mime
View raw message