Implement HTTPS lifecycle and reboot controls

This commit is contained in:
2026-09-13 17:24:00 +02:00
parent 737bd29f9e
commit 36e80811e8
24 changed files with 1392 additions and 75 deletions
+9
View File
@@ -61,6 +61,7 @@ serial_settings = "--serial-settings" in sys.argv
accounts = "--accounts" in sys.argv
broker = "--broker" in sys.argv
ssh_settings = "--ssh" in sys.argv
lifecycle = "--lifecycle" in sys.argv
display = "--display" in sys.argv
if display:
HEADERS["nvs_flash.h"] = '#pragma once\n#include "esp_err.h"\nesp_err_t nvs_flash_init(void);\n'
@@ -251,6 +252,14 @@ with tempfile.TemporaryDirectory(prefix="web-cookie-auth-") as directory:
*(["-DHOST_DISPLAY"] if display else []),
*(["-DHOST_BROKER"] if broker else []),
*(["-DHOST_SSH_SETTINGS"] if ssh_settings else []),
*(["-DHOST_LIFECYCLE"] if lifecycle else []),
"-I" + str(tmp), "-I" + str(ROOT / "src"), *map(str, sources), "-lcrypto",
"-o", str(tmp / "test")], check=True, timeout=30)
subprocess.run([str(tmp / "test")], check=True, timeout=20)
if lifecycle:
guard = subprocess.run(["cc", "-E", "-DCONFIG_HTTPD_QUEUE_WORK_BLOCKING=1",
"-I" + str(tmp), "-I" + str(ROOT / "src"),
str(ROOT / "src/web_lifecycle_settings.c")], stdout=subprocess.DEVNULL,
stderr=subprocess.PIPE, timeout=30)
assert guard.returncode and b"Lifecycle ACK handoff requires nonblocking" in guard.stderr
print("PASS lifecycle compile-time rejection of blocking HTTPD work submission")