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.
pull/14/head
Heikki Linnakangas 11 years ago
parent 1c2b7c0879
commit c478959a00
  1. 9
      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 * Private substitute BIO: this does the sending and receiving using
* recv() instead. This is so that we can enable and disable interrupts * pqsecure_raw_write() and pqsecure_raw_read() instead, to allow those
* just while calling recv(). We cannot have interrupts occurring while * functions to disable SIGPIPE and give better error messages on I/O errors.
* 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.
* *
* These functions are closely modelled on the standard socket BIO in OpenSSL; * 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. * see sock_read() and sock_write() in OpenSSL's crypto/bio/bss_sock.c.

Loading…
Cancel
Save