In case of a SSL_WANT_READ/WANT_WRITE error, what are you doing
as a reaction?
You have to select and then repeat exactly the last operation.
So if you do an SSL_write and get SSL_WANT_READ, you select
and then repeat the SSL_write operation.
At least this is what I rememember.