PDA

View Full Version : HTTPS Client Authentication (Mutual Authentication)



cbourne
3rd December 2010, 16:22
Hi,

I'm trying to build a quick prototype that makes an HTTPS request to a server. However, the server requires the client to present a certificate to identify itself. i.e. Mutual Authentication.

I've looked everywhere but can't seem to find even a basic example or documentation of where to start here. I did the same thing using a Ruby script in about 5 mins.

Can anybody provide a simple example or point me at some documentation?

Best Regards,

Carl

wysota
3rd December 2010, 22:02
QSslSocket::addCaCertificate(), QSslSocket::setLocalCertificate(), QSslSocket::setPrivateKey() or QSslSocket::setSslConfiguration(). There is also QNetworkRequest::setSslConfiguration() in case you want to use QNetworkAccessManager directly.

cbourne
5th December 2010, 11:10
Thanks for the pointers - I'll give this a try. Guess theres no working examples available?

wysota
5th December 2010, 11:51
Haven't seen any.