+2011-04-13 Giuseppe Scrivano <gscrivano@gnu.org>
+
+ * openssl.c (openssl_poll): Check if the specified timeout is zero after
+ SSL_pending.
+ (openssl_peek): Make the call non-blocking.
+
2011-04-11 Cristian RodrÃguez <crrodriguez@opensuse.org> (tiny change)
* openssl.c (ssl_init) [! OPENSSL_NO_SSL2]: Use SSLv2 only when
{
struct openssl_transport_context *ctx = arg;
SSL *conn = ctx->conn;
- if (timeout == 0)
- return 1;
if (SSL_pending (conn))
return 1;
+ if (timeout == 0)
+ return 1;
return select_fd (fd, timeout, wait_for);
}
int ret;
struct openssl_transport_context *ctx = arg;
SSL *conn = ctx->conn;
+ if (! openssl_poll (fd, 0.0, WAIT_FOR_READ, arg))
+ return 0;
do
ret = SSL_peek (conn, buf, bufsize);
while (ret == -1