Author: mturk
Date: Thu Nov 12 11:17:44 2009
New Revision: 835335

URL: http://svn.apache.org/viewvc?rev=835335&view=rev
Log:
Actually abort the connection in case of RENEG_ABORT.

Modified:
    tomcat/native/trunk/native/src/sslnetwork.c

Modified: tomcat/native/trunk/native/src/sslnetwork.c
URL: 
http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/sslnetwork.c?rev=835335&r1=835334&r2=835335&view=diff
==============================================================================
--- tomcat/native/trunk/native/src/sslnetwork.c (original)
+++ tomcat/native/trunk/native/src/sslnetwork.c Thu Nov 12 11:17:44 2009
@@ -181,6 +181,10 @@
         return APR_ENOPOLL;    
     if (!con->sock)
         return APR_ENOTSOCK;        
+    if (con->reneg_state == RENEG_ABORT) {
+        con->shutdown_type = SSL_SHUTDOWN_TYPE_UNCLEAN;
+        return APR_ECONNABORTED;
+    }
     
     /* Check if the socket was already closed
      */    
@@ -384,6 +388,11 @@
     int s, i, wr = (int)(*len);
     apr_status_t rv = APR_SUCCESS;
 
+    if (con->reneg_state == RENEG_ABORT) {
+        *len = 0;
+        con->shutdown_type = SSL_SHUTDOWN_TYPE_UNCLEAN;
+        return APR_ECONNABORTED;
+    }
     for (;;) {
         if ((s = SSL_read(con->ssl, buf, wr)) <= 0) {
             apr_status_t os = apr_get_netos_error();
@@ -440,6 +449,11 @@
     int s, i, wr = (int)(*len);
     apr_status_t rv = APR_SUCCESS;
 
+    if (con->reneg_state == RENEG_ABORT) {
+        *len = 0;
+        con->shutdown_type = SSL_SHUTDOWN_TYPE_UNCLEAN;
+        return APR_ECONNABORTED;
+    }
     for (;;) {
         if ((s = SSL_write(con->ssl, buf, wr)) <= 0) {
             apr_status_t os = apr_get_netos_error();



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to