blob: 421f6290dee19f0fb997361109da4142ec8ff8a0 [file] [log] [blame]
Gaurav Shah445925f2010-03-19 16:19:09 -07001#!/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# Determine script directory.
8if [[ $0 == '/'* ]];
9then
10 SCRIPT_DIR="`dirname $0`"
11elif [[ $0 == './'* ]];
12then
13 SCRIPT_DIR="`pwd`"
14else
15 SCRIPT_DIR="`pwd`"/"`dirname $0`"
16fi
17
Gaurav Shahfc70d722010-03-31 13:26:55 -070018UTIL_DIR=`dirname ${SCRIPT_DIR}`/utility
Gaurav Shah445925f2010-03-19 16:19:09 -070019TEST_DIR=${SCRIPT_DIR}
20TESTKEY_DIR=${SCRIPT_DIR}/testkeys
21TESTCASE_DIR=${SCRIPT_DIR}/testcases
22
23# Color output encodings.
24COL_RED='\E[31;1m'
25COL_GREEN='\E[32;1m'
26COL_YELLOW='\E[33;1m'
27COL_BLUE='\E[34;1m'
28COL_STOP='\E[0;m'
29
30hash_algos=( sha1 sha256 sha512 )
31key_lengths=( 1024 2048 4096 8192 )
32
33function check_test_keys {
34 if [ ! -d ${TESTKEY_DIR} ]
35 then
36 echo "You must run gen_test_keys.sh to generate test keys first."
37 exit 1
38 fi
39}