Add comment and simplify diff
2 files changed, 4 insertions, 1 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 09f05173d9..654d410fbf 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -111,11 +111,11 @@ class ServerConfig(Config):
self.admin_contact = config.get("admin_contact", None)
# FIXME: federation_domain_whitelist needs sytests
+ self.federation_domain_whitelist = None
federation_domain_whitelist = config.get(
"federation_domain_whitelist", None,
)
- self.federation_domain_whitelist = None
if federation_domain_whitelist is not None:
# turn the whitelist into a hash for speed of lookup
self.federation_domain_whitelist = {}
diff --git a/synapse/config/tls.py b/synapse/config/tls.py
index 6f76cf80b0..ea54bd0793 100644
--- a/synapse/config/tls.py
+++ b/synapse/config/tls.py
@@ -98,6 +98,9 @@ class TlsConfig(Config):
self.federation_ca_trust_root = None
if custom_ca_list is not None:
if len(custom_ca_list) == 0:
+ # A trustroot cannot be generated without any CA certificates.
+ # Raise an error if this option has been specified without any
+ # corresponding certificates.
raise ConfigError("federation_custom_ca_list specified without "
"any certificate files")
|