mirror of
https://github.com/thingsboard/thingsboard-gateway
synced 2025-10-26 22:31:42 +08:00
Added ability to set insecure parameter in tb_gateway.yaml
This commit is contained in:
@@ -54,8 +54,10 @@ class TBClient(threading.Thread):
|
||||
tls_version=PROTOCOL_TLSv1_2,
|
||||
cert_reqs=CERT_REQUIRED,
|
||||
ciphers=None)
|
||||
if self.__ca_cert is not None:
|
||||
if (self.__ca_cert is not None and (self.__private_key is not None or self.__cert is not None)) or credentials.get("insecure", False):
|
||||
self.client._client.tls_insecure_set(False)
|
||||
else:
|
||||
self.client._client.tls_insecure_set(True)
|
||||
# if self.__tls and self.__ca_cert is None and self.__private_key is None and self.__cert is None:
|
||||
# pylint: disable=protected-access
|
||||
# Adding callbacks
|
||||
|
||||
Reference in New Issue
Block a user