fix
This commit is contained in:
@ -44,6 +44,14 @@ class AbstractMqttPublisher(threading.Thread):
|
|||||||
tls_version=ssl.PROTOCOL_TLSv1_2,
|
tls_version=ssl.PROTOCOL_TLSv1_2,
|
||||||
ciphers=None # this does not mean "no cipher" but it means "default ciphers"
|
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.connect(self.config["broker"], int(self.config["port"]))
|
||||||
self.client.loop_start()
|
self.client.loop_start()
|
||||||
|
Reference in New Issue
Block a user