summary refs log tree commit diff
path: root/synapse/handlers/acme.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-02-19 10:54:33 +0000
committerBrendan Abolivier <babolivier@matrix.org>2019-02-19 10:54:33 +0000
commita8626901cd384f263c8ae578466f95f0c3cceb95 (patch)
tree3d565813c48b9034dd93ddb3fda7983cecded91d /synapse/handlers/acme.py
parentUse a configuration parameter to give the domain to generate a certificate for (diff)
downloadsynapse-a8626901cd384f263c8ae578466f95f0c3cceb95.tar.xz
Fetch ACME domain into an instance member
Diffstat (limited to 'synapse/handlers/acme.py')
-rw-r--r--synapse/handlers/acme.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/synapse/handlers/acme.py b/synapse/handlers/acme.py
index f8a786a4da..813777bf18 100644
--- a/synapse/handlers/acme.py
+++ b/synapse/handlers/acme.py
@@ -56,6 +56,7 @@ class AcmeHandler(object):
     def __init__(self, hs):
         self.hs = hs
         self.reactor = hs.get_reactor()
+        self._acme_domain = hs.config.acme_domain
 
     @defer.inlineCallbacks
     def start_listening(self):
@@ -123,15 +124,15 @@ class AcmeHandler(object):
     @defer.inlineCallbacks
     def provision_certificate(self):
 
-        logger.warning("Reprovisioning %s", self.hs.config.acme_domain)
+        logger.warning("Reprovisioning %s", self._acme_domain)
 
         try:
-            yield self._issuer.issue_cert(self.hs.config.acme_domain)
+            yield self._issuer.issue_cert(self._acme_domain)
         except Exception:
             logger.exception("Fail!")
             raise
-        logger.warning("Reprovisioned %s, saving.", self.hs.config.acme_domain)
-        cert_chain = self._store.certs[self.hs.config.acme_domain]
+        logger.warning("Reprovisioned %s, saving.", self._acme_domain)
+        cert_chain = self._store.certs[self._acme_domain]
 
         try:
             with open(self.hs.config.tls_private_key_file, "wb") as private_key_file: