diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-11-19 14:46:01 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-11-19 14:46:01 -0600 |
commit | f765c97d5a6b7c634f0783ce6b2e1d9e1da2a770 (patch) | |
tree | 80c70187001aad1ae5793000f332b58777310b0b | |
parent | 331ccebe9fe8cbae97fe0b96ba845337778d84e1 (diff) | |
download | horizon-f765c97d5a6b7c634f0783ce6b2e1d9e1da2a770.tar.gz horizon-f765c97d5a6b7c634f0783ce6b2e1d9e1da2a770.tar.bz2 horizon-f765c97d5a6b7c634f0783ce6b2e1d9e1da2a770.tar.xz horizon-f765c97d5a6b7c634f0783ce6b2e1d9e1da2a770.zip |
hscript: Fix repo key default when firmware support is enabled
-rw-r--r-- | hscript/script_v.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hscript/script_v.cc b/hscript/script_v.cc index 995b8ea..7905cfa 100644 --- a/hscript/script_v.cc +++ b/hscript/script_v.cc @@ -161,7 +161,8 @@ bool add_default_repos(std::vector<std::unique_ptr<Repository>> &repos, * The list +keys+ will be modified with the default repository signing keys * for Adélie Linux. */ -bool add_default_repo_keys(std::vector<std::unique_ptr<SigningKey>> &keys) { +bool add_default_repo_keys(std::vector<std::unique_ptr<SigningKey>> &keys, + bool firmware = false) { SigningKey *key = dynamic_cast<SigningKey *>( SigningKey::parseFromData( "/etc/apk/keys/packages@adelielinux.org.pub", 0, nullptr, nullptr) @@ -308,7 +309,11 @@ bool Horizon::Script::validate() const { /* REQ: Script.signingkey */ if(internal->repo_keys.size() == 0) { - if(!add_default_repo_keys(internal->repo_keys)) { + if(!add_default_repo_keys(internal->repo_keys +#ifdef NON_LIBRE_FIRMWARE + , internal->firmware && internal->firmware->test() +#endif + )) { return false; } } |