diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-04-07 16:10:10 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-04-07 16:10:10 +0200 |
commit | c111178bd4ed09d462c83c22b4bd99b20c9f6062 (patch) | |
tree | e089435225769cf33333d3a10608ee881855fe3f /lib/vtls/mbedtls.c | |
parent | ef802c9b853f3556165d4323877890c5f1cf9d38 (diff) |
mbedtls: implement and provide *_data_pending()
... as otherwise we might get stuck thinking there's no more data to
handle.
Reported-by: Damien Vielpeau
Fixes #737
Diffstat (limited to 'lib/vtls/mbedtls.c')
-rw-r--r-- | lib/vtls/mbedtls.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c index 77ff326e1..4f887a123 100644 --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c @@ -864,6 +864,11 @@ void Curl_mbedtls_cleanup(void) (void)Curl_polarsslthreadlock_thread_cleanup(); } - +int Curl_mbedtls_data_pending(const struct connectdata *conn, int sockindex) +{ + mbedtls_ssl_context *ssl = + (mbedtls_ssl_context *)&conn->ssl[sockindex].ssl; + return ssl->in_msglen != 0; +} #endif /* USE_MBEDTLS */ |