Allow server-side TLS without client auth #77
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for this great project! I had a lot of fun setting it up for my Amcrest AD410 with Home Assistant.
I use a private CA for my internal network, so I wanted the ability to use TLS for the MQTT server but not the client. This pull request adds that capability, as well as the option to skip TLS verification for self-signed certificates if needed. I tested this successfully against my own AD410 and MQTT server with and without TLS server-side.
Please feel free to rework my code to fit your standards, or make any suggestions if there's something you'd like me to change prior to merging.
Summary of changes:
Modified TLS logic to allow enabling TLS server-side auth without using client certificates.
Added ability to skip TLS certificate verification for self-signed certs, when a CA can't be provided.
Updated README to reflect new environment variable for MQTT_TLS_INSECURE.
Bumped version to 1.0.17.