certificate_pem, _, _ = _do_request() missing items
The certificate_pem, _, _ = _do_request() has some items not working with the switch to v02 a ways back. Any way to easily get this back even if I have to change the code myself? I need it to install to cpanel automatically as the signed_chain.crt isn't enough on its own for the cpanel api. In particular, I need the second variable returned previously called result used in the following. Unless someone knows of a equal or better way to do this than mine. Thanks.
- code, result = _send_signed_request(CA + "/acme/new-cert", {
- "resource": "new-cert",
...
+ # download the certificate
+ certificate_pem, _, _ = _do_request(order['certificate'], err_msg="Certificate download failed")
log.info("Certificate signed!")
- return """-----BEGIN CERTIFICATE-----\n{0}\n-----END CERTIFICATE-----\n""".format(
- "\n".join(textwrap.wrap(base64.b64encode(result).decode('utf8'), 64)))
+ return certificate_pem
https://github.com/diafygi/acme-tiny/commit/bb248e00125728e6f15806d6408ebd9ac5251cbf#diff-7d802cf8b579d90e224a041b9e054757a417bf1fc394fde3ea2db37d0fba3922
Got a non-implemented test working. Implementing what I need back again is apparently easy. Looks like the only way I have available just needs the first two blocks separately saved from the signed_chain.crt and is compatible with cpanel's uapi SSL install_ssl.
Whether or not you feel like that should be provided by this script or another is up to you. At the very least this info will be archived here.