michaelarnauts / cec-mqtt-bridge

A HDMI-CEC to MQTT bridge for connecting HDMI-CEC-devices to your Home Automation system.
145 stars 48 forks source link

No way to provide ca_certs, certfile, and keyfile for TLS #33

Open Shulyaka opened 3 years ago

Shulyaka commented 3 years ago

There is an option to enable TLS, but there is no way to provide a certificate for it. I use a cert-based auth and a self-signed cert for my mqtt broker. The paho-mqtt documentation (https://pypi.org/project/paho-mqtt/#client) suggests to put these parameters to tls_set function:

tls_set(ca_certs=None, certfile=None, keyfile=None, cert_reqs=ssl.CERT_REQUIRED, tls_version=ssl.PROTOCOL_TLS, ciphers=None)

While the tls_version and ciphers might not be so important, the first 3 arguments are more common to be set.