aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-secure-openssl.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-12-01 17:43:14 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-12-01 17:45:04 +0200
commit4e86f1b16da85ba0a99c592dc7b977b3be80a483 (patch)
tree38f0c162189df4ab209b3832f6215d8c2b9725c1 /src/interfaces/libpq/fe-secure-openssl.c
parent6d6cade05bcb68ca8677aa5502ca73274d6e4539 (diff)
downloadpostgresql-4e86f1b16da85ba0a99c592dc7b977b3be80a483.tar.gz
postgresql-4e86f1b16da85ba0a99c592dc7b977b3be80a483.zip
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.
Diffstat (limited to 'src/interfaces/libpq/fe-secure-openssl.c')
-rw-r--r--src/interfaces/libpq/fe-secure-openssl.c9
1 files changed, 9 insertions, 0 deletions
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
@@ -187,6 +187,15 @@ pgtls_open_client(PGconn *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.
*
* On failure, this function is responsible for putting a suitable message