Commit Graph

9 Commits

Author SHA1 Message Date
Bill Richardson
0c3ba249ab Massive refactoring of external header files.
This reduces the number of exported header files to the minimum needed by
the existing userspace utilities and firmware implementations.

BUG=chromium:221544
BRANCH=none
TEST=manual, trybots
CQ-DEPEND=CL:47019,CL:47022,CL:47023

  sudo FEATURES=test emerge vboot_reference
  FEATURES=test emerge-$BOARD \
                vboot_reference \
                chromeos-cryptohome \
                chromeos-installer \
                chromeos-u-boot \
                peach-u-boot \
                depthcharge

Change-Id: I2946cc2dbaf5459a6c5eca92ca57d546498e6d85
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/47021
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2013-04-02 14:12:52 -07:00
Randall Spangler
9c9606b7a6 Add tests for rsa_utility.c
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: Ia86241f5407ba53d93d3862b29c61b510e560e92
Reviewed-on: http://gerrit.chromium.org/gerrit/6959
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-09-01 09:04:46 -07:00
Randall Spangler
cce4171545 Add more tests for rsa.c.
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: Ib1cdb139b695a648fc500ad61c58efc86c7940a9
(cherry picked from commit 5178f3ce82020e8caa287ceee47f9556c0b3bae8)
Reviewed-on: http://gerrit.chromium.org/gerrit/6860
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-08-29 15:20:11 -07:00
Gaurav Shah
5411c7a9f0 combined patch for:
http://codereview.chromium.org/1574005
http://codereview.chromium.org/1604001

Review URL: http://codereview.chromium.org/1585007
2010-03-31 10:56:49 -07:00
David Garcia
21c3f7fef7 Revert "VBoot Reference: Refactor Part 2 - Crypto Libraries"
This reverts commit e018a80a37aaa45681f45f5852f04d20aedd8b2d.

Review URL: http://codereview.chromium.org/1593002
2010-03-31 09:04:15 -07:00
Gaurav Shah
d46c347018 VBoot Reference: Refactor Part 2 - Crypto Libraries
Removing multiple top level includes - now padding.h, rsa.h and sha.h are used internally and cryptolib.h must be used instead for all modules that wish to use crypto functions.

I am trying to separate refactors involving code movement from one file to another, and the movement of files themselves into separate CLs so that it's clear what changed.

Review URL: http://codereview.chromium.org/1574005
2010-03-30 23:08:10 -07: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
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
7d122e2a47 Add a test for RSA PKCS #1 v1.5 signature verification.
This test checks that signatures with improper padding do not get accepted by the RSA signature verification implementation.

Review URL: http://codereview.chromium.org/661038
2010-02-24 16:41:32 -08:00