Results 1 to 6 of 6

Thread: QSslSocket problem

  1. #1
    Join Date
    Aug 2007
    Posts
    166
    Thanks
    16
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QSslSocket problem

    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

  2. #2
    Join Date
    Feb 2008
    Posts
    153
    Thanks
    40
    Thanked 8 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSslSocket problem

    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?

  3. #3
    Join Date
    Aug 2007
    Posts
    166
    Thanks
    16
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSslSocket problem

    It's not deleted because it's global pointer and when I use unsecure tcp connection there is no problems...

  4. #4
    Join Date
    Aug 2007
    Posts
    166
    Thanks
    16
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSslSocket problem

    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.

  5. #5
    Join Date
    Feb 2008
    Posts
    153
    Thanks
    40
    Thanked 8 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSslSocket problem

    Did you try debugging your program? Perhaps use QSslSocket::sslErrors () and print them to a Message Box or something...

  6. #6
    Join Date
    Aug 2007
    Posts
    166
    Thanks
    16
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSslSocket problem

    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 ?

Similar Threads

  1. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 11:35
  2. Graphics view display problem.
    By kiranraj in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2007, 08:08
  3. [QMYSQL] connection problem
    By chaos_theory in forum Installation and Deployment
    Replies: 5
    Last Post: 2nd July 2007, 10:52
  4. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 15:08
  5. Replies: 16
    Last Post: 7th March 2006, 16:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.