9 Commits

Author SHA1 Message Date
Michael Stapelberg
ba6a8936f4 packer: do not check for HTTP→HTTPS redirect
This check was broken: it tried to construct a http URL
by changing the updateBaseUrl schema instead of constructing
such a URL based on the configured HTTPPort.

I also don’t think this check is useful:
HTTPS will be used for updates regardless of the check.
Even if an attacker intercepted HTTP traffic and removed the redirect,
that has no bearing on the update, so why bother checking.

One thing the check (implicitly) did is the required fallback
on initial installation when --insecure is specified.
We now solve that by falling back from HTTPS to HTTP explicitly
(only when --insecure is specified, of course).

related to https://github.com/gokrazy/tools/pull/94
2025-12-09 17:11:22 +01:00
Michael Stapelberg
0daf1b1ae4 packer: stop using tlsflag global state 2025-12-08 21:32:59 +01:00
Michael Stapelberg
8320e69ccc packer: move error check closer to error assignment 2025-12-08 20:58:14 +01:00
Michael Stapelberg
0a82ebcb52 remove stale comment
git commit 87444dca50 accidentally
removed the code (partuuid = 0), but not the comment.
2025-12-08 20:57:45 +01:00
Michael Stapelberg
6ae03bee7a packer: move countingWriter to packerwrite.go 2025-12-06 21:32:21 +01:00
Michael Stapelberg
cfba731eae packer: move partitionPath to packerwrite.go 2025-12-06 21:23:36 +01:00
Michael Stapelberg
bd1faa7647 packer: move overwrite{File,Device} to packerwrite.go 2025-12-06 21:21:00 +01:00
Michael Stapelberg
3def6ed054 packer: move printHowToInteract to packerwrite.go 2025-12-06 21:17:15 +01:00
Michael Stapelberg
df53492c98 packer: move write into packerwrite.go 2025-12-06 21:14:44 +01:00