mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 18:25:10 +00:00
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
24 lines
518 B
Bash
Executable File
24 lines
518 B
Bash
Executable File
#!/bin/bash
|
|
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
#
|
|
# Generate .vbpubk and .vbprivk pairs with the given algorithm id.
|
|
|
|
# Load common constants and functions.
|
|
. "$(dirname "$0")/common.sh"
|
|
|
|
if [ $# -ne 2 ]; then
|
|
cat <<EOF
|
|
Usage: $0 <algoid> <out_keypair>
|
|
|
|
Output: <out_keypair>.vbprivk and <out_keypair>.vbpubk
|
|
EOF
|
|
exit 1
|
|
fi
|
|
|
|
algoid=$1
|
|
out_keypair=$2
|
|
|
|
make_pair $out_keypair $algoid
|