mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-11 22:30:44 +01:00
[PR #728] [CLOSED] Don't assume order status to be valid, retry if needed #910
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dehydrated-io/dehydrated/pull/728
Author: @Rogdham
Created: 4/1/2020
Status: ❌ Closed
Base:
master← Head:order_status_retry📝 Commits (1)
d4aeec2Don't assume order status to be valid📊 Changes
1 file changed (+23 additions, -3 deletions)
View changed files
📝
dehydrated(+23 -3)📄 Description
Fixes #673. Replaces & closes #639.
The issue is well described by @alexzorin in #673: the status of the orders can be different from
valid, in which case we should retry fetching the certificate.Per https://tools.ietf.org/html/rfc8555#section-7.1.3
To get the certificate, we need to call the order URL. It is not 100% clear in the RFC where to find that URL, but the consensus seems to be the
Locationheader when posting a new order:So this is what I am doing here.
Unfortunately, it seems to be difficult to get both the response and the response header of the new order request, due to bash / the way the code is organised (we would need to store in two separate variables
stdoutandfd 4, and that seems rather difficult).So I am doing two requests instead of one when creating the order:
Locationheader;Feel free to offer better alternatives!
Between retries, I am waiting 2 seconds. For comparison:
Finally, I did not change the way things are handled in ACMEv1, I'm not sure if it is worth looking into.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.