a063a43ad776c9831051e62565c0136ce36d0b09 |
|
05-Nov-2014 |
Randall Spangler <rspangler@chromium.org> |
vboot2: pass const work buffers, and clarify min_offset output When a work buffer is passed to a function, and duplicated inside that function, allocations made against the duplicate are automatically freed when the duplicate goes out of scope. Make that explicit in the comments. And pass in const struct workbuf * instead of struct workbuf *, to make it clear that the passed-in work buffer pointer is not being altered by the function. Also, comment that the value of min_offset becomes undefined if vb2_verify_common_member() or vb2_verify_common_subobject() fails. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: Icc6010e6ef786f78cd2176a59d4d0e6e14905a11 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/227524 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
/external/vboot_reference/firmware/2lib/2rsa.c
|
c8c2f023a4914a498c11b855210ef05d4e035d41 |
|
23-Oct-2014 |
Randall Spangler <rspangler@chromium.org> |
vboot2: use enum signature algorithm This changes the internals of vboot2 to use the enumerated type for signature algorithm. The conversion from crypto algorithm is done only when unpacking the key. This is preparation for the vboot2 data types, which separate signature and hash algorithms into their own fields. There is no external change in the calling API to vboot, and no change to the external data structures. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I2e176d186d88cc7541644e001e720b4aee456be0 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/225209
/external/vboot_reference/firmware/2lib/2rsa.c
|
4eef812d68f64cc501d795131d95f8a2f27223b1 |
|
23-Oct-2014 |
Randall Spangler <rspangler@chromium.org> |
vboot2: use enum hash algorithm This changes the internals of vboot2 to use the enumerated type for hash algorithm. The conversion from crypto algorithm is done only when unpacking the key (and ok, in checking the rsa padding, but that goes away in the next change). This is preparation for the vboot2 data types, which separate signature and hash algorithms into their own fields. There is no external change in the calling API to vboot, and no change to the external data structures. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I9c6de08d742dab941beb806fbd2bfc1e11c01e2c Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/225208 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
/external/vboot_reference/firmware/2lib/2rsa.c
|
9504754fee346569b4cdcaae9f54fa65cf3005d9 |
|
18-Oct-2014 |
Randall Spangler <rspangler@chromium.org> |
vboot2: move verify digest to 2common This removes code duplicated between 2common.c and 2rsa.c. This is in preparation for adding new unsigned hash algorithms. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make -j runtests Change-Id: Ic9c542ae14d3b7f786129c1d52f8963847a94fb8 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/224780 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
/external/vboot_reference/firmware/2lib/2rsa.c
|
6d03b527fe0107c3bb71d0bbaf6236fe980b0704 |
|
17-Oct-2014 |
Randall Spangler <rspangler@chromium.org> |
vboot2: move vb2_safe_memcmp() from rsa to common This will be needed by other algorithms, so should not live inside the rsa module. Also added explicit unit tests for it. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I92c8c6484964a93d755ac2ee93b57511794540e9 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/224111 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
/external/vboot_reference/firmware/2lib/2rsa.c
|
c6fa98d2ed1816d88e8517cd988de186fd6477b8 |
|
24-Sep-2014 |
Randall Spangler <rspangler@chromium.org> |
vboot2: Fix potential null pointer dereference If key is null in vb2_verify_digest(), we could attempt to dereference it. In practice it never is, but for safety's sake we should avoid the reference. BUG=chrome-os-partner:32235 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I5a817e432922ea4c3b439b696cd2f8d988d0fecc Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/219574 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
/external/vboot_reference/firmware/2lib/2rsa.c
|
b9be53640efdee92b1b42e60adda274563236301 |
|
05-Jun-2014 |
Randall Spangler <rspangler@chromium.org> |
vboot2: Use more specific error codes Error codes reported by the crypto and storage APIs are now very specific, and tests verify the proper errors are reported. More specific error codes coming to other files next, but I don't want this CL to get too long. This also changes test_common.c so TEST_EQ() reports mismatched values in both decimal and hex, and adds TEST_SUCC() to test for a successful return value. BUG=chromium:370082 BRANCH=none TEST=make clean && VBOOT2=1 COV=1 make Change-Id: I255c8e5769284fbc286b9d94631b19677a71cdd0 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/202778 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
/external/vboot_reference/firmware/2lib/2rsa.c
|
e166d04e797b605dd2f6784bc863a262c418c0c4 |
|
13-May-2014 |
Randall Spangler <rspangler@chromium.org> |
vboot2: Add crypto functions This is the first of several CLs adding a more memory- and code-efficient firmware verification library. This CL adds the crypto library (modified from firmware/lib/cryptolib) and unit tests for it. BUG=chromium:370082 BRANCH=none TEST=make clean && VBOOT2=1 COV=1 make Change-Id: I4240eab227bb197cacc6c8e7a6397127d74414a2 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/199578 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
/external/vboot_reference/firmware/2lib/2rsa.c
|