HTTPS force-redirect toggle breaks Caddy mid-handshake (SSL_ERROR_INTERNAL_ERROR_ALERT) #10
Loading…
Add table
Reference in a new issue
No description provided.
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?
Symptom
Fresh install of 26.4-alpha on a smoke VM, hostname
furtka, user trusted the local Caddy CA in Firefox, then clicked the "Force HTTPS" toggle in/settings. After that,https://furtka.local/fails immediately in Firefox:That's an alert coming from the server side — Caddy is sending TLS
internal_errormid-handshake, not a client-side trust issue.Scope
sudo rm /etc/caddy/furtka.d/redirect.caddyfile && sudo systemctl reload caddyrestores HTTP.Hypotheses to check
caddy validate /etc/caddy/Caddyfile+journalctl -u caddy -n 200to see the actual error body.furtka.local— maybetls internalwas configured for a specific SNI list that doesn't include the installer-chosen hostname.project_ssl_local_deferred.mdalready flagged "Hostname-change flow" as untested end-to-end.Next debug steps
journalctl -u caddy -n 200 --no-pager— the real error is here.cat /etc/caddy/Caddyfileandcat /etc/caddy/furtka.d/redirect.caddyfile— verify syntax.caddy validate --config /etc/caddy/Caddyfile— syntactic check.ls -la /var/lib/caddy/.local/share/caddy/pki/authorities/local/— CA files present and readable?ls -la /var/lib/caddy/.local/share/caddy/certificates/— was a leaf cert for the actual hostname issued?Rollback for users who get locked out
Document one of these in /settings before re-enabling the toggle after the fix lands:
sudo rm /etc/caddy/furtka.d/redirect.caddyfile && sudo systemctl reload caddy(clears redirect, HTTP comes back)/api/furtka/https/forceDELETE endpoint that does the same.Related
project_ssl_local_deferred.md— Phase 1 HTTPS opt-in, same feature.663bd74..caa8609).Verified fixed in 26.5-alpha.
Tested on a fresh install (VM
192.168.178.23):openssl s_client -connect 127.0.0.1:443 -servername furtka.localcompletes a TLS 1.3 handshake against Caddy's internal CA — wasinternal_erroralert on 26.4-alpha./var/lib/caddy/certificates/local/populated with leaf certs for bothfurtka.localandfurtka(matching the two names in the templated:443site block)./api/furtka/https/statusreturnsca_available: truewith a real fingerprint — wasfalseon 26.4-alpha because the hardcoded path didn't exist.GET /rootCA.crtreturns 200 with the properContent-Disposition— was 404 on 26.4-alpha.rootCA.crtfrom/settings, imported it into Firefox's trust store,https://furtka.local/loads with a green padlock,/settingsthen exposed the "Force HTTPS" toggle and enabling it redirected HTTP → HTTPS without any handshake error.Ships in 26.5-alpha.
Follow-up caught during the test (separate fix, not part of the hot path): the SHA-256 fingerprint overflowed the Local HTTPS card because the colon-separated hex string had no wrap opportunities — fixed locally (
e7ee169), will ride the next push.