1#!/bin/bash
2# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
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. "$(dirname "$0")/common.sh"
11
12if [ $# -ne 4 ]; then
13  cat <<EOF
14Usage: $0 <in_public_key> <in_signing_key> <flags> <out_keyblock>
15
16Emits <out_keyblock>.keyblock containing <in_public_key>.vbpubk signed with
17<in_signing_key>.vbprivk with the given keyblock <flags>.
18EOF
19  exit 1
20fi
21
22in_pubkey=$1
23in_signkey=$2
24keyblock_flags=$3
25out_keyblock=$4
26
27make_keyblock $out_keyblock $keyblock_flags $in_pubkey $in_signkey
28