Added code to support any SSL protocol. 5_1_x

Thu, 18 Aug 2011 12:36:53 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 18 Aug 2011 12:36:53 +0200
branch
5_1_x
changeset 1220
efe069d7562d
parent 1218
825a24cf43f7
child 1224
3cb4ff958e33

Added code to support any SSL protocol.
(transplanted from c051673f8aaf79ade95282ece44e6505105068c0)

Helpviewer/Network/NetworkAccessManager.py file | annotate | diff | comparison | revisions
diff -r 825a24cf43f7 -r efe069d7562d Helpviewer/Network/NetworkAccessManager.py
--- a/Helpviewer/Network/NetworkAccessManager.py	Wed Aug 17 19:50:50 2011 +0200
+++ b/Helpviewer/Network/NetworkAccessManager.py	Thu Aug 18 12:36:53 2011 +0200
@@ -14,7 +14,7 @@
 from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply
 try:
     from PyQt4.QtNetwork import QSslCertificate, QSslConfiguration, QSslSocket, \
-        QSslError
+        QSslError, QSsl
     SSL_AVAILABLE = True
 except ImportError:
     SSL_AVAILABLE = False
@@ -81,6 +81,7 @@
                         caList.append(cert)
             sslCfg = QSslConfiguration.defaultConfiguration()
             sslCfg.setCaCertificates(caList)
+            sslCfg.setProtocol(QSsl.AnyProtocol)
             QSslConfiguration.setDefaultConfiguration(sslCfg)
             
             self.sslErrors.connect(self.__sslErrors)
@@ -251,6 +252,7 @@
                     for cert in caNew:
                         caList.append(cert)
                     sslCfg.setCaCertificates(caList)
+                    sslCfg.setProtocol(QSsl.AnyProtocol)
                     QSslConfiguration.setDefaultConfiguration(sslCfg)
                     reply.setSslConfiguration(sslCfg)
                     

eric ide

mercurial