Skip to content

Commit

Permalink
Enable HTTPS for ACME challenge
Browse files Browse the repository at this point in the history
  • Loading branch information
aeris committed Dec 12, 2015
1 parent 81e357f commit 5eb7037
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion acme_tiny.py
Expand Up @@ -112,7 +112,7 @@ def _send_signed_request(url, payload):
wellknown_file.write(keyauthorization) wellknown_file.write(keyauthorization)


# check that the file is in place # check that the file is in place
wellknown_url = "http://{0}/.well-known/acme-challenge/{1}".format(domain, token) wellknown_url = "https://{0}/.well-known/acme-challenge/{1}".format(domain, token)
try: try:
resp = urlopen(wellknown_url) resp = urlopen(wellknown_url)
resp_data = resp.read().decode('utf8').strip() resp_data = resp.read().decode('utf8').strip()
Expand All @@ -125,6 +125,7 @@ def _send_signed_request(url, payload):
# notify challenge are met # notify challenge are met
code, result = _send_signed_request(challenge['uri'], { code, result = _send_signed_request(challenge['uri'], {
"resource": "challenge", "resource": "challenge",
"tls": True,
"keyAuthorization": keyauthorization, "keyAuthorization": keyauthorization,
}) })
if code != 202: if code != 202:
Expand Down

0 comments on commit 5eb7037

Please sign in to comment.