1
0
Fork 0

#56 prototyped manual-auth-hook and different preferred-challenges support

This commit is contained in:
Dylan Vos 2024-11-09 14:10:01 +01:00 committed by GitHub
parent 1a6853487e
commit 8671a80b74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -285,6 +285,8 @@ class Certbot:
self.eab_hmac_key = self.set_eab_hmac_key(env["certbot"]["eab_hmac_key"])
self.freeze_issue = {}
self.retry_count = env["certbot"]["retry_count"]
self.certbot_preferred_challenges = env["certbot"]["preferred_challenges"] or "http"
self.certbot_manual_auth_hook = env["certbot"]["manual_auth_hook"] or False
@staticmethod
def set_acme_server(acme_server):
@ -337,9 +339,7 @@ class Certbot:
renew_certs.append(host_arg)
certbot_certonly = ('/usr/bin/certbot certonly {acme_server}'
' --standalone'
' --preferred-challenges http'
' --http-01-port 2080'
' --preferred-challenges {challenge}'
' --agree-tos'
' --issuance-timeout 90'
' --no-eff-email'
@ -350,9 +350,18 @@ class Certbot:
eab_hmac_key=self.eab_hmac_key,
certs=' '.join(request_certs),
email=self.email,
challenge=self.certbot_preferred_challenges,
acme_server=self.acme_server)
)
if 'http' in self.certbot_preferred_challenges:
certbot_certonly += (' --http-01-port 2080'
' --standalone'
)
if self.certbot_manual_auth_hook != False:
certbot_certonly += ' --manual --manual-auth-hook \'{hook}\''.format(hook=self.certbot_manual_auth_hook)
ret_reload = False
return_code_issue = 0
return_code_renew = 0