summaryrefslogtreecommitdiff
path: root/bufferevent_openssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'bufferevent_openssl.c')
-rw-r--r--bufferevent_openssl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c
index f5d0808c..4ef3925a 100644
--- a/bufferevent_openssl.c
+++ b/bufferevent_openssl.c
@@ -346,6 +346,13 @@ SSL_handshake_is_ok(int err)
}
static int
+SSL_err_is_ok(int err)
+{
+ /* What SSL_read() returns when the we can proceed existing data */
+ return err == SSL_ERROR_ZERO_RETURN;
+}
+
+static int
SSL_is_want_read(int err)
{
return err == SSL_ERROR_WANT_READ;
@@ -417,6 +424,7 @@ static struct le_ssl_ops le_openssl_ops = {
SSL_handshake_is_ok,
SSL_is_want_read,
SSL_is_want_write,
+ SSL_err_is_ok,
(int (*)(void *))be_openssl_get_fd,
be_openssl_bio_set_fd,
init_bio_counts,