[TLS] read all available records from SSL_read()
commita95aaa9de984dc004dd1d4302147e8a0c23efb10
authorGlenn Strauss <gstrauss@gluelogic.com>
Wed, 27 Jul 2016 09:54:25 +0000 (27 05:54 -0400)
committerGlenn Strauss <gstrauss@gluelogic.com>
Wed, 27 Jul 2016 10:00:44 +0000 (27 06:00 -0400)
treeaab386e73a379e72f2828ec2de03589e129e8117
parentbce293e4a7b2a3d9d6518260c74dc3cb7233e342
[TLS] read all available records from SSL_read()

read all available records from SSL_read(), even if larger than
MAX_READ_LIMIT, since the data is already in memory.  openssl is
configured with SSL_MODE_RELEASE_BUFFERS and will release openssl
buffers once records have been read.

Without reading available data, there was a chance that the connection
would hang waiting for a read event on the fd, even though all the
data had already been read from kernel socket buffers and was in openssl
memory waiting to be read with SSL_read().

(thx glen and avij)
src/connections-glue.c