From 4f03528d345e95ec5ed63615c37df55a6e7ca93d Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 3 Apr 2019 11:11:13 +0100 Subject: [PATCH] Raise config error if empty ca list --- synapse/config/tls.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/synapse/config/tls.py b/synapse/config/tls.py index 2022da5147..e8d417d024 100644 --- a/synapse/config/tls.py +++ b/synapse/config/tls.py @@ -93,6 +93,10 @@ class TlsConfig(Config): # Read in and parse custom CA certificates if self.federation_custom_ca_list is not None: + if self.federation_custom_ca_list: + raise ConfigError("federation_custom_ca_list specified without " + "any certificate files") + certs = [] for ca_file in self.federation_custom_ca_list: logger.debug("Reading custom CA certificate file: %s", ca_file)