matrey / acme-tiny-auto

Bash wrapper for acme_tiny.py. It helps you procure Let's Encrypt or Buypass certificates in a few commands, renew them automatically, and it should not break your server if anything fails during renewal.
MIT License
3 stars 0 forks source link

Differentiate the account key by provider (+ email for Buypass) #10

Open matrey opened 3 years ago

matrey commented 3 years ago
+ python /acme/acme_tiny.py --account-key /acme/account.key-tmp --csr /acme/domains/xxx/domain.csr --acme-dir /acme/shared/.well-known/acme-challenge/ --contact mailto:xxx --directory-url https://api.buypass.com/acme/directory
Parsing account key...
Parsing CSR...
Found domains: xxx
Getting directory...
Directory found!
Registering account...
Already registered!
Updated contact details:
mailto:xxx
Creating new order...
Order created!
Verifying xxx...
Traceback (most recent call last):
  File "/acme/acme_tiny.py", line 201, in <module>
    main(sys.argv[1:])
  File "/acme/acme_tiny.py", line 197, in main
    signed_crt = get_crt(args.account_key, args.csr, args.acme_dir, log=LOGGER, CA=args.ca, disable_check=args.disable_check, directory_url=args.directory_url, contact=args.contact)
  File "/acme/acme_tiny.py", line 149, in get_crt
    _send_signed_request(challenge['url'], {}, "Error submitting challenges: {0}".format(domain))
  File "/acme/acme_tiny.py", line 60, in _send_signed_request
    return _do_request(url, data=data.encode('utf8'), err_msg=err_msg, depth=depth)
  File "/acme/acme_tiny.py", line 46, in _do_request
    raise ValueError("{0}:\nUrl: {1}\nData: {2}\nResponse Code: {3}\nResponse: {4}".format(err_msg, url, data, code, resp_data))
ValueError: Error submitting challenges: xxx:
Url: https://api.buypass.com/acme-v02/authz/xxx/1
Data: {"protected": "xxx", "payload": "e30", "signature": "xxx"}
Response Code: 400
Response: {u'message': u'MALFORMED_BAD_REQUEST', u'code': 400, u'type': u'urn:ietf:params:acme:error:malformed', u'detail': u'Unable to process challenge, authorization is not pending', u'details': u'HTTP 400 Bad Request'}
matrey commented 3 years ago

this was a setup initially using let's encrypt, then switched to buypass removing the previous account key seems to have done the job