futility: Use only vboot 2.0 APIs for keyblocks
[vboot.git] / futility / file_type.inc
1 /* -*- mode:c -*-
2  *
3  * Copyright 2015 The Chromium OS Authors. All rights reserved.
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  *
7  * This declares the file types that we can handle. Note that the order may be
8  * important for types with recognizer functions, since we generally want to to
9  * look for big things first.
10  */
11
12 /*
13  *        enum              --type           desc
14  *        recognizer function
15  *        show function
16  *        sign function
17  */
18 FILE_TYPE(BIOS_IMAGE,       "bios",          "Chrome OS BIOS image",
19           R_(ft_recognize_bios_image),
20           S_(ft_show_bios),
21           S_(ft_sign_bios))
22 FILE_TYPE(OLD_BIOS_IMAGE,   "oldbios",       "Cr-48 Chrome OS BIOS image",
23           R_(ft_recognize_bios_image),
24           S_(ft_show_bios),
25           S_(ft_sign_bios))
26 FILE_TYPE(GBB,              "gbb",           "GBB",
27           R_(ft_recognize_gbb),
28           S_(ft_show_gbb),
29           NONE)
30 FILE_TYPE(FW_PREAMBLE,      "fw_pre",        "firmware preamble (VBLOCK_A/B)",
31           R_(ft_recognize_vblock1),
32           S_(ft_show_fw_preamble),
33           NONE)
34 FILE_TYPE(KERN_PREAMBLE,    "kernel",        "kernel preamble/partition",
35           R_(ft_recognize_vblock1),
36           S_(ft_show_kernel_preamble),
37           S_(ft_sign_kern_preamble))
38 FILE_TYPE(KEYBLOCK,         "keyblock",      "keyblock (signed public key)",
39           R_(ft_recognize_vblock1),
40           S_(ft_show_keyblock),
41           NONE)
42 FILE_TYPE(PUBKEY,           "pubkey",        "VbPublicKey (.vbpubk)",
43           R_(ft_recognize_vb1_key),
44           S_(ft_show_pubkey),
45           S_(ft_sign_pubkey))
46 FILE_TYPE(PRIVKEY,          "prikey",        "VbPrivateKey (.vbprivk)",
47           R_(ft_recognize_vb1_key),
48           S_(ft_show_privkey),
49           NONE)
50 FILE_TYPE(VB2_PUBKEY,       "pubkey21",      "vb21 public key (.vbpubk2)",
51           R_(ft_recognize_vb21_key),
52           S_(ft_show_vb21_pubkey),
53           NONE)
54 FILE_TYPE(VB2_PRIVKEY,      "prikey21",      "vb21 private key (.vbprik2)",
55           R_(ft_recognize_vb21_key),
56           S_(ft_show_vb21_privkey),
57           NONE)
58 FILE_TYPE(PEM,              "pem",           "RSA private key (.pem)",
59           R_(ft_recognize_pem),
60           S_(ft_show_pem),
61           NONE)
62 FILE_TYPE(RAW_FIRMWARE,     "fwblob",        "raw firmware blob (FW_MAIN_A/B)",
63           NONE,
64           NONE,
65           S_(ft_sign_raw_firmware))
66 FILE_TYPE(RAW_KERNEL,       "vmlinuz",       "raw linux kernel",
67           NONE,
68           NONE,
69           S_(ft_sign_raw_kernel))
70 FILE_TYPE(CHROMIUMOS_DISK,  "disk_img",      "chromiumos disk image",
71           NONE,
72           NONE,
73           NONE)
74 FILE_TYPE(RWSIG,            "rwsig",         "RW device image",
75           R_(ft_recognize_rwsig),
76           S_(ft_show_rwsig),
77           S_(ft_sign_rwsig))
78 /* Firmware for USB Type-C power adapters */
79 FILE_TYPE(USBPD1,           "usbpd1",        "USB-PD charger image (v1.0)",
80           R_(ft_recognize_usbpd1),
81           S_(ft_show_usbpd1),
82           S_(ft_sign_usbpd1))