summaryrefslogtreecommitdiffstats
path: root/acme_dns_tiny.py
diff options
context:
space:
mode:
Diffstat (limited to 'acme_dns_tiny.py')
-rw-r--r--acme_dns_tiny.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/acme_dns_tiny.py b/acme_dns_tiny.py
index 4903c63..51252e2 100644
--- a/acme_dns_tiny.py
+++ b/acme_dns_tiny.py
@@ -9,7 +9,7 @@ please read through it. It's about 326 lines, 225 SLOC with no line
exceeding 80cols.
Usage:
- acme_dns_tiny.py [--contact=MAIL]... [--quiet] [--verbose]
+ acme_dns_tiny.py [--quiet] [--verbose]
[--acme-directory=URL] [--ttl=SECONDS]
[--separator=STR]
(--account-key=PATH) (--csr=PATH) (--script=PATH)
@@ -22,7 +22,6 @@ Options:
--quiet suppress output except for errors
--verbose show all debug information on stderr
--acme-directory=URL where to make acme request, default is Let's Encrypt
- --contact=MAIL create/update contact info (ex "mailto:x@example.com")
--ttl=SECONDS time before (re)try self check
--separator=STR list all chains joined by STR if specified
--script=PATH script to run to update the DNS server record
@@ -40,7 +39,6 @@ Example:
| path/to/ \\
| --account-key=./account.key \\
| --csr=./domain.csr \\
-| --contact=contact@domain \\
| --ttl=300 \\
| --script=./update-dns-record > signed.crt
@@ -221,14 +219,13 @@ class ACME:
return collections.namedtuple('sreq', ['code', 'headers', 'map',
'text'])(req.status_code, req.headers, jmap, req.text)
- def register_account(self, *, contacts=None):
+ def register_account(self):
log.info('Register/Login ACME Account.')
srv_terms = self.directory.get('meta', {}).get('termsOfService', '')
if srv_terms:
log.warning('Terms of service auto agreed: %s', srv_terms)
account_request = {
**dict({'termsOfServiceAgreed': True} if srv_terms else {}),
- **dict({'contact': contacts} if contacts else {}),
}
sreq = self.sreq(self.directory['newAccount'], account_request)
self.jws_header['kid'] = kid = sreq.headers['Location']
@@ -238,9 +235,6 @@ class ACME:
elif sreq.code == 200:
log.debug(' - Account is already registered: "%s"', kid)
sreq = self.sreq(self.jws_header['kid'], {})
- if contacts and (set(contacts) != set(sreq.map['contact'])):
- self.sreq(self.jws_header["kid"], account_request)
- log.info(' - Account updated with latest contact information.')
def new_order(self, *, domains=None):
log.info('Request a new ACME order.')
@@ -315,7 +309,6 @@ def get_crt(args):
domains = extract_domains_from_csr(args['--csr'])
acme = ACME(account_key_path=args['--account-key'])
acme.init_sreqs(args['--acme-directory'] or ACME_DEFAULT_DIRECTORY)
- acme.register_account(contacts=args['--contact'])
order, order_location = acme.new_order(domains=domains)
log.info('Completing each each authorization challenge')