QUOTE | Ok, there *was* a bug in the Windows implementation of the SSL code. Actually the problem was in the Win32 system layer, in the set-noblock function. To set a socket in blocking mode using ioctlsocket(FIONBIO), you need to clear any previous WSAEventSelect(), that the code seemed to do according to such MSDN statement:
"To cancel the association and selection of network events on a socket, lNetworkEvents should be set to zero, in which case the hEventObject parameter will be ignored."
This is what the Win32 layer was doing. OTOH, in another section of the documentation, states that to clear pending event associations, you need to:
"To set socket s back to blocking mode, it is first necessary to clear the event record associated with socket s via a call to WSAEventSelect with lNetworkEvents set to zero and the hEventObject parameter set to NULL. You can then call ioctlsocket or WSAIoctl to set the socket back to blocking mode."
So the fscking hEventObject MUST be set to NULL in order for the event object to be de-associated with the socket. Damn it! This might have caused the wierd timeouts and behaviour on SSL-XMail runing on Windows, that I wasn't seeing in my tests very likely because of timings (running Outlook on the same XMail box). Here are pre11 packages:
http://www.xmailserver.org/xmail-1.24-pre11.tar.gz http://www.xmailserver.org/xmail-1.24-pre11.win32bin.zip
Test reports welcome ...
- Davide
|
|