From e8c818d275896ef4adb5ed17ee45069dcb89d8fb Mon Sep 17 00:00:00 2001 From: mrcsys Date: Tue, 21 Feb 2006 21:26:58 +0000 Subject: SSL socket read stuff and a whole section that could never get called. Errors were also difficult to deal with, this has been cleaned up --- nanohttp/nanohttp-ssl.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'nanohttp/nanohttp-ssl.c') diff --git a/nanohttp/nanohttp-ssl.c b/nanohttp/nanohttp-ssl.c index 85c8ca2..cd18b97 100644 --- a/nanohttp/nanohttp-ssl.c +++ b/nanohttp/nanohttp-ssl.c @@ -435,4 +435,17 @@ ssl_cleanup (SSL * ssl) } } +int +ssl_checkFatal( SSL *ssl, int status ){ + switch (SSL_get_error(ssl, status)) { + case SSL_ERROR_ZERO_RETURN: + case SSL_ERROR_SSL: + case SSL_ERROR_SYSCALL: + return 1; + break; + default: + return 0; + } +} + #endif /* end of ifdef HAVE_SSL */ -- cgit v1.1-32-gdbae