xref: /aosp_15_r20/external/vboot_reference/scripts/keygeneration/make_pair.sh (revision 8617a60d3594060b7ecbd21bc622a7c14f3cf2bc)
1#!/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# Generate .vbpubk and .vbprivk pairs with the given algorithm id.
7
8# Load common constants and functions.
9# shellcheck source=common.sh
10. "$(dirname "$0")/common.sh"
11
12if [ $# -ne 2 ]; then
13  cat <<EOF
14Usage: $0 <algoid> <out_keypair>
15
16Output: <out_keypair>.vbprivk and <out_keypair>.vbpubk
17EOF
18  exit 1
19fi
20
21algoid=$1
22out_keypair=$2
23
24make_pair $out_keypair $algoid
25