Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Unified Diff: tests/gen_test_vpubks.sh

Issue 2873033: Add a script to generate test vboot-format public keys. (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « firmware/version.c ('k') | tests/testkeys/key_rsa1024.sha1.vbpubk » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gen_test_vpubks.sh
diff --git a/tests/gen_test_vpubks.sh b/tests/gen_test_vpubks.sh
new file mode 100755
index 0000000000000000000000000000000000000000..7f9cf9a2b69d00b3628b8402f18a9cab96a436b1
--- /dev/null
+++ b/tests/gen_test_vpubks.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# Generate test vboot public keys and keyblocks for testing.
+
+# Load common constants and variables.
+. "$(dirname "$0")/common.sh"
+
+function generate_vpubks {
+ algorithmcounter=0
+ for keylen in ${key_lengths[@]}
+ do
+ for hashalgo in ${hash_algos[@]}
+ do
+ ${UTIL_DIR}/vbutil_key --pack \
+ --in ${TESTKEY_DIR}/key_rsa${keylen}.keyb \
+ --out ${TESTKEY_DIR}/key_rsa${keylen}.${hashalgo}.vbpubk \
+ --version 1 \
+ --algorithm ${algorithmcounter}
+ let algorithmcounter=algorithmcounter+1
+ done
+ done
+}
+
+
+if [ ! -d ${TESTKEY_DIR} ]; then
+ echo "Test Key Directory does not exist!"
+ echo "You must run gen_test_keys.sh first."
+ exit 1
+fi
+
+generate_vpubks
« no previous file with comments | « firmware/version.c ('k') | tests/testkeys/key_rsa1024.sha1.vbpubk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698