TLS connections can be established by default with system certificates to publish domains (for example to 'mqtts://iot.eclipse.org') - the client only requires cafiles if the broker provides self signed certificates

pull/8/head
mi3z 2017-11-22 10:40:20 +01:00
rodzic 465b2cfc42
commit 47e37404fd
1 zmienionych plików z 0 dodań i 3 usunięć

Wyświetl plik

@ -364,9 +364,6 @@ class MQTTClient:
self._handler = ClientProtocolHandler(self.plugins_manager, loop=self._loop)
if secure:
if self.session.cafile is None or self.session.cafile == '':
self.logger.warning("TLS connection can't be estabilshed, no certificate file (.cert) given")
raise ClientException("TLS connection can't be estabilshed, no certificate file (.cert) given")
sc = ssl.create_default_context(
ssl.Purpose.SERVER_AUTH,
cafile=self.session.cafile,