From 6d5a618767cbd88e4a594f4591eab4614cf26bd4 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Tue, 5 Feb 2019 20:11:59 +0100 Subject: [PATCH] startTLS: show negotiated TLS version --- syncplay/messages_de.py | 2 +- syncplay/messages_en.py | 2 +- syncplay/messages_it.py | 2 +- syncplay/messages_ru.py | 2 +- syncplay/protocols.py | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/syncplay/messages_de.py b/syncplay/messages_de.py index e67cbf8..6c8b3d0 100755 --- a/syncplay/messages_de.py +++ b/syncplay/messages_de.py @@ -312,7 +312,7 @@ de = { # startTLS messages - TODO: Translate "startTLS-initiated": "Attempting secure connection", - "startTLS-secure-connection-ok": "Secure connection established", + "startTLS-secure-connection-ok": "Secure connection established ({})", "startTLS-not-supported-client": "TLS is not supported", "startTLS-not-supported-server": "This server does not support TLS", diff --git a/syncplay/messages_en.py b/syncplay/messages_en.py index f5971cd..b907614 100755 --- a/syncplay/messages_en.py +++ b/syncplay/messages_en.py @@ -313,7 +313,7 @@ en = { "update-menu-label": "Check for &update", "startTLS-initiated": "Attempting secure connection", - "startTLS-secure-connection-ok": "Secure connection established", + "startTLS-secure-connection-ok": "Secure connection established ({})", "startTLS-not-supported-client": "TLS is not supported", "startTLS-not-supported-server": "This server does not support TLS", diff --git a/syncplay/messages_it.py b/syncplay/messages_it.py index 33fcab9..cf31785 100755 --- a/syncplay/messages_it.py +++ b/syncplay/messages_it.py @@ -313,7 +313,7 @@ it = { "update-menu-label": "Controlla la presenza di &aggiornamenti", "startTLS-initiated": "Tentativo di connessione sicura in corso", - "startTLS-secure-connection-ok": "Connessione sicura stabilita", + "startTLS-secure-connection-ok": "Connessione sicura stabilita ({})", "startTLS-not-supported-client": "TLS non รจ supportato", "startTLS-not-supported-server": "Questo server non supporta TLS", diff --git a/syncplay/messages_ru.py b/syncplay/messages_ru.py index 7d258a2..01e9e1b 100755 --- a/syncplay/messages_ru.py +++ b/syncplay/messages_ru.py @@ -315,7 +315,7 @@ ru = { # startTLS messages - TODO: Translate "startTLS-initiated": "Attempting secure connection", - "startTLS-secure-connection-ok": "Secure connection established", + "startTLS-secure-connection-ok": "Secure connection established ({})", "startTLS-not-supported-client": "TLS is not supported", "startTLS-not-supported-server": "This server does not support TLS", diff --git a/syncplay/protocols.py b/syncplay/protocols.py index cc7ad9d..3ec83d8 100755 --- a/syncplay/protocols.py +++ b/syncplay/protocols.py @@ -325,7 +325,8 @@ class SyncClientProtocol(JSONCommandProtocol): answer = message["startTLS"] if "startTLS" in message else None if "true" in answer and not self.logged and self._client.protocolFactory.options is not None: self.transport.startTLS(self._client.protocolFactory.options) - self._client.ui.showMessage(getMessage("startTLS-secure-connection-ok")) + TLSConnVersion = self.transport.protocol._tlsConnection.get_protocol_version_name() + self._client.ui.showMessage(getMessage("startTLS-secure-connection-ok").format(TLSConnVersion)) elif "false" in answer: self._client.ui.showErrorMessage(getMessage("startTLS-not-supported-server")) self.sendHello()