Skip to content

Commit c00156e

Browse files
committedNov 22, 2017
mqtt: Also support PEM encoded client cert with privatekey
Can be used for authentication, but not supported by all MQTT brokers
1 parent 52ea7ca commit c00156e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎msgflo/msgflo.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ def __init__(self, broker):
255255
if self.broker_info.scheme == 'mqtts':
256256
default_port = 8883
257257
ca_certs = params.get('ca_certs')
258-
self._client.tls_set(ca_certs=ca_certs)
258+
certfile = params.get('certfile')
259+
keyfile = params.get('keyfile')
260+
self._client.tls_set(ca_certs=ca_certs, certfile=certfile, keyfile=keyfile)
259261
if self.broker_info.username:
260262
self._client.username_pw_set(self.broker_info.username, self.broker_info.password)
261263

0 commit comments

Comments
 (0)
Please sign in to comment.