I wonder if server is performing SSL_shutdown() properly.. I remember encountering similar problems back in the days I was playing with openssl.
It's unlikely to be client problem, as client simply does SSL_read() until it receives error SSL_ERROR_ZERO_RETURN. At this point, it has already decrypted everything, and performs socket closure. My guess is that server is using sockets in non-blocking mode, and does not check return value from SSL_shutdown().
|