Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fetch ACME domain into an instance member
Browse files Browse the repository at this point in the history
  • Loading branch information
babolivier committed Feb 19, 2019
1 parent 45bb55c commit a862690
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions synapse/handlers/acme.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -123,15 +124,15 @@ def start_listening(self):
@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:
Expand Down

0 comments on commit a862690

Please sign in to comment.