From 4e86f1b16da85ba0a99c592dc7b977b3be80a483 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Mon, 1 Dec 2014 17:43:14 +0200 Subject: Put SSL_pending() call behind the new internal SSL API. It seems likely that any SSL implementation will need a similar call, not just OpenSSL. --- src/interfaces/libpq/fe-secure-openssl.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/interfaces/libpq/fe-secure-openssl.c') diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c index 78aa46de2f3..7fcc1f02f85 100644 --- a/src/interfaces/libpq/fe-secure-openssl.c +++ b/src/interfaces/libpq/fe-secure-openssl.c @@ -186,6 +186,15 @@ pgtls_open_client(PGconn *conn) return open_client_SSL(conn); } +/* + * Is there unread data waiting in the SSL read buffer? + */ +bool +pgtls_read_pending(PGconn *conn) +{ + return SSL_pending(conn->ssl); +} + /* * Read data from a secure connection. * -- cgit v1.2.3