feat(package): authenticate private binary-variant downloads
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 5s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 23s

This commit is contained in:
faumaray committed 2026-12-03 23:03:38 +03:00
1 parent 40fef50a6f
commit 4e5bdab8cd
10 files changed
+140 -8

No files matched your search

+1
View File
@@ -70,6 +70,7 @@ select_compatible_signed_binary(const BinaryCompatibilityKey &key,
struct BinaryFetchOptions {
std::filesystem::path cache_dir;
std::vector<std::string> trusted_public_keys;
std::string bearer_token; // Optional registry token for private binary artifacts.
};
// Selects a compatible binary variant (verifying its trusted signature when keys are supplied),
@@ -80,7 +80,7 @@ fetch_binary_variants(std::string_view registry_url, std::string_view package_na
// rejecting any content whose SHA-256 differs from `expected_sha256` (verified before writing).
[[nodiscard]] Void::Result::Result<std::filesystem::path, Void::Result::Error>
download_binary_artifact(std::string_view url, std::string_view expected_sha256,
const std::filesystem::path &dest_file);
const std::filesystem::path &dest_file, const RegistryAuth &auth = {});
// Publishes a verified deterministic archive via PUT /api/v1/packages/<name>/<version>.
[[nodiscard]] Void::Result::Result<PublishReceipt, Void::Result::Error>