summaryrefslogtreecommitdiffstats
path: root/nanohttp/nanohttp-ssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'nanohttp/nanohttp-ssl.c')
-rw-r--r--nanohttp/nanohttp-ssl.c13
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 */