Files
headscale/hscontrol
Andrei Korviakov ebe18cebff hscontrol: keep the ACME error body readable in acmeLogger
acmeLogger drained and closed the body of every ACME error response before
handing the response back to golang.org/x/crypto/acme. The client parses that
body to classify errors, so badNonce was no longer recognised: isBadNonce
returned false, clearNonces was never called and Client.post treated the 400 as
non-retriable.

One badNonce reply therefore stops certificate renewal for good. autocert
retries every 30-60 minutes, each attempt reuses a nonce stored from the
previous failed response, that nonce has already expired, and the loop repeats
until the process is restarted or the certificate expires.

Restore the body with a fresh reader after logging it.

(cherry picked from commit 7472e98f6c)
2026-09-23 21:19:22 +02:00
..
2026-09-23 21:19:22 +02:00
2026-05-19 09:55:22 +02:00