Sorry for my bad english, it crashes, it doesn't hang. It is not true I don't handle errors. The SSL_write always returns a positive value (the number of bytes I'm trying to write), which means there has not been an error. The SSL_get_error called with a positive value always returns SSL_ERROR_NONE. The SSL_read instead returns 0, and the SSL_get_error tells me it is a SSL_ERROR_SYSCALL, which is what I expected even by SSL_write. If the SSL_write recognized the error, the application would close properly (as it does with the dummy read). David Schwartz ha scritto: ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]I found out that if I keep calling SSL_write, if the connection is closed remotely (killing stunnel), my application hangs.I thought your problem was crashing. Now I see that it's hanging. These are two totally different problems.I made some tests, and saw that the error happens only if I keep calling SSL_write. The first SSL_write after closing the connection returns a positive value, as if the closing wasn't seen. The second causes the hanging.Your read handler doesn't handle SSL_WANT_WRITE. Your write handler doesn't handle any of the SSL_WANT errors. It doesn't surprise me that your code spins in non-blocking mode. DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED] |
- possible SSL_write bug Alessandro Pivi - GLOBALcom engineering
- RE: possible SSL_write bug David Schwartz
- Re: possible SSL_write bu... Alessandro Pivi - GLOBALcom engineering
- RE: possible SSL_writ... David Schwartz
- Re: possible SSL_... Alessandro Pivi - GLOBALcom engineering