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 f16ceed539
commit dc5c63a57c

View File

@ -88,6 +88,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()