[openssl-users] Root-Level queries while using SSL-connections wrapping "sockets"

Viktor Dukhovni openssl-users at dukhovni.org
Sun Oct 9 17:25:00 UTC 2016


> On Oct 9, 2016, at 10:47 AM, Ajay Garg <ajaygargnsit at gmail.com> wrote:
> 
>> However, it might sometimes return SSL_ERROR_WANT_READ, in which
>> case, the SSL layer wants to read, even though the application
>> wants to write.  Your job is to do the read on the SSL layer's
>> behalf, and then retry the write.
> 
> For this particular sub-case, let's say SSL-layer wants to obtain "n"
> bytes from the socket/wire.
> 
> So, in this case, is it ok to do a blocking-read on the socket, unless
> "n" bytes are received (of course, a socket "error" will be handled in
> the blocking-call; it's just that any socket-timeouts will not be
> considered).

Yes, you can do a blocking read (provided you have already flushed all
pending writes).

-- 
	Viktor.



More information about the openssl-users mailing list