Raise config error if empty ca list

This commit is contained in:
Andrew Morgan 2019-04-03 11:11:13 +01:00
parent 7c432de63e
commit 4f03528d34

View file

@ -93,6 +93,10 @@ class TlsConfig(Config):
# Read in and parse custom CA certificates # Read in and parse custom CA certificates
if self.federation_custom_ca_list is not None: 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 = [] certs = []
for ca_file in self.federation_custom_ca_list: for ca_file in self.federation_custom_ca_list:
logger.debug("Reading custom CA certificate file: %s", ca_file) logger.debug("Reading custom CA certificate file: %s", ca_file)