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/tls mod_tls.c openssl_state_machine.c openssl_state_machine.h
Date Wed, 18 Jul 2001 18:18:20 GMT
dougm       01/07/18 11:18:20

  Modified:    modules/tls mod_tls.c openssl_state_machine.c
                        openssl_state_machine.h
  Log:
  add cleanup of SSLStateMachine to tls filter
  
  Revision  Changes    Path
  1.16      +9 -0      httpd-2.0/modules/tls/mod_tls.c
  
  Index: mod_tls.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/tls/mod_tls.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- mod_tls.c	2001/06/27 23:57:24	1.15
  +++ mod_tls.c	2001/07/18 18:18:20	1.16
  @@ -117,6 +117,12 @@
       return NULL;
   }
   
  +static apr_status_t tls_filter_cleanup(void *data)
  +{
  +    SSLStateMachine_destroy((SSLStateMachine *)data);
  +    return APR_SUCCESS;
  +}
  +
   static int tls_filter_inserter(conn_rec *c)
   {
       TLSServerConfig *pConfig =
  @@ -135,6 +141,9 @@
       pCtx->pOutputFilter=ap_add_output_filter(s_szTLSFilterName,pCtx,NULL,c);
       pCtx->pbbInput=apr_brigade_create(c->pool);
       pCtx->pbbPendingInput=apr_brigade_create(c->pool);
  +
  +    apr_pool_cleanup_register(c->pool, (void*)pCtx->pStateMachine,
  +                              tls_filter_cleanup, apr_pool_cleanup_null);
   
       return OK;
   }
  
  
  
  1.5       +6 -0      httpd-2.0/modules/tls/openssl_state_machine.c
  
  Index: openssl_state_machine.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/tls/openssl_state_machine.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- openssl_state_machine.c	2001/04/27 18:02:21	1.4
  +++ openssl_state_machine.c	2001/07/18 18:18:20	1.5
  @@ -162,6 +162,12 @@
       return pMachine;
       }
   
  +void SSLStateMachine_destroy(SSLStateMachine *pMachine)
  +{
  +    SSL_free(pMachine->pSSL);
  +    free(pMachine);
  +}
  +
   void SSLStateMachine_read_inject(SSLStateMachine *pMachine,
   				 const unsigned char *aucBuf,int nBuf)
       {
  
  
  
  1.3       +1 -0      httpd-2.0/modules/tls/openssl_state_machine.h
  
  Index: openssl_state_machine.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/tls/openssl_state_machine.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- openssl_state_machine.h	2001/02/18 02:10:27	1.2
  +++ openssl_state_machine.h	2001/07/18 18:18:20	1.3
  @@ -3,6 +3,7 @@
   void SSLStateMachine_init(void);
   SSLStateMachine *SSLStateMachine_new(const char *szCertificateFile,
   				     const char *szKeyFile);
  +void SSLStateMachine_destroy(SSLStateMachine *pMachine);
   void SSLStateMachine_read_inject(SSLStateMachine *pMachine,
   				 const unsigned char *aucBuf,int nBuf);
   int SSLStateMachine_read_extract(SSLStateMachine *pMachine,
  
  
  

Mime
View raw message