1
0

Add comment and simplify diff

This commit is contained in:
Andrew Morgan
2019-04-08 13:39:07 +01:00
parent 93850f0ac8
commit 669199876d
2 changed files with 4 additions and 1 deletions

View File

@@ -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 = {}

View File

@@ -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")