Add HTTPS identity rotation support
This commit is contained in:
@@ -17,6 +17,7 @@ HEADERS = {
|
||||
#define ESP_ERR_INVALID_VERSION 4
|
||||
#define ESP_ERR_INVALID_RESPONSE 5
|
||||
#define ESP_ERR_NO_MEM 6
|
||||
#define ESP_ERR_TIMEOUT 7
|
||||
""",
|
||||
"esp_mac.h": """#pragma once
|
||||
#include <stdint.h>
|
||||
@@ -26,6 +27,7 @@ HEADERS = {
|
||||
""",
|
||||
"freertos/FreeRTOS.h": """#pragma once
|
||||
#define portMAX_DELAY 0xffffffffU
|
||||
#define pdTRUE 1
|
||||
""",
|
||||
"freertos/semphr.h": """#pragma once
|
||||
typedef void *SemaphoreHandle_t;
|
||||
@@ -69,7 +71,8 @@ with tempfile.TemporaryDirectory(prefix="web-security-") as directory:
|
||||
assert set(re.findall(r" T (web_security_\w+)$", symbols, re.MULTILINE)) == {
|
||||
"web_security_init", "web_security_copy_tls_material",
|
||||
"web_security_get_certificate_metadata", "web_security_rotate_certificate",
|
||||
"web_security_reset_all",
|
||||
"web_security_reset_all", "web_security_get_identity_snapshot",
|
||||
"web_security_reserve_identity", "web_security_replace_reserved", "web_security_release_identity",
|
||||
}
|
||||
header = (ROOT / "src/web_security.h").read_text()
|
||||
assert "web_security_credentials_t" not in header
|
||||
@@ -78,8 +81,8 @@ with tempfile.TemporaryDirectory(prefix="web-security-") as directory:
|
||||
console = (ROOT / "src/web_console.c").read_text()
|
||||
for forbidden in ('"credentials"', "web credentials", "user_database_sync_legacy", "synchronize_migrated", "Password:"):
|
||||
assert forbidden not in console, forbidden
|
||||
assert "web_security_reset_all()" in console
|
||||
assert "web_server_replace_identity(0, 0, reset, &committed)" in console
|
||||
assert set(re.findall(r"\b(user_database_\w+)\s*\(", console)) == {
|
||||
"user_database_get_snapshot",
|
||||
}
|
||||
print("PASS exact five-function API and legacy credential/console DB-mutation absence")
|
||||
print("PASS exact public/owner API and legacy credential/console DB-mutation absence")
|
||||
|
||||
Reference in New Issue
Block a user