aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2015-02-16 23:05:20 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2015-02-16 23:05:20 +0200
commitc478959a009a926ec441f355219eae18537e648c (patch)
treef747a882edd7951e24b51ae791984561b4661c6f
parent1c2b7c0879d83ff79e4adf2c0a883df92b713da4 (diff)
downloadpostgresql-c478959a009a926ec441f355219eae18537e648c.tar.gz
postgresql-c478959a009a926ec441f355219eae18537e648c.zip
Fix comment in libpq OpenSSL code about why a substitue BIO is used.
The comment was copy-pasted from the backend code along with the implementation, but libpq has different reasons for using the BIO.
-rw-r--r--src/interfaces/libpq/fe-secure-openssl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c
index a32af343a50..1b9f3a4a7b0 100644
--- a/src/interfaces/libpq/fe-secure-openssl.c
+++ b/src/interfaces/libpq/fe-secure-openssl.c
@@ -1569,12 +1569,9 @@ PQsslAttribute(PGconn *conn, const char *attribute_name)
}
/*
- * Private substitute BIO: this does the sending and receiving using send() and
- * recv() instead. This is so that we can enable and disable interrupts
- * just while calling recv(). We cannot have interrupts occurring while
- * the bulk of openssl runs, because it uses malloc() and possibly other
- * non-reentrant libc facilities. We also need to call send() and recv()
- * directly so it gets passed through the socket/signals layer on Win32.
+ * Private substitute BIO: this does the sending and receiving using
+ * pqsecure_raw_write() and pqsecure_raw_read() instead, to allow those
+ * functions to disable SIGPIPE and give better error messages on I/O errors.
*
* These functions are closely modelled on the standard socket BIO in OpenSSL;
* see sock_read() and sock_write() in OpenSSL's crypto/bio/bss_sock.c.