diff options
author | mrcsys | 2006-02-21 21:26:58 +0000 |
---|---|---|
committer | mrcsys | 2006-02-21 21:26:58 +0000 |
commit | e8c818d275896ef4adb5ed17ee45069dcb89d8fb (patch) | |
tree | cfe4c98dcd14fc9f8f5ccdba9ee4495c23c9a95f /nanohttp/nanohttp-ssl.c | |
parent | 2110d12371587e3238615623f81ddd0adc7a4f7c (diff) | |
download | csoap-e8c818d275896ef4adb5ed17ee45069dcb89d8fb.tar.gz csoap-e8c818d275896ef4adb5ed17ee45069dcb89d8fb.tar.bz2 |
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
Diffstat (limited to 'nanohttp/nanohttp-ssl.c')
-rw-r--r-- | nanohttp/nanohttp-ssl.c | 13 |
1 files changed, 13 insertions, 0 deletions
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 */ |