summaryrefslogtreecommitdiffstats
path: root/acmens.py
diff options
context:
space:
mode:
authorsiddharth <s@ricketyspace.net>2021-06-26 13:46:13 -0400
committersiddharth <s@ricketyspace.net>2021-06-26 13:46:13 -0400
commit2db49b2ff63346290651a8919c7fda21631b56cd (patch)
tree916683debc04aa74837f90566e6db2f23738f30a /acmens.py
parent208cb4017f20cd889997bdfd0bb319eab44ca6fe (diff)
acmens.py: update `sign_csr`
Send the "you can remove acme resource" message to stderr after completing a challenge instead of sending it after completing all challenges. The message is also challenge specific now.
Diffstat (limited to 'acmens.py')
-rw-r--r--acmens.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/acmens.py b/acmens.py
index eb0ec9a..39618fb 100644
--- a/acmens.py
+++ b/acmens.py
@@ -25,7 +25,7 @@ from urllib.request import urlopen
from urllib.error import HTTPError
-__version__ = "0.1.5"
+__version__ = "0.1.6-dev0"
CA_PRD = "https://acme-v02.api.letsencrypt.org"
CA_STG = "https://acme-staging-v02.api.letsencrypt.org"
@@ -183,10 +183,10 @@ _acme-challenge IN TXT ( \"{keyauth}\" )
domain=domain, keyauth=dns_payload
)
)
+ final_msg = "You can remove the _acme-challenge DNS TXT record now."
else:
# Challenge response for http server.
response_uri = ".well-known/acme-challenge/{0}".format(challenge["token"])
-
sys.stderr.write(
"""\
Please update your server to serve the following file at this URL:
@@ -204,6 +204,7 @@ Notes:
domain=domain, uri=response_uri, token=keyauthorization
)
)
+ final_msg = "You can remove the acme-challenge file from your webserver now."
stdout = sys.stdout
sys.stdout = sys.stderr
@@ -236,6 +237,7 @@ Notes:
"Challenge did not pass for {0}: {1}".format(domain, chl_verification)
)
sys.stderr.write("{} verified!\n".format(domain))
+ sys.stderr.write("{}\n".format(final_msg))
def _agree_to(terms):
@@ -420,9 +422,6 @@ def sign_csr(ca_url, account_key, csr, email=None, challenge_type="http"):
)
sys.stderr.write("Received certificate!\n")
- sys.stderr.write(
- "You can remove the acme-challenge file from your webserver now.\n"
- )
return signed_pem