diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2020-02-13 14:58:34 +0000 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2020-02-13 14:58:34 +0000 |
commit | 12bbcc255a77d76be13d8b8f142e9d329e91d520 (patch) | |
tree | 0939d3764b0e461ef377ff6ed688af06979982f7 /synapse | |
parent | Add mention and warning about ACME v1 deprecation to the Synapse config (diff) | |
download | synapse-12bbcc255a77d76be13d8b8f142e9d329e91d520.tar.xz |
Add a comprehensive error when failing to register for an ACME account
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/acme.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/synapse/handlers/acme.py b/synapse/handlers/acme.py index 46ac73106d..cfb5a4f39b 100644 --- a/synapse/handlers/acme.py +++ b/synapse/handlers/acme.py @@ -22,6 +22,7 @@ from twisted.web import server, static from twisted.web.resource import Resource from synapse.app import check_bind_error +from synapse.config import ConfigError logger = logging.getLogger(__name__) @@ -71,7 +72,18 @@ class AcmeHandler(object): # want it to control where we save the certificates, we have to reach in # and trigger the registration machinery ourselves. self._issuer._registered = False - yield self._issuer._ensure_registered() + + try: + yield self._issuer._ensure_registered() + except Exception: + raise ConfigError("Failed to register with the ACME provider. This is likely" + " happening because the install is new, and ACME v1 has" + " been deprecated by Let's Encrypt and is disabled for" + " installs set up after November 2019. At the moment," + " Synapse doesn't support ACME v2. For more info and" + " alternative solution, check out" + " https://github.com/matrix-org/synapse/blob/master/docs/" + "ACME.md#deprecation-of-acme-v1") @defer.inlineCallbacks def provision_certificate(self): |