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

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

Issue 604016: Vboot Reference: Move test key generation to a separate script and add sample test keys. (Closed)
Patch Set: Fix spacing. 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 unified diff | Download patch
OLDNEW
(Empty)
1 #!/bin/bash
2
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
5 # found in the LICENSE file.
6
7 # Generate test keys for use by the tests.
8
9 KEY_DIR=testkeys
10 key_lengths=( 1024 2048 4096 8192 )
11 UTIL_DIR=../utils/
12
13 # Generate RSA test keys of various lengths.
14 function generate_keys {
15 for i in ${key_lengths[@]}
16 do
17 openssl genrsa -F4 -out ${KEY_DIR}/key_rsa$i.pem $i
18 # Generate self-signed certificate from key.
19 openssl req -batch -new -x509 -key ${KEY_DIR}/key_rsa$i.pem \
20 -out ${KEY_DIR}/key_rsa$i.crt
21 # Generate pre-processed key for use by RSA signature verification code.
22 ${UTIL_DIR}/dumpRSAPublicKey ${KEY_DIR}/key_rsa$i.crt \
23 > ${KEY_DIR}/key_rsa$i.keyb
24 done
25 }
26
27 if [ ! -d "$KEY_DIR" ]
28 then
29 mkdir "$KEY_DIR"
30 fi
31
32 generate_keys
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/tests/Makefile ('k') | src/platform/vboot_reference/tests/run_tests.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698