[PyQt] QWebView and https
Russell Valentine
russ at coldstonelabs.org
Thu May 27 16:49:24 BST 2010
On 05/27/10 09:59, alanm wrote:
> class myNetworkManager(QNetworkAccessManager):
> """Implemented to override certain aspects of the network access, such as
> SSL certificate errors"""
> def __init__(self, parent=None):
> super(QNetworkAccessManager, self).__init__(parent)
>
> def sslErrors(reply, errors):
> reply.ignoreSslErrors()
>
> Now what I don't understand is how to make my QWebView use this class. I know
> that QWebPage has a setNetworkAccessManager() method, but I've tried various
> ways to connect these bits and nothing works yet.
>
> Do I have to subclass QWebPage or QWebView ?
Adding your the CA certificate should be easier then ignore all errors.
I havn't tried it but I think it would be something like this.
config = QSslConfiguration.defaultConfiguration()
certs=config.caCertificates()
certs.append(QSSLCertificate(QFile("starfieldcert")))
config.setCaCertificates(certs)
I think their certs are here:
https://certs.starfieldtech.com/anonymous/repository.seam
Good luck.
More information about the PyQt
mailing list