> I made a program that connects to a stunnel server. > I am able to connect to the server, read, write, with no problems.
Good. > The problem is that if I close the stunnel, I can handle the error > correctly if I make an SSL_read, but not if I make an SSL_write. > The SSL_write returns a positive value even if the stunnel is closed, > and on next SSL_write the application closes suddently. The first part is typical. Depending on exactly how the tunnel was closed, a write may not detect it immediately. As for your application closing suddenly on the next SSL_write, this is abnormal. Most likely, it's a bug in your program. It could be a bad OpenSSL build or a bug in OpenSSL, but that's unlikely. > So if I close the stunnel, and make two writes in a row in my > application, my application dies. Figure out why. Get a core dump or attach a debugger and see why and where it's dying. DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]