From 7e8fa46402ce688f4feb31e811d5fbff0e34732e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Tue, 28 Dec 2021 18:29:58 +0100 Subject: Try to guess CA bundle path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio/config.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'poezio/config.py') diff --git a/poezio/config.py b/poezio/config.py index 9c2201e7..7bbc9268 100644 --- a/poezio/config.py +++ b/poezio/config.py @@ -30,6 +30,17 @@ ConfigDict = Dict[str, Dict[str, ConfigValue]] DEFSECTION = "Poezio" + +CA_CERT_DEFAULT_PATHS = { + '/etc/ssl/cert.pem', + '/etc/ssl/certs/ca-certificates.crt', + '/etc/ssl/certs/ca-bundle.crt', + '/etc/pki/tls/certs/ca-bundle.crt', + '/etc/ssl/certs/ca-certificates.crt', + '/etc/ca-certificates/extracted/tls-ca-bundle.pem', + '/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt', +} + DEFAULT_CONFIG: ConfigDict = { 'Poezio': { 'ack_message_receipts': True, @@ -40,7 +51,7 @@ DEFAULT_CONFIG: ConfigDict = { 'autorejoin_delay': '5', 'autorejoin': False, 'beep_on': 'highlight private invite disconnect', - 'ca_cert_path': '', + 'ca_cert_path': ':'.join(CA_CERT_DEFAULT_PATHS), 'certificate': '', 'certfile': '', 'ciphers': 'HIGH+kEDH:HIGH+kEECDH:HIGH:!PSK:!SRP:!3DES:!aNULL', -- cgit v1.2.3