From 669199876de27c5667a6eecba035b8a76fc2b0e6 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Mon, 8 Apr 2019 13:39:07 +0100 Subject: [PATCH] Add comment and simplify diff --- synapse/config/server.py | 2 +- synapse/config/tls.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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")