* crypto.c: when an SSL connection errors out (and closes) unexpectedly
authorArt Cancro <ajc@citadel.org>
Tue, 1 Jun 2004 21:46:47 +0000 (21:46 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 1 Jun 2004 21:46:47 +0000 (21:46 +0000)
  during a read or write operation, do not attempt to finish the operation
  unencrypted like we do in Citadel.  Here in WebCit land it only causes
  the server to segfault.

webcit/ChangeLog
webcit/crypto.c

index b05525710693a0967e28c2ce25819881d26039b8..1d780c7eeb60b41376150e209e3dc5c4b2ca4a2d 100644 (file)
@@ -1,4 +1,10 @@
 $Log$
+Revision 510.11  2004/06/01 21:46:47  ajc
+* crypto.c: when an SSL connection errors out (and closes) unexpectedly
+  during a read or write operation, do not attempt to finish the operation
+  unencrypted like we do in Citadel.  Here in WebCit land it only causes
+  the server to segfault.
+
 Revision 510.10  2004/06/01 19:01:22  ajc
 * netconf.c: widened some of the text entry fields
 * webcit.h: bumped up the internal version number to 5.20
@@ -1846,3 +1852,4 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index 36e7f8427a99b28e281d9aa483eca0e86f5666d8..e7774d8a9e368d31323b7852ceed8249f2051b58 100644 (file)
@@ -452,7 +452,6 @@ void client_write_ssl(char *buf, int nbytes)
                        if (retval == -1)
                                lprintf(9, "errno is %d\n", errno);
                        endtls();
-                       client_write(&buf[nbytes - nremain], nremain);
                        return;
                }
                nremain -= retval;
@@ -511,8 +510,7 @@ int client_read_ssl(char *buf, int bytes, int timeout)
                        }
                        lprintf(9, "SSL_read got error %ld\n", errval);
                        endtls();
-                       return (client_read_to
-                               (WC->http_sock, &buf[len], bytes - len, timeout));
+                       return (0);
                }
                len += rlen;
        }