tls-sni-01 with the manual plugin (#4636)

* Add TLS-SNI-01 support to Manual plugin

* Add environment variable CERTBOT_SNI_DOMAIN for manual-auth-hook

* Make AuthenticatorTest inherit from TempDirTestCase

* Add test_get_z_domain()

* Document CERTBOT_SNI_DOMAIN in docs/using.rst
This commit is contained in:
Alexandre de Verteuil
2017-06-19 09:39:14 -07:00
committed by Brad Warren
parent 811d436d5a
commit ed717d6bc4
5 changed files with 175 additions and 37 deletions
+4
View File
@@ -241,6 +241,10 @@ class TLSSNI01(object):
return os.path.join(self.configurator.config.work_dir,
achall.chall.encode("token") + '.pem')
def get_z_domain(self, achall):
"""Returns z_domain (SNI) name for the challenge."""
return achall.response(achall.account_key).z_domain.decode("utf-8")
def _setup_challenge_cert(self, achall, cert_key=None):
"""Generate and write out challenge certificate."""