How to specify the certificate file to the Qt Webview.
-
I am creating a for embedded browser software using the Webkit.
Qt Version is 4.8.2.
I want https communication in the browser, but does not know how to specify (read file) the certificate file.
It is also required client certificate, but does not know how to set the certificate file.Please tell someone how.
Thanks a lot in advance.
-
You can load a certificate bundle (i.e. cacert.pem from http://curl.haxx.se/ca/cacert.pem) with the following command:
QSslSocket::addDefaultCaCertificates("/path_to_file/cacert.pem")
You also need to make sure the date and time is set correctly.