From 5b5ef91d88d1f18e82c8610067aab679683da27a Mon Sep 17 00:00:00 2001 From: brevilo Date: Wed, 8 Apr 2026 16:18:26 +0200 Subject: [PATCH] Fix off-by-one error preventing the final poll to succeed (#6865) When the final poll (`_link_cert_retry` at 29) returns, the status is never checked again. So even a `valid` status goes unnoticed. It's a pre-test loop after all. Co-authored-by: Oliver Behnke --- acme.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/acme.sh b/acme.sh index 0578e1ac..d54ad470 100755 --- a/acme.sh +++ b/acme.sh @@ -5324,6 +5324,11 @@ $_authorizations_map" _link_cert_retry="$(_math $_link_cert_retry + 1)" done + # cover case where the final poll returned 'valid' + if [ -z "$Le_LinkCert" ] && _contains "$response" "\"status\":\"valid\""; then + Le_LinkCert="$(echo "$response" | _egrep_o '"certificate" *: *"[^"]*"' | cut -d '"' -f 4)" + fi + if [ -z "$Le_LinkCert" ]; then _err "Signing failed. Could not get Le_LinkCert, and stopped retrying after reaching the retry limit." _err "$response"