stud
stud copied to clipboard
SSL error queue fix
Errors were not getting cleared from the queue between various OpenSSL
function calls. This was causing the error queue to contain misleading
information on subsequent calls to SSL_get_error
.
One degenerate case was incorrect dispatching of errors after a failed
SSL_read
. Conditions that simply should have lead to another call to
SSL_read
were being treated as fatal. This was verified while stracing a
stud process and seeing read()
return with EAGAIN
and stud immediately
closing the socket fd and logging an SSL_read
error.
I think I've been bitten by this bug. Is there a problem with the patch?
#100 is related.
The patch is good. It's been running in production for a few months now and has solved the problem reported in the description.