diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-06-13 19:12:19 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-06-13 19:12:19 -0500 |
commit | 0c6decad96afebf359e61a19afd2b5859e5bdb20 (patch) | |
tree | 8a6bd18431670204a07bee0471401b9a71c56b52 | |
parent | 0e8d8137a1ba73324e2fc4b7d786b907a72b39cb (diff) | |
download | horizon-0c6decad96afebf359e61a19afd2b5859e5bdb20.tar.gz horizon-0c6decad96afebf359e61a19afd2b5859e5bdb20.tar.bz2 horizon-0c6decad96afebf359e61a19afd2b5859e5bdb20.tar.xz horizon-0c6decad96afebf359e61a19afd2b5859e5bdb20.zip |
hscript: Validate and execute the bootloader key, if provided
-rw-r--r-- | hscript/script_e.cc | 4 | ||||
-rw-r--r-- | hscript/script_v.cc | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/hscript/script_e.cc b/hscript/script_e.cc index a58338e..5917b19 100644 --- a/hscript/script_e.cc +++ b/hscript/script_e.cc @@ -659,6 +659,10 @@ bool Script::execute() const { EXECUTE_OR_FAIL("svcenable", svc) } + if(internal->boot) { + EXECUTE_OR_FAIL("bootloader", internal->boot) + } + output_step_end("post-metadata"); return true; } diff --git a/hscript/script_v.cc b/hscript/script_v.cc index 173bb50..542e9d3 100644 --- a/hscript/script_v.cc +++ b/hscript/script_v.cc @@ -336,6 +336,8 @@ bool Horizon::Script::validate() const { failures += validate_one_account(acct.first, detail); } + if(internal->boot && !internal->boot->validate()) failures++; + #define VALIDATE_OR_SKIP(obj) \ if(!obj->validate()) {\ failures++;\ |