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_ds.c ssl_engine_init.c
Date Thu, 28 Feb 2002 00:10:52 GMT
dougm       02/02/27 16:10:52

  Modified:    modules/ssl mod_ssl.h ssl_engine_ds.c ssl_engine_init.c
  Log:
  add ssl_asn1_table_get() wrapper and change ssl_init_TmpKeysHandle()
  to use it.
  
  Revision  Changes    Path
  1.61      +3 -0      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.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- mod_ssl.h	28 Feb 2002 00:01:57 -0000	1.60
  +++ mod_ssl.h	28 Feb 2002 00:10:52 -0000	1.61
  @@ -745,6 +745,9 @@
                                     const void *key,
                                     long int length);
   
  +ssl_asn1_t *ssl_asn1_table_get(apr_hash_t *table,
  +                               const void *key);
  +
   void ssl_asn1_table_unset(apr_hash_t *table,
                             const void *key);
   
  
  
  
  1.8       +6 -0      httpd-2.0/modules/ssl/ssl_engine_ds.c
  
  Index: ssl_engine_ds.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_ds.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ssl_engine_ds.c	28 Feb 2002 00:01:57 -0000	1.7
  +++ ssl_engine_ds.c	28 Feb 2002 00:10:52 -0000	1.8
  @@ -231,6 +231,12 @@
       return asn1->cpData; /* caller will assign a value to this */
   }
   
  +ssl_asn1_t *ssl_asn1_table_get(apr_hash_t *table,
  +                               const void *key)
  +{
  +    return (ssl_asn1_t *)apr_hash_get(table, key, APR_HASH_KEY_STRING);
  +}
  +
   void ssl_asn1_table_unset(apr_hash_t *table,
                             const void *key)
   {
  
  
  
  1.29      +4 -4      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.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- ssl_engine_init.c	28 Feb 2002 00:01:57 -0000	1.28
  +++ ssl_engine_init.c	28 Feb 2002 00:10:52 -0000	1.29
  @@ -338,7 +338,7 @@
           ssl_log(s, SSL_LOG_INFO, "Init: Configuring temporary RSA private keys (512/1024
bits)");
   
           /* allocate 512 bit RSA key */
  -        if ((asn1 = (ssl_asn1_t *)apr_hash_get(mc->tTmpKeys, "RSA:512", APR_HASH_KEY_STRING))
!= NULL) {
  +        if ((asn1 = ssl_asn1_table_get(mc->tTmpKeys, "RSA:512")) != NULL) {
               ucp = asn1->cpData;
               if ((mc->pTmpKeys[SSL_TKPIDX_RSA512] = 
                    (void *)d2i_RSAPrivateKey(NULL, SSL_UCP_CAST(&ucp), asn1->nData))
== NULL) {
  @@ -348,7 +348,7 @@
           }
   
           /* allocate 1024 bit RSA key */
  -        if ((asn1 = (ssl_asn1_t *)apr_hash_get(mc->tTmpKeys, "RSA:1024", APR_HASH_KEY_STRING))
!= NULL) {
  +        if ((asn1 = ssl_asn1_table_get(mc->tTmpKeys, "RSA:1024")) != NULL) {
               ucp = asn1->cpData;
               if ((mc->pTmpKeys[SSL_TKPIDX_RSA1024] = 
                    (void *)d2i_RSAPrivateKey(NULL, SSL_UCP_CAST(&ucp), asn1->nData))
== NULL) {
  @@ -360,7 +360,7 @@
           ssl_log(s, SSL_LOG_INFO, "Init: Configuring temporary DH parameters (512/1024 bits)");
   
           /* allocate 512 bit DH param */
  -        if ((asn1 = (ssl_asn1_t *)apr_hash_get(mc->tTmpKeys, "DH:512", APR_HASH_KEY_STRING))
!= NULL) {
  +        if ((asn1 = ssl_asn1_table_get(mc->tTmpKeys, "DH:512")) != NULL) {
               ucp = asn1->cpData;
               if ((mc->pTmpKeys[SSL_TKPIDX_DH512] = 
                    (void *)d2i_DHparams(NULL, SSL_UCP_CAST(&ucp), asn1->nData)) ==
NULL) {
  @@ -370,7 +370,7 @@
           }
   
           /* allocate 1024 bit DH param */
  -        if ((asn1 = (ssl_asn1_t *)apr_hash_get(mc->tTmpKeys, "DH:512", APR_HASH_KEY_STRING))
!= NULL) {
  +        if ((asn1 = ssl_asn1_table_get(mc->tTmpKeys, "DH:1024")) != NULL) {
               ucp = asn1->cpData;
               if ((mc->pTmpKeys[SSL_TKPIDX_DH1024] = 
                    (void *)d2i_DHparams(NULL, SSL_UCP_CAST(&ucp), asn1->nData)) ==
NULL) {
  
  
  

Mime
View raw message