Re: libpq SSL with non-blocking sockets - Mailing list pgsql-hackers

From Tom Lane
Subject Re: libpq SSL with non-blocking sockets
Date
Msg-id 13973.1311527436@sss.pgh.pa.us
Whole thread Raw
In response to Re: libpq SSL with non-blocking sockets  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: libpq SSL with non-blocking sockets
Next
From: Florian Pflug
Date:
Subject: Re: XPATH vs. server_encoding != UTF-8