feat(update): fix schema-3 verify-before-parse and add replay floor, TrustStore, pin pruning, and InstallCoordinator

This commit is contained in:
faumaray committed 2026-11-25 21:04:52 +03:00
1 parent 00d7478335
commit 47736cb6ce
13 files changed
+2663 -23

No files matched your search

+8
View File
@@ -206,6 +206,14 @@ if(_has_archive)
-DCMAKE_DISABLE_FIND_PACKAGE_SQLite3=TRUE)
endif()
has_modules(_has_update Update Archive Crypto Data Functional System Text Time)
if(_has_update)
run_consumer(UpdateOnly "${install_prefix}" "UpdateOnly"
-DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_PkgConfig=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_SQLite3=TRUE)
endif()
# Foundation consumer with Core-formatting bridge and zero external packages.
has_modules(_has_foundation Math Text Time Functional Binary FunctionalCoreFormatting Memory Core)
if(_has_foundation)
+11
View File
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 4.0)
project(VoidUpdateOnlyConsumer LANGUAGES CXX)
find_package(Void CONFIG REQUIRED COMPONENTS Update)
add_executable(void_update_only_consumer main.cpp)
target_link_libraries(void_update_only_consumer PRIVATE Void::Update)
target_compile_features(void_update_only_consumer PRIVATE cxx_std_26)
enable_testing()
add_test(NAME UpdateOnlyConsumer COMMAND void_update_only_consumer)
+22
View File
@@ -0,0 +1,22 @@
#include <Void/Crypto/Crypto.hpp>
#include <Void/Update/Update.hpp>
int main()
{
auto k = Void::Crypto::Ed25519PrivateKey::generate();
if (!k.has_value()) {
return 1;
}
auto pub = k->public_key();
if (!pub.has_value()) {
return 2;
}
Void::Update::TrustStore trust;
if (!trust.bootstrap({{"k1", pub->bytes}}).has_value()) {
return 3;
}
if (!trust.snapshot().contains("k1")) {
return 4;
}
return 0;
}