This commit is contained in:
Wolfgang Hottgenroth
2022-02-07 16:28:01 +01:00
parent 0e333c62e3
commit 5bf7d39ec0

View File

@ -44,6 +44,14 @@ class AbstractMqttPublisher(threading.Thread):
tls_version=ssl.PROTOCOL_TLSv1_2,
ciphers=None # this does not mean "no cipher" but it means "default ciphers"
)
elif ("ca" in self.config):
self.client.tls_set(
keyfile=self.config["key"],
cert_reqs=ssl.CERT_REQUIRED,
tls_version=ssl.PROTOCOL_TLSv1_2,
ciphers=None # this does not mean "no cipher" but it means "default ciphers"
)
self.client.connect(self.config["broker"], int(self.config["port"]))
self.client.loop_start()