From fd93be2bf4dc9364ed3e4cfd7df217e4d1ca72ee Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sat, 27 Sep 2003 20:07:40 +0000 Subject: [PATCH] Add function to wrap SSL_pending svn:r501 --- trunk/src/common/tortls.c | 6 ++++++ trunk/src/common/tortls.h | 1 + 2 files changed, 7 insertions(+) diff --git a/trunk/src/common/tortls.c b/trunk/src/common/tortls.c index 271c217904..6fb6a2eaeb 100644 --- a/trunk/src/common/tortls.c +++ b/trunk/src/common/tortls.c @@ -484,3 +484,9 @@ tor_tls_verify(tor_tls *tls) return r; } +int +tor_tls_get_pending_bytees(tor_tls *tls) +{ + assert(tls); + return SSL_pending(tls->ssl); +} diff --git a/trunk/src/common/tortls.h b/trunk/src/common/tortls.h index 2c8749cea3..3a517c25de 100644 --- a/trunk/src/common/tortls.h +++ b/trunk/src/common/tortls.h @@ -26,5 +26,6 @@ int tor_tls_read(tor_tls *tls, char *cp, int len); int tor_tls_write(tor_tls *tls, char *cp, int n); int tor_tls_handshake(tor_tls *tls); int tor_tls_shutdown(tor_tls *tls); +int tor_tls_get_pending_bytees(tor_tls *tls); #endif