Closed DCsunset closed 4 months ago
Thanks for your comment. Here are my thoughts on this:
SSL_CERT_FILE
and SSL_CERT_DIR
on most Unix systems!As for your suggestions, I also agree it's useful to allow pinning a certificate. I'll add the option later.
@DCsunset
It's true that Let's Encrypt has already been commonly used. But when a user doesn't have a domain or they want to set up the server in a local area network with custom domain, they still need to resort to self-signed cert.
That makes sense. I agree this PR is useful in these cases. I think after the above concerns are addressed I agree this can be merged. My logic was most people in this situation would just want to pin a specific certificate instead of having their own custom CA and signing their own local domains so we should make pinning work as well aside from only allowing custom CAs. (like, I never heard anyone use a CA SSH key and sign their own machines, they just compare the fingerprint and trust)
I don't think it's secure to add one's own CA to system pool. As anyone who has access to your CA can perform MITM attack on any website you visit.
It depends on your use case, I was talking about those people who have like centralized SSL-intercepting firewalls, like a company or something.
This PR adds an environment variable to set custom root CA for TLS verification. This option is safer than skipping TLS verification when using a self-signed certificate.
Furthermore, I believe it's more convenient to add a field in the config file (like
TLSRootCA
) that can be created duringgotify init
. I can continue implementing it if we agree on this idea.