Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

certificate_pem, _, _ = _do_request() missing items #268

Open
Xavron opened this issue Aug 22, 2021 · 1 comment
Open

certificate_pem, _, _ = _do_request() missing items #268

Xavron opened this issue Aug 22, 2021 · 1 comment

Comments

@Xavron
Copy link

Xavron commented Aug 22, 2021

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

bb248e0#diff-7d802cf8b579d90e224a041b9e054757a417bf1fc394fde3ea2db37d0fba3922

@Xavron
Copy link
Author

Xavron commented Aug 31, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant