What you need to do is create your own CA certificate, then generate a leaf certificate that is signed by it for your server. You then get the QNetworkAccessManager that you're using to load the content for your QWebPage and get its QSslConfiguration. Finally use setCaCertificate on the configuration to tell it to trust certificates signed by your custom CA.
Cheers Rich. On 26 May 2014 11:30, Tom Isaacson <tom.isaac...@navico.com> wrote: > We're implementing an application on an embedded Linux device that > includes a browser using QWebPage in Qt 4.8.2. We also have OpenSSL > installed but when I try to use https it fails with the error "SSL > handshake failed". I can avoid this by calling ignoreSslErrors() in > QWebPage::sslErrorHandler() but this isn't a solution. > > The way I think this should work is that when the device receives the > certificate it should check it with the certificate authority. Is there > some code I need to add to do this? Alternatively, because this is a custom > embedded Linux device I'm wondering if I need to add some kind of > certificate, since it doesn't have anything right now. I can see from the > code at the bottom of this article that it's possible to add certificates > but I don't know what kind of certificate or where to get it from: > > http://www.qtforum.org/article/37666/qwebview-not-displaying-some-ssl-pages-on-windows-qt-4-8-mingw.html > > Any suggestions would be a great help, thanks. > > Tom Isaacson > > > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest >
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest