httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: httpd-2.0/modules/tls mod_tls.c openssl_state_machine.c
Date Sun, 11 Feb 2001 21:47:41 GMT
ben         01/02/11 13:47:41

  Modified:    modules/tls mod_tls.c openssl_state_machine.c
  Log:
  Work for more than one read. Catch read errors.
  
  Revision  Changes    Path
  1.2       +6 -6      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mod_tls.c	2001/02/11 17:46:19	1.1
  +++ mod_tls.c	2001/02/11 21:47:41	1.2
  @@ -81,6 +81,7 @@
       SSLStateMachine *pStateMachine;
       ap_filter_t *pInputFilter;
       ap_filter_t *pOutputFilter;
  +    apr_bucket_brigade *pbbInput;
   } TLSFilterCtx;
   
   static void *create_tls_server_config(apr_pool_t *p, server_rec *s)
  @@ -129,8 +130,8 @@
   					    pConfig->szKeyFile);
   
       pCtx->pInputFilter=ap_add_input_filter(s_szTLSFilterName,pCtx,NULL,c);
  -    pCtx->pOutputFilter=ap_add_output_filter(s_szTLSFilterName,pCtx,NULL,
  -						 c);
  +    pCtx->pOutputFilter=ap_add_output_filter(s_szTLSFilterName,pCtx,NULL,c);
  +    pCtx->pbbInput=apr_brigade_create(c->pool);
   
       return OK;
   }
  @@ -225,17 +226,16 @@
   {
       TLSFilterCtx *pCtx=f->ctx;
       apr_bucket *pbktIn;
  -    apr_bucket_brigade *pbbIn;
       apr_read_type_e eReadType=eMode == AP_MODE_BLOCKING ? APR_BLOCK_READ :
         APR_NONBLOCK_READ;
   
       // XXX: we don't currently support peek
       assert(eMode != AP_MODE_PEEK);
   
  -    pbbIn=apr_brigade_create(f->c->pool);
  -    ap_get_brigade(f->next,pbbIn,eMode);
  +    if(APR_BRIGADE_EMPTY(pCtx->pbbInput))
  +	ap_get_brigade(f->next,pCtx->pbbInput,eMode);
   
  -    APR_BRIGADE_FOREACH(pbktIn,pbbIn) {
  +    APR_BRIGADE_FOREACH(pbktIn,pCtx->pbbInput) {
   	const char *data;
   	apr_size_t len;
   	int n;
  
  
  
  1.2       +2 -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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- openssl_state_machine.c	2001/02/11 17:46:19	1.1
  +++ openssl_state_machine.c	2001/02/11 21:47:41	1.2
  @@ -207,6 +207,8 @@
   	    fprintf(stderr,"SSL_read wants more data\n");
   	    return 0;
   	    }
  +	SSLStateMachine_print_error(pMachine,"SSL_read error");
  +	exit(8);
   	}
   
       fprintf(stderr,"%d bytes of decrypted data read from state machine\n",n);
  
  
  

Mime
View raw message