SSL_shutdown problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SSL_shutdown problem

Yegor Goncharov
Message
Good day all. I have an issue with the SSL_shutdown function. The situation is as follows: I open a connection to some server and I write something to it. I open another connection write something and fall asleep for 400 seconds. I wake up read something and close the second connection using
int err = SSL_shutdown (ioh->ssl);/* send SSL/TLS close_notify */
if( err == 0)
   err = SSL_shutdown (ioh->ssl);
if( err < 0) /*For the second time, the shutdown should not return 0*/
   err = SSL_get_error(ioh->ssl, err);
SSL_free (ioh->ssl);
 
Then I read and write and read from connection one. Then I try to close the connection one using the very same code. I'm fried after in the first SSL_shutdown. I tried to search the archives but found nothing on this issue. By the way, this happens on Linux platforms and does not happen on cygwin.
 
Thank you very much.
Yegor Goncharov