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-24T16:45:35Z
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 →
  1. Improve libpq's error reporting for SSL failures.

  2. Use OpenSSL's SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag.

I wrote:
> So this does look like it'd fix the issue for SSL_write, without needing
> to introduce a concept of a "write frozen" buffer state.  I am wondering
> though how far back support for this flag exists in OpenSSL,

A bit of archaeology reveals that the flag was introduced in OpenSSL
0.9.4, released in 1999.  So it's probably Old Enough.  (BTW, the 0.9.4
changelog credits this change to one Bodo Moeller ... so the comments
from him in the other thread I linked to can be considered authoritative
...)

Still wondering about the SSL_read end of it, though.

			regards, tom lane