aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl_client.h
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2011-12-17 14:50:01 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2011-12-17 14:50:01 +0100
commit6e9ae727bcd95eb820fa28becaf9f79ac463de5f (patch)
tree2d1d2a0f511d1356caf4a3f7c29c1578f0583a95 /lib/ssl_client.h
parent87dddee3a14d7755204d6fc4b321729bad02ce4e (diff)
parent17f057d70b1513710e3d765969205625f0fc7b76 (diff)
Mainline merge.
Diffstat (limited to 'lib/ssl_client.h')
-rw-r--r--lib/ssl_client.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/ssl_client.h b/lib/ssl_client.h
index d0340840..091335c5 100644
--- a/lib/ssl_client.h
+++ b/lib/ssl_client.h
@@ -62,7 +62,15 @@ G_MODULE_EXPORT void *ssl_starttls( int fd, ssl_input_function func, gpointer da
G_MODULE_EXPORT int ssl_read( void *conn, char *buf, int len );
G_MODULE_EXPORT int ssl_write( void *conn, const char *buf, int len );
-/* See ssl_openssl.c for an explanation. */
+/* Now needed by most SSL libs. See for more info:
+ http://www.gnu.org/software/gnutls/manual/gnutls.html#index-gnutls_005frecord_005fcheck_005fpending-209
+ http://www.openssl.org/docs/ssl/SSL_pending.html
+
+ Required because OpenSSL empties the TCP buffer completely but doesn't
+ necessarily give us all the unencrypted data. Or maybe you didn't ask
+ for all of it because your buffer is too small.
+
+ Returns 0 if there's nothing left, 1 if there's more data. */
G_MODULE_EXPORT int ssl_pending( void *conn );
/* Abort the SSL connection and disconnect the socket. Do not use close()