summaryrefslogtreecommitdiff
path: root/ssl-compat.h
diff options
context:
space:
mode:
authorAzat Khuzhin <azat@libevent.org>2023-05-14 16:53:13 +0200
committerAzat Khuzhin <azat@libevent.org>2023-05-14 16:53:13 +0200
commit7652cf4068f77905a56b9165455ec7e90917ec31 (patch)
treed8069f294310ef5c1dee9b318edafae57ae53d47 /ssl-compat.h
parent6375dcb46db4bb05c9c19c980f3ed6d0ff9b1065 (diff)
downloadlibevent-7652cf4068f77905a56b9165455ec7e90917ec31.tar.gz
ssl: do not triger EOF if some data had been successfully read
Previously in case when evbuffer_reserve_space() returns > 1, but it was able to read only 1 IO vector, it will try to read the next one, got 0 (EOF for mbedTLS or SSL_ERROR_ZERO_RETURN for OpenSSL) and will trigger EOF, while instead, it should trigger EV_READ w/o EOF and only after EOF.
Diffstat (limited to 'ssl-compat.h')
-rw-r--r--ssl-compat.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ssl-compat.h b/ssl-compat.h
index a556f4c0..146fdaf3 100644
--- a/ssl-compat.h
+++ b/ssl-compat.h
@@ -23,6 +23,7 @@ struct le_ssl_ops {
int (*handshake_is_ok)(int err);
int (*err_is_want_read)(int err);
int (*err_is_want_write)(int err);
+ int (*err_is_ok)(int err);
evutil_socket_t (*get_fd)(void *ssl);
int (*bio_set_fd)(struct bufferevent_ssl *ssl, evutil_socket_t fd);
void (*init_bio_counts)(struct bufferevent_ssl *bev);