summary refs log tree commit diff
path: root/synapse/config/tls.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-09-02 10:48:05 +0100
committerMark Haines <mark.haines@matrix.org>2014-09-02 10:49:11 +0100
commitd45f89c95b0f61c6b850f73807e9b264796e08a2 (patch)
tree8e30d4bdac4c9c8b4627087a807af8def37f6841 /synapse/config/tls.py
parentYet more bullet points on various sections. (diff)
downloadsynapse-d45f89c95b0f61c6b850f73807e9b264796e08a2.tar.xz
More helpful error messages for missing config
Diffstat (limited to '')
-rw-r--r--synapse/config/tls.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/config/tls.py b/synapse/config/tls.py
index 005fc1d16e..e78ad32e84 100644
--- a/synapse/config/tls.py
+++ b/synapse/config/tls.py
@@ -31,7 +31,9 @@ class TlsConfig(Config):
         self.tls_private_key = self.read_tls_private_key(
             args.tls_private_key_path
         )
-        self.tls_dh_params_path = self.abspath(args.tls_dh_params_path)
+        self.tls_dh_params_path = self.check_path(
+            args.tls_dh_params_path, "tls_dh_params"
+        )
 
     @classmethod
     def add_arguments(cls, parser):
@@ -45,11 +47,11 @@ class TlsConfig(Config):
                                help="PEM dh parameters for ephemeral keys")
 
     def read_tls_certificate(self, cert_path):
-        cert_pem = self.read_file(cert_path)
+        cert_pem = self.read_file(cert_path, "tls_certificate")
         return crypto.load_certificate(crypto.FILETYPE_PEM, cert_pem)
 
     def read_tls_private_key(self, private_key_path):
-        private_key_pem = self.read_file(private_key_path)
+        private_key_pem = self.read_file(private_key_path, "tls_private_key")
         return crypto.load_privatekey(crypto.FILETYPE_PEM, private_key_pem)
 
     @classmethod