startTLS: drop connection if server certificate is not valid
This commit is contained in:
parent
dbb2b1c9ff
commit
6dcaf21891
@ -313,6 +313,7 @@ de = {
|
|||||||
# startTLS messages - TODO: Translate
|
# startTLS messages - TODO: Translate
|
||||||
"startTLS-initiated": "Attempting secure connection",
|
"startTLS-initiated": "Attempting secure connection",
|
||||||
"startTLS-secure-connection-ok": "Secure connection established ({})",
|
"startTLS-secure-connection-ok": "Secure connection established ({})",
|
||||||
|
"startTLS-server-certificate-invalid": "Secure connection failed. The server uses an invalid security certificate. This communication could be intercepted by a third party.",
|
||||||
"startTLS-not-supported-client": "This client does not support TLS",
|
"startTLS-not-supported-client": "This client does not support TLS",
|
||||||
"startTLS-not-supported-server": "This server does not support TLS",
|
"startTLS-not-supported-server": "This server does not support TLS",
|
||||||
|
|
||||||
|
|||||||
@ -314,6 +314,7 @@ en = {
|
|||||||
|
|
||||||
"startTLS-initiated": "Attempting secure connection",
|
"startTLS-initiated": "Attempting secure connection",
|
||||||
"startTLS-secure-connection-ok": "Secure connection established ({})",
|
"startTLS-secure-connection-ok": "Secure connection established ({})",
|
||||||
|
"startTLS-server-certificate-invalid": "Secure connection failed. The server uses an invalid security certificate. This communication could be intercepted by a third party.",
|
||||||
"startTLS-not-supported-client": "This client does not support TLS",
|
"startTLS-not-supported-client": "This client does not support TLS",
|
||||||
"startTLS-not-supported-server": "This server does not support TLS",
|
"startTLS-not-supported-server": "This server does not support TLS",
|
||||||
|
|
||||||
|
|||||||
@ -314,6 +314,7 @@ it = {
|
|||||||
|
|
||||||
"startTLS-initiated": "Tentativo di connessione sicura in corso",
|
"startTLS-initiated": "Tentativo di connessione sicura in corso",
|
||||||
"startTLS-secure-connection-ok": "Connessione sicura stabilita ({})",
|
"startTLS-secure-connection-ok": "Connessione sicura stabilita ({})",
|
||||||
|
"startTLS-server-certificate-invalid": "Connessione sicura non riuscita. Il certificato di sicurezza di questo server non è valido. La comunicazione potrebbe essere intercettata da una terza parte.",
|
||||||
"startTLS-not-supported-client": "Questo client non supporta TLS",
|
"startTLS-not-supported-client": "Questo client non supporta TLS",
|
||||||
"startTLS-not-supported-server": "Questo server non supporta TLS",
|
"startTLS-not-supported-server": "Questo server non supporta TLS",
|
||||||
|
|
||||||
|
|||||||
@ -316,6 +316,7 @@ ru = {
|
|||||||
# startTLS messages - TODO: Translate
|
# startTLS messages - TODO: Translate
|
||||||
"startTLS-initiated": "Attempting secure connection",
|
"startTLS-initiated": "Attempting secure connection",
|
||||||
"startTLS-secure-connection-ok": "Secure connection established ({})",
|
"startTLS-secure-connection-ok": "Secure connection established ({})",
|
||||||
|
"startTLS-server-certificate-invalid": "Secure connection failed. The server uses an invalid security certificate. This communication could be intercepted by a third party.",
|
||||||
"startTLS-not-supported-client": "This client does not support TLS",
|
"startTLS-not-supported-client": "This client does not support TLS",
|
||||||
"startTLS-not-supported-server": "This server does not support TLS",
|
"startTLS-not-supported-server": "This server does not support TLS",
|
||||||
|
|
||||||
|
|||||||
@ -92,10 +92,10 @@ class SyncClientProtocol(JSONCommandProtocol):
|
|||||||
try:
|
try:
|
||||||
if "Invalid DNS-ID" in str(reason.value):
|
if "Invalid DNS-ID" in str(reason.value):
|
||||||
self._client._serverSupportsTLS = False
|
self._client._serverSupportsTLS = False
|
||||||
elif "certificate verify failed" in str(reason.value):
|
|
||||||
self._client._serverSupportsTLS = False
|
|
||||||
elif "tlsv1 alert protocol version" in str(reason.value):
|
elif "tlsv1 alert protocol version" in str(reason.value):
|
||||||
self._client._clientSupportsTLS = False
|
self._client._clientSupportsTLS = False
|
||||||
|
elif "certificate verify failed" in str(reason.value):
|
||||||
|
self.dropWithError(getMessage("startTLS-server-certificate-invalid"))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
self._client.destroyProtocol()
|
self._client.destroyProtocol()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user