mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-16 21:07:26 +00:00
After this change the generated files are placed in a separate tree (such thet they don't show in the `git status' output anymore) and the dependencies are followed properly (if a .h file changes the appropriate .o files and apps get rebuilt). Tested as follows: > $ make clean > $ make # build succeeds > $ git status # shows clean directory > $ RUNTESTS=1 make # (captured test output matches that of the test run before any changes) > $ touch ./vboot_firmware/include/tlcl.h > $ make # make succeeds > $ find build -type f -newer ./vboot_firmware/include/tlcl.h build/vboot_firmware/lib/rollback_index.o build/vboot_firmware/lib/rollback_index.o.d build/vboot_firmware/a.out build/vboot_fw.a build/utility/vbutil_key build/utility/kernel_utility.d build/utility/vbutil_key.d build/utility/verify_data build/utility/load_kernel_test.d build/utility/vbutil_keyblock.d build/utility/vbutil_kernel build/utility/vbutil_kernel.d build/utility/firmware_utility build/utility/signature_digest_utility.d build/utility/kernel_utility build/utility/verify_data.d build/utility/vbutil_keyblock build/utility/signature_digest_utility build/utility/load_kernel_test build/utility/firmware_utility.d build/tests/vboot_common3_tests build/tests/vboot_common2_tests build/host/a.out $ > Review URL: http://codereview.chromium.org/2845001
31 lines
921 B
Bash
Executable File
31 lines
921 B
Bash
Executable File
#!/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 keys for use by the tests.
|
|
|
|
# Load common constants and variables.
|
|
. "$(dirname "$0")/common.sh"
|
|
|
|
# Generate RSA test keys of various lengths.
|
|
function generate_keys {
|
|
for i in ${key_lengths[@]}
|
|
do
|
|
if [ -f ${TESTKEY_DIR}/key_rsa$i.keyb ]; then
|
|
continue
|
|
fi
|
|
openssl genrsa -F4 -out ${TESTKEY_DIR}/key_rsa$i.pem $i
|
|
# Generate self-signed certificate from key.
|
|
openssl req -batch -new -x509 -key ${TESTKEY_DIR}/key_rsa$i.pem \
|
|
-out ${TESTKEY_DIR}/key_rsa$i.crt
|
|
# Generate pre-processed key for use by RSA signature verification code.
|
|
${UTIL_DIR}/dumpRSAPublicKey ${TESTKEY_DIR}/key_rsa$i.crt \
|
|
> ${TESTKEY_DIR}/key_rsa$i.keyb
|
|
done
|
|
}
|
|
|
|
mkdir -p ${TESTKEY_DIR}
|
|
generate_keys
|