Commit Graph

7 Commits

Author SHA1 Message Date
Gaurav Shah
4f39386902 Add a command line string field to verified boot kernel config image.
Also some cleanup of duplicated code.

BUG=670
TEST=Existing image verification tests still pass.

Review URL: http://codereview.chromium.org/874006
2010-03-12 18:13:24 -08:00
Gaurav Shah
259de40640 VBoot Reference: Fix many memory leaks.
Fix memory leaks found using Valgrind, adds sanity checking to RSAPublicKey parsing code to prevent crazy behavior.

Review URL: http://codereview.chromium.org/858008
2010-03-12 17:42:03 -08:00
Gaurav Shah
456678b0c4 Vboot Reference: Make length types explicitly sized.
Review URL: http://codereview.chromium.org/744002
2010-03-10 18:38:45 -08:00
Gaurav Shah
80d129b89d Vboot Reference: Kernel Boot signing utility.
Fixes a unallocated memory bug in ReadKernelImage(). Some renaming of variables for consistency.

Review URL: http://codereview.chromium.org/669014
2010-03-03 17:58:43 -08:00
Gaurav Shah
f5564fa98c Vboot Reference: Refactor Code.
This CL does the following:
1) It adds a SignatureBuf function which uses the OpenSSL library to generate RSA signature. This is more robust than the previous way of invoking the command line "openssl" utility and capturing its output. No more unnecessary temporary files for signature operations.
2) It adds functions that allow direct manipulation of binary verified Firmware and Kernel Image blobs in memory.
3) It changes the structure field members for FirmwareImage to make it consistent with KernelImage. Now it's clearer which key is used when.
4) Minor bug fixes and slightly improved API for dealing verified boot firmware and kernel images.
5) Renames the RSA_verify function to prevent conflicts with OpenSSL since it's linked into the firmware utility binary.

Review URL: http://codereview.chromium.org/661353
2010-03-02 15:40:01 -08:00
Gaurav Shah
cae5fa613a Refactor siglen_map[] to store key size in bytes instead of 32-bit words.
Review URL: http://codereview.chromium.org/660261
2010-02-28 20:02:29 -08:00
Gaurav Shah
f67bcaa9a6 Vboot Reference: Add functions to verify signed kernel images.
BUG=670
TEST=Adds kernel_image_test which tests the new functions.

The kernel image verification pretty much exactly mirror the already existing firmware image verification functions except with a few different/additional fields in a signed kernel image. The firmware signing key is the root key equivalent for kernel images.

This CL also moves the image verification tests to a different script. There's some additional cleanup of the code that I will be submitting separately after this and another pending patches get LGTMed and land.

Review URL: http://codereview.chromium.org/660161
2010-02-28 19:18:24 -08:00