E5Network/E5SslInfoWidget.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2677
3d4277929fb3
parent 2990
583beaf0b4b8
child 3058
0a02c433f52d
--- a/E5Network/E5SslInfoWidget.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/E5Network/E5SslInfoWidget.py	Fri Oct 18 23:00:41 2013 +0200
@@ -65,8 +65,8 @@
         label = QLabel(self)
         label.setWordWrap(True)
         if cert.isNull():
-            label.setText(
-                self.trUtf8("Warning: this site is NOT carrying a certificate."))
+            label.setText(self.trUtf8(
+                "Warning: this site is NOT carrying a certificate."))
             imageLabel.setPixmap(UI.PixmapCache.getPixmap("securityLow32.png"))
         else:
             if qVersion() >= "5.0.0":
@@ -75,16 +75,21 @@
                 valid = cert.isValid()
             if valid:
                 if qVersion() >= "5.0.0":
-                    txt = ", ".join(cert.issuerInfo(QSslCertificate.CommonName))
+                    txt = ", ".join(
+                        cert.issuerInfo(QSslCertificate.CommonName))
                 else:
                     txt = cert.issuerInfo(QSslCertificate.CommonName)
-                label.setText(self.trUtf8("The certificate for this site is valid"
+                label.setText(self.trUtf8(
+                    "The certificate for this site is valid"
                     " and has been verified by:\n{0}").format(
                     Utilities.decodeString(txt)))
-                imageLabel.setPixmap(UI.PixmapCache.getPixmap("securityHigh32.png"))
+                imageLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("securityHigh32.png"))
             else:
-                label.setText(self.trUtf8("The certificate for this site is NOT valid."))
-                imageLabel.setPixmap(UI.PixmapCache.getPixmap("securityLow32.png"))
+                label.setText(self.trUtf8(
+                    "The certificate for this site is NOT valid."))
+                imageLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("securityLow32.png"))
             layout.addWidget(label, rows, 1)
             rows += 1
             
@@ -132,21 +137,26 @@
             proto = cipher.protocol()
             if proto == QSsl.SslV3:
                 sslVersion = "SSL 3.0"
-                imageLabel.setPixmap(UI.PixmapCache.getPixmap("securityHigh32.png"))
+                imageLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("securityHigh32.png"))
             elif proto == QSsl.TlsV1:
                 sslVersion = "TLS 1.0"
-                imageLabel.setPixmap(UI.PixmapCache.getPixmap("securityHigh32.png"))
+                imageLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("securityHigh32.png"))
             elif proto == QSsl.SslV2:
                 sslVersion = "SSL 2.0"
-                imageLabel.setPixmap(UI.PixmapCache.getPixmap("securityLow32.png"))
+                imageLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("securityLow32.png"))
             else:
                 sslVersion = self.trUtf8("unknown")
-                imageLabel.setPixmap(UI.PixmapCache.getPixmap("securityLow32.png"))
+                imageLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("securityLow32.png"))
             rows += 1
             
             label = QLabel(self)
             label.setWordWrap(True)
-            label.setText(self.trUtf8("It uses protocol: {0}").format(sslVersion))
+            label.setText(self.trUtf8(
+                "It uses protocol: {0}").format(sslVersion))
             layout.addWidget(label, rows, 1)
             rows += 1
             
@@ -182,7 +192,8 @@
         Private slot to show certificate information.
         """
         from .E5SslCertificatesInfoDialog import E5SslCertificatesInfoDialog
-        dlg = E5SslCertificatesInfoDialog(self.__configuration.peerCertificateChain())
+        dlg = E5SslCertificatesInfoDialog(
+            self.__configuration.peerCertificateChain())
         dlg.exec_()
     
     def accept(self):

eric ide

mercurial