Skip to content

Conversation

Alexander-ARTV
Copy link

Hello, as per the description in my first commit, this is a suggestion on an implementation of an improved two pass functionality in Crypt-LE, enabling data persistence between the first -delayed pass and a second pass, now dubbed -resume.

I have not added in any error handling, as I think that is best for the author to decide what is necessary, but I can it add upon request following the general style of the project.

Also, I have not updated the version number.

This version of Crypt LE can be easily tested using a wrapper script plus a few extra files that I have collected in Crypt-LE-helper

Best regards
Alexander

It was previously not possible to reliably use the -delayed
switch and expect DNS challenge tokens to be remembered for a
second run.

This commit adds logic to save and load the needed
state - %callback_data in le.pl and select attributes in LE.PM.
In the script it is done directly. In the module it is done
using two new methods. _save_state and _load_state.
Data is saved to disk using the Storable package.

A new command line parameter, -resume, has been added to facilitate
the use of the stored data for a second pass.

Additionally, the DNS challenge tokens are now saved to disk for
easier integration with external registration methods.
Previously, this could only be done by enabling file logging and
extracting the tokens using regex.

Additionally, the OpenSSL option use_pkcs1_padding in
LE::_set_key was removed, as the use is discouraged
(https://github.com/tomato42/marvin-toolkit/blob/master/README.md)
and causes a fatal error. Removal rather than changing the method
is likely good, as we can rely on OpenSSL using the most
reasonable default.
@do-know
Copy link
Owner

do-know commented Jul 7, 2025

Thanks. will take a closer look. And thanks for correcting a typo there in the list of options :)

@raytiley
Copy link

👍 - Was just searching for a solution to this. We've been running into this with our usage where the challenges would change when using --delayed especially for dns providers that take a pit to propagate.

Any timeline for this getting reviewed / released? We rely on the packaged executable so not sure where to get that from to test it out :)

Thanks!

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.

3 participants