[openssl-users] Close TCP socket after SSL_clear()?
Charles Mills
charlesm at mcn.org
Thu Jan 10 23:07:35 UTC 2019
On Windows, for a new session, I am issuing a Windows accept() followed by
SSL_new(), SSL_set_fd() and so forth.
When the session sees some sort of an abnormal receive condition, I am doing
int retCode = SSL_get_shutdown(sessionSSL);
if ( retCode & SSL_RECEIVED_SHUTDOWN )
{
SSL_shutdown(sessionSSL);
}
else
{
SSL_clear(sessionSSL);
}
Questions:
1. Do I also need to do a closesocket() (equivalent to UNIX close())
on the Windows socket?
2. Does anyone want to critique the above logic in any other way?
The code basically "works" but I see evidence that a Windows TCP session is
still open following an SSL error.
Thanks,
Charles Mills
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20190110/13ef68ca/attachment.html>
More information about the openssl-users
mailing list