PDA

View Full Version : Can't get peer certificate with QSslSocket::peerCertificate



sarabito
7th May 2012, 17:49
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!

amleto
7th May 2012, 18:37
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/qsslsocket-peercertificate.html