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.c ssl_engine_io.c
Date Thu, 16 Aug 2001 17:01:53 GMT
dougm       01/08/16 10:01:53

  Modified:    modules/ssl mod_ssl.c ssl_engine_io.c
  Log:
  if ssl shutdown happens earlier than expected, filter code needs be aware
  
  Revision  Changes    Path
  1.14      +1 -0      httpd-2.0/modules/ssl/mod_ssl.c
  
  Index: mod_ssl.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mod_ssl.c	2001/08/16 03:58:16	1.13
  +++ mod_ssl.c	2001/08/16 17:01:53	1.14
  @@ -424,6 +424,7 @@
               SSL_set_shutdown(pRec->pssl, SSL_RECEIVED_SHUTDOWN);
               SSL_smart_shutdown(pRec->pssl);
               SSL_free(pRec->pssl);
  +            pRec->pssl = NULL; /* so filters know we've been shutdown */
               apr_table_setn(c->notes, "ssl", NULL);
               c->aborted = 1;
               return APR_EGENERAL;
  
  
  
  1.19      +10 -0     httpd-2.0/modules/ssl/ssl_engine_io.c
  
  Index: ssl_engine_io.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_io.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ssl_engine_io.c	2001/08/16 16:46:30	1.18
  +++ ssl_engine_io.c	2001/08/16 17:01:53	1.19
  @@ -167,6 +167,11 @@
       apr_bucket_brigade *pbbOutput=NULL;
       int done;
   
  +    if (!pRec->pssl) {
  +        /* we've been shutdown */
  +        return APR_EOF;
  +    }
  +
       do {
   	char buf[1024];
   	int n;
  @@ -416,6 +421,11 @@
   {
       apr_status_t ret;
       SSLFilterRec *pRec = (SSLFilterRec *)data;
  +
  +    if (!pRec->pssl) {
  +        /* already been shutdown */
  +        return APR_SUCCESS;
  +    }
   
       if ((ret = ssl_hook_CloseConnection(pRec)) != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_ERR, ret, NULL,
  
  
  

Mime
View raw message