feat(install): sign installer archives with Ed25519 and checksums
This commit is contained in:
1 parent
9509c0691e
commit
b55aca328a
8 files changed
+122
-10
No files matched your search
+11
-1
@@ -1691,6 +1691,7 @@ struct InstallCmdOptions {
|
||||
std::optional<std::string> component_arg;
|
||||
std::optional<std::string> archive_arg;
|
||||
std::string archive_format_arg{"tar"};
|
||||
std::optional<std::string> signing_key_arg;
|
||||
bool no_cmake_export{false};
|
||||
bool no_native_export{false};
|
||||
bool bundle_dependencies{false};
|
||||
@@ -1732,6 +1733,12 @@ int execute_install_command(const InstallCmdOptions &opts) {
|
||||
if (opts.archive_arg && !opts.archive_arg->empty()) {
|
||||
iopts.archive_path = std::filesystem::path{*opts.archive_arg};
|
||||
iopts.archive_format = opts.archive_format_arg;
|
||||
if (opts.signing_key_arg) {
|
||||
iopts.signing_seed_path = std::filesystem::path{*opts.signing_key_arg};
|
||||
}
|
||||
} else if (opts.signing_key_arg) {
|
||||
std::cerr << "vbs install: --signing-key requires --archive\n";
|
||||
return 2;
|
||||
}
|
||||
|
||||
std::error_code ec;
|
||||
@@ -2874,7 +2881,10 @@ int main(int argc, char **argv) {
|
||||
install_opts.archive_arg)
|
||||
.option_default("--archive-format", "",
|
||||
"Installer archive format: tar (default), sh, zip or deb",
|
||||
install_opts.archive_format_arg, "tar");
|
||||
install_opts.archive_format_arg, "tar")
|
||||
.option("--signing-key", "",
|
||||
"Ed25519 seed file; signs the archive and writes .sha256/.sig/.pub",
|
||||
install_opts.signing_key_arg);
|
||||
add_log_flags(install_cmd);
|
||||
|
||||
auto &uninstall_cmd =
|
||||
|
||||
Reference in new issue
Block a user