Fixed the SSL info widget. eric7

Sun, 29 Aug 2021 17:46:56 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 29 Aug 2021 17:46:56 +0200
branch
eric7
changeset 8554
167c78918573
parent 8553
10d31e5ce9e5
child 8555
844c2713bf44

Fixed the SSL info widget.

eric7/EricNetwork/EricSslInfoWidget.py file | annotate | diff | comparison | revisions
--- a/eric7/EricNetwork/EricSslInfoWidget.py	Sun Aug 29 12:40:51 2021 +0200
+++ b/eric7/EricNetwork/EricSslInfoWidget.py	Sun Aug 29 17:46:56 2021 +0200
@@ -125,38 +125,34 @@
             layout.addWidget(label, rows, 1)
             
             proto = cipher.protocol()
-            if proto == QSsl.SslProtocol.SslV3:
-                sslVersion = "SSL 3.0"
+            if proto == QSsl.SslProtocol.TlsV1_0:
+                sslVersion = "TLS v1.0"
                 imageLabel.setPixmap(
                     UI.PixmapCache.getPixmap("securityLow32"))
-            elif proto == QSsl.SslProtocol.TlsV1SslV3:
-                sslVersion = "TLS 1.0/SSL 3.0"
+            elif proto == QSsl.SslProtocol.TlsV1_1:
+                sslVersion = "TLS v1.1"
+                imageLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("securityMedium32"))
+            elif proto == QSsl.SslProtocol.TlsV1_2:
+                sslVersion = "TLS v1.2"
+                imageLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("securityHigh32"))
+            elif proto == QSsl.SslProtocol.TlsV1_3:
+                sslVersion = "TLS v1.3"
+                imageLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("securityHigh32"))
+            elif proto == QSsl.SslProtocol.DtlsV1_0:
+                sslVersion = "DTLS v1.0"
                 imageLabel.setPixmap(
                     UI.PixmapCache.getPixmap("securityLow32"))
-            elif proto == QSsl.SslProtocol.SslV2:
-                sslVersion = "SSL 2.0"
+            elif proto == QSsl.SslProtocol.DtlsV1_2:
+                sslVersion = "DTLS v1.2"
                 imageLabel.setPixmap(
-                    UI.PixmapCache.getPixmap("securityLow32"))
+                    UI.PixmapCache.getPixmap("securityHigh32"))
             else:
                 sslVersion = self.tr("unknown")
                 imageLabel.setPixmap(
                     UI.PixmapCache.getPixmap("securityLow32"))
-            if proto == QSsl.SslProtocol.TlsV1_0:
-                sslVersion = "TLS 1.0"
-                imageLabel.setPixmap(
-                    UI.PixmapCache.getPixmap("securityHigh32"))
-            elif proto == QSsl.SslProtocol.TlsV1_1:
-                sslVersion = "TLS 1.1"
-                imageLabel.setPixmap(
-                    UI.PixmapCache.getPixmap("securityHigh32"))
-            elif proto == QSsl.SslProtocol.TlsV1_2:
-                sslVersion = "TLS 1.2"
-                imageLabel.setPixmap(
-                    UI.PixmapCache.getPixmap("securityHigh32"))
-            elif proto == QSsl.SslProtocol.TlsV1_3:
-                sslVersion = "TLS 1.3"
-                imageLabel.setPixmap(
-                    UI.PixmapCache.getPixmap("securityHigh32"))
             rows += 1
             
             label = QLabel(self)

eric ide

mercurial