startTLS: fall back to TCP if server certificate is not validated

This commit is contained in:
Alberto Sottile 2019-02-04 19:50:09 +01:00
parent fe11e66b29
commit 063a191e99

View File

@ -85,6 +85,8 @@ class SyncClientProtocol(JSONCommandProtocol):
try:
if "Invalid DNS-ID" in str(reason.value):
self._client._serverSupportsTLS = False
elif "certificate verify failed" in str(reason.value):
self._client._serverSupportsTLS = False
except:
pass
self._client.destroyProtocol()