Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use OS TLS certs instead of specifying #24

Open
uajqq opened this issue Dec 21, 2021 · 1 comment
Open

Use OS TLS certs instead of specifying #24

uajqq opened this issue Dec 21, 2021 · 1 comment

Comments

@uajqq
Copy link

uajqq commented Dec 21, 2021

I'm trying (and failing) to debug a new installation on Mac. I have the problem narrowed down to something having to do with the CA certificates file. During the course of debugging, I noticed that mosquitto_pub has a --tls-use-os-certs switch. Using that switch, I can publish to my broker no problem from the command line, but I'm still struggling to publish from weewx using ca_certs = /opt/homebrew/etc/ca-certificates/cert.pem in my weewx config.

Is there a way to just have the extension automatically pass the --tls-use-os-certs option so users don't have to manually specify a certs location?

@uajqq uajqq closed this as completed Dec 21, 2021
@uajqq uajqq reopened this Dec 21, 2021
@uajqq
Copy link
Author

uajqq commented Dec 21, 2021

Sorry -- of course, this is using the paho-mqtt client, not mosquitto, to publish. However, in the paho-mqtt documentation:

ca_certs
a string path to the Certificate Authority certificate files that are to be treated as trusted by this client. If this is the only option given then the client will operate in a similar manner to a web browser. That is to say it will require the broker to have a certificate signed by the Certificate Authorities in ca_certs and will communicate using TLS v1, but will not attempt any form of authentication. This provides basic network encryption but may not be sufficient depending on how the broker is configured. By default, on Python 2.7.9+ or 3.4+, the default certification authority of the system is used. On older Python version this parameter is mandatory.

Does this mean there's a way to omit the ca_certs option and just allow paho-mqtt to automatically use the appropriate CA certs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant