summaryrefslogtreecommitdiff
path: root/tests/futility/test_sign_kernel.sh
Commit message (Collapse)AuthorAgeFilesLines
* Provert "futility: Make --debug a global option"Bill Richardson2015-03-121-12/+12
| | | | | | | | | | | | | | | | This reverts commit d90b07bd4daa0c1cff7d78b733ef2bb759cc6e5a, which reverted d7e1e4f0befdda52ad48e5a8eb5fc49dbee40247, which didn't actually have anything wrong with it. BUG=chromium:466433 BRANCH=one TEST=None Change-Id: I68a60c38eba1fce1c9332601a57ea8fee72139a3 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/259650 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
* Revert "futility: Make --debug a global option"Prathmesh Prabhu2015-03-121-12/+12
| | | | | | | | | | | | This reverts commit d7e1e4f0befdda52ad48e5a8eb5fc49dbee40247. BUG=chromium:466433 TEST=None. Change-Id: Ia1b300e2dbccddbbae9e831709bc49eb53a5feb8 Reviewed-on: https://chromium-review.googlesource.com/259365 Reviewed-by: David James <davidjames@chromium.org> Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
* futility: Make --debug a global optionBill Richardson2015-03-111-12/+12
| | | | | | | | | | | | | | | Some commands look for a --debug option, others don't. The feature is implemented globally, so let's parse it as a global option. BUG=none BRANCH=none TEST=make runtests Change-Id: I3b169e4a1b93443786913276651113d1c915a834 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/258500 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* futility: Don't copy the entire kernel partition just to sign a blobBill Richardson2014-12-041-0/+23
| | | | | | | | | | | | | | | | | | When re-signing a kernel partition and writing the result into a new file, make sure we only emit the vblock and kernel blob instead of creating a new file that's the size of the entire partition. Also add a test for that. BUG=chromium:418647 BRANCH=none TEST=make runtests Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: I2c42aec6816e7e7abbeed360089c9b51fdcfe786 Reviewed-on: https://chromium-review.googlesource.com/233039 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* futility: return the correct size of kernel blob within partitionBill Richardson2014-12-041-41/+158
| | | | | | | | | | | | | | | | | When modifying a kernel partition in-place, make sure we only sign enough bytes to cover the kernel blob, not the entire partition. Also added a test for that case. BUG=chromium:418647 BRANCH=none TEST=make runtests Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: Id89ff3845fe5178ee13f431d99868821fcad3248 Reviewed-on: https://chromium-review.googlesource.com/233038 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* futility: rolled back vbutil_kernel changeBill Richardson2014-10-021-70/+33
| | | | | | | | | | | | | | | | | | | | | When disabling verity with make_dev_ssh.sh, a bug in vbutil_kernel caused the re-signed kernel size to be the entire kernel partition instead of just the necessary bits. Until we can improve the test coverage, I'm rolling back the changes that introduced this bug. BUG=chromium:418647 BRANCH=ToT TEST=manual Created a new test image with these changes. You can install it and disable dm-verity and it works (although there seems to be an unrelated browser startup issue on ToT). Change-Id: I48e8427b05e191c9894c42056429a79d57bfc78d Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/220935 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* futility: show vs verifyBill Richardson2014-09-271-0/+15
| | | | | | | | | | | | | | | | This adds a --strict mode to the show command, which requires that all signatures be valid in order to exit cleanly. It also creates a "verify" command, which is really just an alias for "show --strict". BUG=none BRANCH=ToT TEST=make runtests Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: I1fed7db7fe7128191bcab0c615706ef4fe2709f5 Reviewed-on: https://chromium-review.googlesource.com/219732 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* futility: Add support for [re]signing kernel partitionsBill Richardson2014-09-271-38/+60
| | | | | | | | | | | | | | BUG=none BRANCH=ToT TEST=make runtests This also modifies the tests to compare the futility sign command results against the vbutil_kernel results. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: Ibc659f134cc83982e3f0c0bcc108cc0eddbe228e Reviewed-on: https://chromium-review.googlesource.com/219730 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* futility: implement vbutil_kernel using buffers, not filesBill Richardson2014-09-251-0/+168
The original vbutil_kernel command used file read and write to make changes. Futility prefers to use memory-mapped files. This rewrites cmd_vbutil_kernel.c to use that scheme. BUG=none BRANCH=ToT TEST=make runtests The original cmd_vbutil_kernel.c is renamed, and a test written to ensure that the refactored version produces identical results. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: Ic6c3e12429a5dcb271f8136a9edac70807d66120 Reviewed-on: https://chromium-review.googlesource.com/219647 Reviewed-by: Randall Spangler <rspangler@chromium.org>