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

Allow working with LetsEncrypt Pebble and custom base URI #66

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

rafaelpivato
Copy link

This pull-request contains minimal code to allow setting custom base URL for a custom directory. That should help testing locally with Pebble and also possibly use with other ACME servers like @zerossl (https://zerossl.com/documentation/acme/).

It now accepts an option baseUri as part of the client initialization, which will override any default URL from LetsEncrypt. That should point to an ACME directory resource. One minor fix had to be made to properly fetch the directory URL pointed by the client, instead of a hardcoded /directory one.

One extra detail was that getting the certificate from Pebble required to first trigger the finalize URL to then poll the order for a certificate. I tried to mimic as much as possible the polling code from validate method.

Last but not less, instead of trying to work only with order ID, guessing the base URL, the code had to preserve and reuse the order URL. That's because the order URL from Pebble has not the same prefix than the new-order URL.

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

Successfully merging this pull request may close these issues.

None yet

1 participant