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

Side by Side Diff: tests/gen_test_vbpubks.sh

Issue 2805051: Fix name. Use existing directory check. (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: Created 10 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 vboot public keys and keyblocks for testing. 7 # Generate test vboot public keys and keyblocks for testing.
8 8
9 # Load common constants and variables. 9 # Load common constants and variables.
10 . "$(dirname "$0")/common.sh" 10 . "$(dirname "$0")/common.sh"
11 11
12 function generate_vpubks { 12 function generate_vpubks {
13 algorithmcounter=0 13 algorithmcounter=0
14 for keylen in ${key_lengths[@]} 14 for keylen in ${key_lengths[@]}
15 do 15 do
16 for hashalgo in ${hash_algos[@]} 16 for hashalgo in ${hash_algos[@]}
17 do 17 do
18 ${UTIL_DIR}/vbutil_key --pack \ 18 ${UTIL_DIR}/vbutil_key --pack \
19 --in ${TESTKEY_DIR}/key_rsa${keylen}.keyb \ 19 --in ${TESTKEY_DIR}/key_rsa${keylen}.keyb \
20 --out ${TESTKEY_DIR}/key_rsa${keylen}.${hashalgo}.vbpubk \ 20 --out ${TESTKEY_DIR}/key_rsa${keylen}.${hashalgo}.vbpubk \
21 --version 1 \ 21 --version 1 \
22 --algorithm ${algorithmcounter} 22 --algorithm ${algorithmcounter}
23 let algorithmcounter=algorithmcounter+1 23 let algorithmcounter=algorithmcounter+1
24 done 24 done
25 done 25 done
26 } 26 }
27 27
28 28 check_test_keys
29 if [ ! -d ${TESTKEY_DIR} ]; then
30 echo "Test Key Directory does not exist!"
31 echo "You must run gen_test_keys.sh first."
32 exit 1
33 fi
34
35 generate_vpubks 29 generate_vpubks
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698