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

Side by Side Diff: src/platform/vboot_reference/tests/gen_fuzz_test_cases.sh

Issue 2283005: Modifying the kernel_utility tool to create our magic blob. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: respond to feedback Created 10 years, 7 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 unified diff | Download patch
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Generate test cases for use for the RSA verify benchmark. 7 # Generate test cases for use for the RSA verify benchmark.
8 8
9 # Load common constants and variables. 9 # Load common constants and variables.
10 . "$(dirname "$0")/common.sh" 10 . "$(dirname "$0")/common.sh"
(...skipping 15 matching lines...) Expand all
26 --firmware_sign_key_pub ${TESTKEY_DIR}/key_rsa4096.keyb \ 26 --firmware_sign_key_pub ${TESTKEY_DIR}/key_rsa4096.keyb \
27 --firmware_sign_algorithm 8 \ 27 --firmware_sign_algorithm 8 \
28 --firmware_key_version 1 \ 28 --firmware_key_version 1 \
29 --firmware_version 1 \ 29 --firmware_version 1 \
30 --out ${TESTCASE_DIR}/firmware.signed 30 --out ${TESTCASE_DIR}/firmware.signed
31 cp ${TESTKEY_DIR}/key_rsa8192.keyb ${TESTCASE_DIR}/root_key.keyb 31 cp ${TESTKEY_DIR}/key_rsa8192.keyb ${TESTCASE_DIR}/root_key.keyb
32 32
33 echo "Generating signed kernel test image..." 33 echo "Generating signed kernel test image..."
34 # Generate a test verified boot kernel image and copy firmware public key. 34 # Generate a test verified boot kernel image and copy firmware public key.
35 ${UTIL_DIR}/kernel_utility --generate \ 35 ${UTIL_DIR}/kernel_utility --generate \
36 --in $1 \
37 --firmware_key ${TESTKEY_DIR}/key_rsa4096.pem \ 36 --firmware_key ${TESTKEY_DIR}/key_rsa4096.pem \
38 --kernel_key ${TESTKEY_DIR}/key_rsa1024.pem \ 37 --kernel_key ${TESTKEY_DIR}/key_rsa1024.pem \
39 --kernel_key_pub ${TESTKEY_DIR}/key_rsa1024.keyb \ 38 --kernel_key_pub ${TESTKEY_DIR}/key_rsa1024.keyb \
40 --firmware_sign_algorithm 8 \ 39 --firmware_sign_algorithm 8 \
41 --kernel_sign_algorithm 2 \ 40 --kernel_sign_algorithm 2 \
42 --kernel_key_version 1 \ 41 --kernel_key_version 1 \
43 --kernel_version 1 \ 42 --kernel_version 1 \
43 --vmlinuz /dev/null \
44 --config /dev/null \
45 --bootloader ${TEST_FILE} \
44 --out ${TESTCASE_DIR}/kernel.signed 46 --out ${TESTCASE_DIR}/kernel.signed
45 cp ${TESTKEY_DIR}/key_rsa4096.keyb ${TESTCASE_DIR}/firmware_key.keyb 47 cp ${TESTKEY_DIR}/key_rsa4096.keyb ${TESTCASE_DIR}/firmware_key.keyb
46 } 48 }
47 49
48 function pre_work { 50 function pre_work {
49 # Generate a file to serve as random bytes for firmware/kernel contents. 51 # Generate a file to serve as random bytes for firmware/kernel contents.
52 # NOTE: The kernel and config file can't really be random, but the bootloader
53 # can. That's probably close enough.
50 echo "Generating test file..." 54 echo "Generating test file..."
51 dd if=/dev/urandom of=${TEST_FILE} bs=${TEST_FILE_SIZE} count=1 55 dd if=/dev/urandom of=${TEST_FILE} bs=${TEST_FILE_SIZE} count=1
52 } 56 }
53 mkdir -p ${TESTCASE_DIR} 57 mkdir -p ${TESTCASE_DIR}
54 pre_work 58 pre_work
55 check_test_keys 59 check_test_keys
56 generate_fuzzing_images ${TEST_FILE} 60 generate_fuzzing_images ${TEST_FILE}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698