aboutsummaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2015-02-03 17:07:15 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-03-10 20:44:43 +0000
commit4e4c19602edf3834b50d66d3ba067e895aca6fa0 (patch)
tree11b9408e5e6a9c3e3fde95c21656e67562bb3faf /firmware
parent26af0da4f7e0fd5cc9410011ca05ff6539bbf42d (diff)
downloadvboot_reference-4e4c19602edf3834b50d66d3ba067e895aca6fa0.tar.gz
futility: Add create command to make keypairs from RSA files
This command reads a single .pem file and emits the public and private keys generated from it. It can produce both the old-style vboot 1.0 keys (.vbpubk and .vbprivk), or the new vboot 2.1 format keys (.vbpubk2 and .vbprik2). The default is the new format, but you can give futility the --vb1 arg to force the old format. A test is included. BUG=chromium:231547 BRANCH=ToT TEST=make runtests Change-Id: I4713dc5bf34151052870f88ba52ddccf9d4dab50 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/246766 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/2lib/include/2misc.h2
-rw-r--r--firmware/2lib/include/2return_codes.h8
2 files changed, 8 insertions, 2 deletions
diff --git a/firmware/2lib/include/2misc.h b/firmware/2lib/include/2misc.h
index 928ada3c..1eccde9b 100644
--- a/firmware/2lib/include/2misc.h
+++ b/firmware/2lib/include/2misc.h
@@ -27,7 +27,7 @@ static __inline struct vb2_shared_data *vb2_get_sd(struct vb2_context *ctx) {
* Validate gbb signature (the magic number)
*
* @param sig Pointer to the signature bytes to validate
- * @return VB2_SUCCESS if valid or VB2_ERROR_GBB_MAGIC otherwise.
+ * @return VB2_SUCCESS if valid or non-zero if error.
*/
int vb2_validate_gbb_signature(uint8_t *sig);
diff --git a/firmware/2lib/include/2return_codes.h b/firmware/2lib/include/2return_codes.h
index 7b54f6db..384879dc 100644
--- a/firmware/2lib/include/2return_codes.h
+++ b/firmware/2lib/include/2return_codes.h
@@ -490,6 +490,12 @@ enum vb2_return_code {
/* Unable to write data in write_file() */
VB2_ERROR_WRITE_FILE_DATA,
+ /* Unable to convert string to struct vb_guid */
+ VB2_ERROR_STR_TO_GUID,
+
+ /* Unable to convert struct vb_guid to string */
+ VB2_ERROR_GUID_TO_STR,
+
/**********************************************************************
* Errors generated by host library key functions
*/
@@ -573,7 +579,7 @@ enum vb2_return_code {
/* Unable to determine key size in vb2_public_key_pack() */
VB2_ERROR_PUBLIC_KEY_PACK_SIZE,
- /* Bad hash algorithm in vb2_publc_key_hash() */
+ /* Bad hash algorithm in vb2_public_key_hash() */
VB2_ERROR_PUBLIC_KEY_HASH,
/**********************************************************************