Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Issue 4194003: Add support for using external signing application and .pem private key files to vbutil_keyblock. (Closed)

Created:
10 years, 1 month ago by gauravsh
Modified:
9 years, 6 months ago
CC:
chromium-os-reviews_chromium.org, Randall Spangler, gauravsh, Luigi Semenzato, Bill Richardson
Visibility:
Public.

Description

Add support for using external signing application and .pem private key files to vbutil_keyblock. This allows signing using a .pem file using an external program. It is assumed that the external program reads input from stdin, and outputs signed data on stdout. It takes one argument - the file name for the .pem private key reference. See external_rsa_signer.sh for an example external program. Example usage: vbutil_keyblock --pack 4096.keyblock \ --datapubkey 4096.vbpubk \ --signprivate_pem 4096.pem \ --pem_algorithm 8 \ --externalsigner "external_rsa_signer.sh" I have tried to make the change such that it doesn't impact existing tools/interfaces (since these are used at various places). That said, I am aware of the places where we could just extend an old interface an avoid code duplication but thought I'd put that re-factoring in as a TODO for now. Let me know if you disagree and I can merge them (and changing the existing interface). BUG=7576 TEST=Extended run_vbutil_tests.sh to test vbutil_keyblock packing using an external signer. To test, make && make runtests (or just run tests/gen_test_keys.sh; tests/run_vbutils_tests.sh) Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=068fc6f

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : spacing fixes #

Total comments: 8

Patch Set 4 : review fixes #

Total comments: 2

Patch Set 5 : fix read() bug #

Unified diffs Side-by-side diffs Delta from patch set Stats (+377 lines, -19 lines) Patch
M host/include/host_keyblock.h View 1 chunk +12 lines, -0 lines 0 comments Download
M host/include/host_signature.h View 1 chunk +12 lines, -2 lines 0 comments Download
M host/lib/host_keyblock.c View 1 2 1 chunk +59 lines, -0 lines 0 comments Download
M host/lib/host_signature.c View 1 2 3 4 4 chunks +150 lines, -2 lines 0 comments Download
A tests/external_rsa_signer.sh View 1 chunk +9 lines, -0 lines 0 comments Download
M tests/run_vbutil_tests.sh View 1 2 1 chunk +40 lines, -0 lines 0 comments Download
M utility/vbutil_keyblock.c View 1 2 3 8 chunks +95 lines, -15 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
gauravsh
10 years, 1 month ago (2010-10-27 23:56:46 UTC) #1
Bill Richardson
One complaint, a few nits. http://codereview.chromium.org/4194003/diff/4001/5004 File host/lib/host_signature.c (right): http://codereview.chromium.org/4194003/diff/4001/5004#newcode151 host/lib/host_signature.c:151: int fd1[2], fd2[2]; I'd ...
10 years, 1 month ago (2010-10-28 16:06:09 UTC) #2
Randall Spangler
http://codereview.chromium.org/4194003/diff/4001/5004 File host/lib/host_signature.c (right): http://codereview.chromium.org/4194003/diff/4001/5004#newcode156 host/lib/host_signature.c:156: "OUtput of the signer will be read from standar ...
10 years, 1 month ago (2010-10-28 18:33:43 UTC) #3
gauravsh
http://codereview.chromium.org/4194003/diff/4001/5004 File host/lib/host_signature.c (right): http://codereview.chromium.org/4194003/diff/4001/5004#newcode151 host/lib/host_signature.c:151: int fd1[2], fd2[2]; On 2010/10/28 16:06:09, Bill Richardson wrote: ...
10 years, 1 month ago (2010-10-28 21:29:28 UTC) #4
Bill Richardson
bzzzt! Survey says "X". http://codereview.chromium.org/4194003/diff/11001/12004 File host/lib/host_signature.c (right): http://codereview.chromium.org/4194003/diff/11001/12004#newcode182 host/lib/host_signature.c:182: ltr = outbufsize - n; ...
10 years, 1 month ago (2010-10-28 22:07:36 UTC) #5
Randall Spangler
LGTM for my requested fixes (wait for Bill's LGTM for his requests, tho)
10 years, 1 month ago (2010-10-28 22:13:57 UTC) #6
gauravsh
Used your fix. Re-ran vbutil_tests. http://codereview.chromium.org/4194003/diff/11001/12004 File host/lib/host_signature.c (right): http://codereview.chromium.org/4194003/diff/11001/12004#newcode182 host/lib/host_signature.c:182: ltr = outbufsize - ...
10 years, 1 month ago (2010-10-28 22:46:19 UTC) #7
gauravsh
10 years, 1 month ago (2010-10-29 01:22:57 UTC) #8
Bill Richardson
10 years, 1 month ago (2010-10-29 06:22:25 UTC) #9
LGTM

Powered by Google App Engine
This is Rietveld 408576698