Results 1 to 2 of 2

Thread: Can't get peer certificate with QSslSocket::peerCertificate

  1. #1
    Join Date
    Sep 2009
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Can't get peer certificate with QSslSocket::peerCertificate

    I have an SSL Server that needs to authenticate clients by their certificates. After I receive the QSslSocket::encrypted signal in a local slot, I try to get the client certificate with the peerCertificate() method. But there is no certificate returned by this method. I also try to get the peerCertificateChain() and I get an empty list. I also try to get these values from the sslConfiguration, but they are not there either. I also try to get all these values after a peerVerifyError and sslErrors signals are emitted. Nothing.

    I believe there was a bug in Qt 4.3 related to this issue, but I find it hard to believe it hasn't been fixed by 4.7.4, which is the version I'm using.

    Does anyone have clues how to get SSL client peer verify with certificates working?

    Thank you!

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Can't get peer certificate with QSslSocket::peerCertificate

    which thread do you want to use? It's annoying for everyone else that is on both boards and some consider it rude to cross post threads.
    http://www.qtforum.org/article/37894...rtificate.html
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar Threads

  1. QSslSocket, certificate and error
    By ithanoss in forum Newbie
    Replies: 2
    Last Post: 26th May 2011, 17:20
  2. Generating key and certificate for QSslSocket
    By dawwin in forum Qt Programming
    Replies: 7
    Last Post: 27th March 2011, 14:12
  3. LAN Peer-Peer Chating
    By moh.gup@gmail.com in forum Qt Programming
    Replies: 1
    Last Post: 11th March 2010, 13:04
  4. QT3 - detecting peer
    By sinja in forum Qt Programming
    Replies: 2
    Last Post: 7th October 2009, 17:44
  5. Usb Peer To Peer
    By locus in forum General Programming
    Replies: 1
    Last Post: 6th February 2007, 21:41

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.