Skip to content

Commit c478959

Browse files
committed
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.
1 parent 1c2b7c0 commit c478959

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/interfaces/libpq/fe-secure-openssl.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,12 +1569,9 @@ PQsslAttribute(PGconn *conn, const char *attribute_name)
15691569
}
15701570

15711571
/*
1572-
* Private substitute BIO: this does the sending and receiving using send() and
1573-
* recv() instead. This is so that we can enable and disable interrupts
1574-
* just while calling recv(). We cannot have interrupts occurring while
1575-
* the bulk of openssl runs, because it uses malloc() and possibly other
1576-
* non-reentrant libc facilities. We also need to call send() and recv()
1577-
* directly so it gets passed through the socket/signals layer on Win32.
1572+
* Private substitute BIO: this does the sending and receiving using
1573+
* pqsecure_raw_write() and pqsecure_raw_read() instead, to allow those
1574+
* functions to disable SIGPIPE and give better error messages on I/O errors.
15781575
*
15791576
* These functions are closely modelled on the standard socket BIO in OpenSSL;
15801577
* see sock_read() and sock_write() in OpenSSL's crypto/bio/bss_sock.c.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy