expanduser for TLS files in MQTT listeners
This commit is contained in:
parent
f7df1d2f6e
commit
0d182820e8
1 changed files with 3 additions and 3 deletions
|
@ -153,7 +153,7 @@ class MqttBackend(Backend):
|
||||||
topics = listener.get('topics')
|
topics = listener.get('topics')
|
||||||
username = listener.get('username')
|
username = listener.get('username')
|
||||||
password = listener.get('password')
|
password = listener.get('password')
|
||||||
tls_cafile = listener.get('tls_cafile')
|
tls_cafile = os.path.abspath(os.path.expanduser(listener.get('tls_cafile')))
|
||||||
|
|
||||||
if not host or not topics:
|
if not host or not topics:
|
||||||
self.logger.warning('No host nor list of topics specified for ' +
|
self.logger.warning('No host nor list of topics specified for ' +
|
||||||
|
@ -169,8 +169,8 @@ class MqttBackend(Backend):
|
||||||
|
|
||||||
if tls_cafile:
|
if tls_cafile:
|
||||||
client.tls_set(ca_certs=tls_cafile,
|
client.tls_set(ca_certs=tls_cafile,
|
||||||
certfile=listener.get('tls_certfile'),
|
certfile=os.path.abspath(os.path.expanduser(listener.get('tls_certfile'))),
|
||||||
keyfile=listener.get('tls_keyfile'),
|
keyfile=os.path.abspath(os.path.expanduser(listener.get('tls_keyfile'))),
|
||||||
tls_version=MQTTPlugin.get_tls_version(listener.get('tls_version')),
|
tls_version=MQTTPlugin.get_tls_version(listener.get('tls_version')),
|
||||||
ciphers=listener.get('tls_ciphers'))
|
ciphers=listener.get('tls_ciphers'))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue