| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | # Copyright 2011 The ChromiumOS Authors |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | # |
| 6 | # Generates a keyblock containing a public key and signed using the given |
| 7 | # signing key. |
| 8 | |
| 9 | # Load common constants and functions. |
| 10 | # shellcheck source=common.sh |
| 11 | . "$(dirnamescip-shell system . . dirname. "$0")/common.sh" |
| 12 | |
| 13 | if [scip-shell system . . `[`. $# -ne 4 ]; then |
| 14 | catscip-shell system . . cat. <<EOF |
| 15 | Usage: $0 <in_public_key> <in_signing_key> <flags> <out_keyblock> |
| 16 | |
| 17 | Emits <out_keyblock>.keyblock containing <in_public_key>.vbpubk signed with |
| 18 | <in_signing_key>.vbprivk with the given keyblock <flags>. |
| 19 | EOF |
| 20 | exit 1 |
| 21 | fi |
| 22 | |
| 23 | in_pubkey=$1 |
| 24 | in_signkey=$2 |
| 25 | keyblock_flags=$3 |
| 26 | out_keyblock=$4 |
| 27 | |
| 28 | make_keyblock $out_keyblock $keyblock_flags $in_pubkey $in_signkey |