From 82770979c33bf1592f633c06a5fad5d7936a184f Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 1 Jun 2004 21:46:47 +0000 Subject: [PATCH] * 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. --- webcit/ChangeLog | 7 +++++++ webcit/crypto.c | 4 +--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index b05525710..1d780c7ee 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -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 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/crypto.c b/webcit/crypto.c index 36e7f8427..e7774d8a9 100644 --- a/webcit/crypto.c +++ b/webcit/crypto.c @@ -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; } -- 2.30.2