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.
7
# Run tests for RSA Signature verification.
9
# Load common constants and variables.
10
. "$(dirname "$0")/common.sh"
15
TEST_FILE=${TESTCASE_DIR}/test_file
17
function test_signatures {
19
for keylen in ${key_lengths[@]}
21
for hashalgo in ${hash_algos[@]}
23
echo -e "For ${COL_YELLOW}RSA-$keylen and $hashalgo${COL_STOP}:"
24
${UTIL_DIR}/verify_data $algorithmcounter \
25
${TESTKEY_DIR}/key_rsa${keylen}.keyb \
26
${TEST_FILE}.rsa${keylen}_${hashalgo}.sig \
32
let algorithmcounter=algorithmcounter+1
35
echo -e "Peforming ${COL_YELLOW}PKCS #1 v1.5 Padding Tests${COL_STOP}..."
36
${TEST_DIR}/rsa_padding_test ${TESTKEY_DIR}/rsa_padding_test_pubkey.keyb
40
echo "Testing signature verification..."