javier-fg / mqtt-spb-wrapper

This python module implements a wrapper around the Eclipse Tahu Sparkplug B v1.0 core modules, to easily create and handle MQTT Sparkplug B entities in Python in an easy way.
Eclipse Public License 2.0
20 stars 12 forks source link

Error for connection using SSL #5

Closed juandiz closed 5 months ago

juandiz commented 1 year ago

In line 428 of the file mqtt_spb_wrapper.py there is an error in the verification of certificates. The tls_cert_path is used as if it were the tls_ca_path. On the other hand, to correctly start the paho client the function tls_insecure_set() must be called. In case the ssl is enabled tls_insecure_set(True) otherwise tls_insecure_set(False)

javier-fg commented 5 months ago

Thank you for the fix. Latest commit incorporates your comments. Also there is a new function parameter "tls_insecure" to disable/enable TLS verification ( for testing purposes / self-signed certificates ). These changes will be incorporated in the next library revision update.