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

Unified Diff: src/platform/vboot_reference/tests/run_tests.sh

Issue 564020: Data structure and interface for manipulating and handing firmware images for verified boot. (Closed)
Patch Set: Fix spaces etc. Created 10 years, 10 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
Index: src/platform/vboot_reference/tests/run_tests.sh
diff --git a/src/platform/vboot_reference/tests/run_tests.sh b/src/platform/vboot_reference/tests/run_tests.sh
index e5ee196cc5c619c222f9f78b2ff34a3cbd197d00..68b81bbdcabc56fdee28bfcc8c4f22d7e08e9cc1 100755
--- a/src/platform/vboot_reference/tests/run_tests.sh
+++ b/src/platform/vboot_reference/tests/run_tests.sh
@@ -12,6 +12,13 @@ key_lengths=( 1024 2048 4096 8192 )
TEST_FILE=test_file
TEST_FILE_SIZE=1000000
UTIL_DIR=../utils/
+TEST_DIR=../tests/
+
+# Color code output
+COL_YELLOW='\E[1;33m'
+COL_RED='\E[1;31m'
+COL_GREEN='\E[1;32m'
+COL_STOP='\E[0m'
# Generate RSA test keys of various lengths.
function generate_keys {
@@ -54,6 +61,21 @@ function test_signatures {
done
}
+function test_verification {
+ algorithmcounter=0
+ for keylen in ${key_lengths[@]}
+ do
+ for hashalgo in ${hash_algos[@]}
+ do
+ echo -e "For ${COL_YELLOW}RSA-$keylen and $hashalgo${COL_STOP}:"
+ cd ${UTIL_DIR} && ${TEST_DIR}/firmware_image_tests $algorithmcounter testkeys/key_rsa8192.pem \
+ testkeys/key_rsa8192.keyb testkeys/key_rsa${keylen}.pem \
+ testkeys/key_rsa${keylen}.keyb
+ let algorithmcounter=algorithmcounter+1
+ done
+ done
+}
+
function pre_work {
# Generate a file with random bytes for signature tests.
echo "Generating test file..."
@@ -73,11 +95,15 @@ echo "Testing message digests..."
echo
echo "Testing signature verification..."
-pre_work
+#pre_work
test_signatures
echo
+echo "Testing high-level image verification..."
+test_verification
+
+echo
echo "Cleaning up..."
-cleanup
+#cleanup
« no previous file with comments | « src/platform/vboot_reference/tests/firmware_image_tests.c ('k') | src/platform/vboot_reference/utils/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698