summary refs log tree commit diff
path: root/synapse/config/tls.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-03-04 11:54:58 +0000
committerErik Johnston <erik@matrix.org>2019-03-04 11:54:58 +0000
commitfbc047f2a5f12ee934e5ccbe7274100aa72166b5 (patch)
tree2eabc4f13032883ff61fc635d0be43292a5ad131 /synapse/config/tls.py
parentUpdate newsfile to have a full stop (diff)
parentUpdate test_typing to use HomeserverTestCase. (#4771) (diff)
downloadsynapse-fbc047f2a5f12ee934e5ccbe7274100aa72166b5.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/stop_fed_not_in_room
Diffstat (limited to 'synapse/config/tls.py')
-rw-r--r--synapse/config/tls.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/synapse/config/tls.py b/synapse/config/tls.py
index 8d5d287357..40045de7ac 100644
--- a/synapse/config/tls.py
+++ b/synapse/config/tls.py
@@ -19,6 +19,8 @@ import warnings
 from datetime import datetime
 from hashlib import sha256
 
+import six
+
 from unpaddedbase64 import encode_base64
 
 from OpenSSL import crypto
@@ -36,9 +38,11 @@ class TlsConfig(Config):
             acme_config = {}
 
         self.acme_enabled = acme_config.get("enabled", False)
-        self.acme_url = acme_config.get(
+
+        # hyperlink complains on py2 if this is not a Unicode
+        self.acme_url = six.text_type(acme_config.get(
             "url", u"https://acme-v01.api.letsencrypt.org/directory"
-        )
+        ))
         self.acme_port = acme_config.get("port", 80)
         self.acme_bind_addresses = acme_config.get("bind_addresses", ['::', '0.0.0.0'])
         self.acme_reprovision_threshold = acme_config.get("reprovision_threshold", 30)
@@ -55,7 +59,7 @@ class TlsConfig(Config):
                 )
             if not self.tls_private_key_file:
                 raise ConfigError(
-                    "tls_certificate_path must be specified if TLS-enabled listeners are "
+                    "tls_private_key_path must be specified if TLS-enabled listeners are "
                     "configured."
                 )