Re: libpq SSL with non-blocking sockets
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Martin Pihlak <martin.pihlak@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Steve Singer <ssinger_pg@sympatico.ca>, PG Hackers <pgsql-hackers@postgresql.org>
Date: 2011-07-24T17:10:36Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Improve libpq's error reporting for SSL failures.
- fee476da952a 9.2.0 cited
-
Use OpenSSL's SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag.
- d0c23026b249 9.2.0 cited
I wrote: > Still wondering about the SSL_read end of it, though. And on that front, some digging around in the OpenSSL source code indicates that they do all their work in internal buffers, and transfer data into SSL_read's result buffer only when ready to return it. So the claim in the documentation that SSL_read has a restriction comparable to SSL_write is a lie: there is no case where they'll copy some data into the buffer and then return -1. So the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER solution looks like a good fix. I'll see about applying it. regards, tom lane