PDA

View Full Version : QSslSocket problem



The Storm
18th March 2008, 00:34
Hi again huh :)

I'm using Qt 4.3.4 and I'm tring to make secure connection to one server.
The server is wrote with other sockets library that support OpenSSL.
The server side is using .pam file (like apache) to secure the connection, the client side don't have anything, it just must connect to the server and establish a secure connection.
Ok so I create my Qt application with QSslSocket, I initalise it and I do connectToHostEncrypted("someip", port); and after that I'm waiting for waitForEncrypted() to return but something goes wrong, the signal disconnected() is directly called and the connection is closed, in the same time the server says that a secure connection is established but the client side (QSslSocket) directly close it...
I'm using the very simple QSslSocket examples from the documentation to make the test connection but no luck, I'm sure that the server dosn't close the connection because I had coded it myself, I coded and console client for it with the same library that the server is made and everything is fine, but with Qt I desided the use the QSslSocket for the GUI interface but it aways fail... Any ideas ?
If someone is interested the library that is coded the server is this one:
http://www.alhem.net/Sockets/

Regards,
The Storm

codeslicer
18th March 2008, 02:14
Are you sure that your QSslSocket object doesn't get deleted after the function/constuctor where it is declared? Could you post the relevant code?

The Storm
18th March 2008, 13:02
It's not deleted because it's global pointer and when I use unsecure tcp connection there is no problems...

The Storm
19th March 2008, 22:48
Please, anyone ? If you want I will upload testing ssl server writen with the library that I use so you will be able to test yourself.

codeslicer
23rd March 2008, 00:46
Did you try debugging your program? Perhaps use QSslSocket::sslErrors () and print them to a Message Box or something...

The Storm
23rd March 2008, 13:58
Oh I didn't noticed that there is such signal, I will check it out. But I wonder other thing, what kind of cript version is using this class SSLv3 or TLS ? :)