citadel_ipc.c: comment out block of code that
authorArt Cancro <ajc@citadel.org>
Wed, 21 Jun 2006 03:26:57 +0000 (03:26 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 21 Jun 2006 03:26:57 +0000 (03:26 +0000)
handles certain OpenSSL errors incorrectly.  It was recursing into itself
infinitely until a stack overflow.  The condition under which this occurs
has not been located or fixed, but at least now it will exit with an
OpenSSL error message.

citadel/citadel_ipc.c

index 72c4900dd9e114a2f94d2df547da534ff1b39253..71b2e89abe0e530d374190e9dace9977dffa6fac 100644 (file)
@@ -2663,11 +2663,17 @@ static void serv_read_ssl(CtdlIPC* ipc, char *buf, unsigned int bytes)
                                sleep(1);
                                continue;
                        }
+/***
+ Not sure why we'd want to handle these error codes any differently,
+ but this definitely isn't the way to handle them.  Someone must have
+ naively assumed that we could fall back to unencrypted communications,
+ but all it does is just recursively blow the stack.
                        if (errval == SSL_ERROR_ZERO_RETURN ||
                                        errval == SSL_ERROR_SSL) {
                                serv_read(ipc, &buf[len], bytes - len);
                                return;
                        }
+ ***/
                        error_printf("SSL_read in serv_read: %s\n",
                                        ERR_reason_error_string(ERR_peek_error()));
                        connection_died(ipc, 1);