Hi,
I'm currently developping with Qt 4.3.1 on Windows XP SP2 using VS2005 SP1. I'm trying to get a SSL Server to work. Both the ssl client and the ssl server are Qt project and are run on the same machine. I'm using ip address 127.0.0.1 and I have installed openssl for windows from http://www.slproweb.com/products/Win32OpenSSL.html.
The structure for the client is to have a QThread create the ssl socket in the run method, connect the socket to the thread slot using Queued connections and try connecting to the ssl server by calling connectToHost. When the socket raises the connected signal, the socket then calls startClientEncryption.
The ssl server program starts a QThread that creates an ssl server. On receiving on incoming connection, the server creates an ssl socket, sets the descriptor. The Thread then connects the socket to its own slots using queued connections and then calls startServerEncryption.
No error occurs so far. Then the following error messages appears in the client ouput : "QSocketNotifier: socket notifiers cannot be enabled from another thread".
If I try creating a ThreadNotifiger object in the client thread and connect that to the ssl socket, the server falls over with an UnknownSocketError and the connection is broken.
I have tried changing the nature of the connections, changing the ssl protocl, creating the client socket in main UI client thread. Nothing has worked. Sometimes the server crashes or I always get the UnknowSocketError. No SSL errors are raised. The server error string is empty.
I have tried to check the Qt documents about which version of openssl I should be using. I couldn't fing anything about this.
Does anyone have any advice about how to get this to work ?
Thanks,
Pascal.
Bookmarks