Commit Graph

8 Commits

Author SHA1 Message Date
Gaurav Shah
5746845500 Add support for using separate developer firmware keyblock while signing.
Also re-factor the key generation script to its own directory, including wrappers for generating key pairs and keyblocks without needing to start keyset generation process from scratch. (Useful for generating new kernel keyblocks, and for retroactively adding new keys to an existing keyset - as in this case).

Finally, change hard coded algorithm ids and keyblock modes to bash variables, for each changes and telling keyset configuration from a glance.

BUG=chrome-os-partner:2218
TEST=manually tried the following:
1) Generating an entire new keyset.
2) Generating a new key pair and creating a keyblock from an existing key (for generating dev firmware keyblock for existing PVT keysets)
3) Firmware signing via sign_official_build.sh of an image with a firmware payload/

Change-Id: I4e9bb96ac7e5fe4cc0d95af6162ad6d37bbd4bda

Review URL: http://codereview.chromium.org/6594131
2011-03-02 14:50:46 -08:00
Randall Spangler
efa40aa21d Add dev firmware key to devkeys.
The existing keys are kept the same, so that old dev kernels and
firmware remain compatible with new kernels and firmware.

Change-Id: I4177d1868904a477d79b9f2e6de88ed756ed57b4

BUG=chrome-os-partner:2218
TEST=manual:

Build firmware with new keys.

Boot with dev switch on.
Run 'crossystem mainfw_act mainfw_type'.
Should see "A developer"

Boot with dev switch off.
Run 'crossystem mainfw_act mainfw_type'.
Should see "B normal"

Review URL: http://codereview.chromium.org/6580035
2011-02-24 11:05:34 -08:00
Gaurav Shah
551037b10e Make dumpRSAPublicKey also accept a public key in PEM format
This change makes dumpRSAPublicKey directly accept a public key in PEM format. This makes it possible to avoid the unnecessary step of generating a self-signed certificate to dump the public key in .keyb format.

The old style certificate input is still accepted.

Using certs (as done previously):
dumpRSAPublicKey -cert <certfile>

Directly using public keys:
dumpRSAPublicKey -pub <pubfile>

Change-Id: Ic35b59aff6613d145d7947212650da281f734b74

BUG=7576
TEST=manual

$ openssl genrsa -F4 -out test.pem 4096
$ openssl rsa -in test.pem -out test.pub
$ dumpRSAPublicKey -pub test.pub >test.pub.keyb

Verify that this matches the output we get using the old style <cert> input.

$ openssl req -batch -new -x509 -key test.pem -out test.cert
$ dumpRSAPublicKey -cert test.cert >test.cert.keyb
$ diff test.pub.keyb test.cert.keyb
$

Review URL: http://codereview.chromium.org/4215006
2010-11-01 13:33:32 -07:00
Gaurav Shah
3dd3ce8560 Make the factory installer keyblock use a different kernel key than the recovery key.
BUG=chromium-os:7202
TEST=none

Change-Id: I9dd798ab9fc4cfd660c4f5dd4d970180c917dd9d

Review URL: http://codereview.chromium.org/3824005
2010-10-17 13:18:43 -07:00
Hung-Te Lin
20525b9164 make_dev_ssd: new script to change SSD image to dev key
The make_dev_ssd.sh is made for devinstall shim to
change SSD kernels to be signed by dev keys.

 - Kernel A, B will be resigned with dev keys (ignore if A/B seems not bootable)
 - Adding param --remove_rootfs_verification can even disable rootfs hash check

This CL also includes some shared refine/fix to make_dev_firmware.sh

BUG=chrome-os-partner:1276
TEST=sudo ./make_dev_ssd.sh; (seeing Kernel A is resigned and B is ignored)
     then reboot without developer mode (OK),
          rootdev shows /dev/dm-0, rootdev -s shows /dev/sda3
     sudo ./make_dev_ssd.sh --remove_rootfs_verification;
     then reboot without developer mode (OK), rootdev shows /dev/sda3

Change-Id: Ic20f734b2af42e50a43c19a565a166a39d57a7fd

Review URL: http://codereview.chromium.org/3772013
2010-10-16 09:37:32 +08:00
Bill Richardson
4f36ef3360 Changes to allow user-signed kernels to be generated.
Make vbutil_keyblock handle unsigned blocks. Also enable --unpack option and
add tests for it.

Modify vbutil_kernel to allow unsigned keyblocks, correct usage message,
and fix the --debug option which was somehow disabled.

Update load_kernel_test to accept /dev/null for the public key, to test
non-signed kernel keyblocks.

Review URL: http://codereview.chromium.org/3124004
2010-08-09 17:50:14 -07:00
Gaurav Shah
9b16a66b9b Modify the key generation script and add an installer keyblock to the dev keys.
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/3018024
2010-07-28 16:24:26 -07:00
Bill Richardson
9396c1050d Adding new directory with developer signing keys.
The keys in this directory are just like the official release keys, except
that they're not secret.

Review URL: http://codereview.chromium.org/2883018
2010-07-01 15:51:05 -07:00