summaryrefslogtreecommitdiff
path: root/tests/vb2_rsa_tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vb2_rsa_tests.sh')
-rwxr-xr-xtests/vb2_rsa_tests.sh19
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/vb2_rsa_tests.sh b/tests/vb2_rsa_tests.sh
index 903d38da..58d99b2c 100755
--- a/tests/vb2_rsa_tests.sh
+++ b/tests/vb2_rsa_tests.sh
@@ -16,24 +16,24 @@ TEST_FILE=${TESTCASE_DIR}/test_file
function test_signatures {
algorithmcounter=0
- for keylen in ${key_lengths[@]}
+ for keylen in "${key_lengths[@]}"
do
- for hashalgo in ${hash_algos[@]}
+ for hashalgo in "${hash_algos[@]}"
do
echo -e "For ${COL_YELLOW}RSA-$keylen and $hashalgo${COL_STOP}:"
- ${BIN_DIR}/verify_data $algorithmcounter \
- ${TESTKEY_DIR}/key_rsa${keylen}.keyb \
- ${TEST_FILE}.rsa${keylen}_${hashalgo}.sig \
- ${TEST_FILE}
- if [ $? -ne 0 ]
+ if ! "${BIN_DIR}/verify_data" "$algorithmcounter" \
+ "${TESTKEY_DIR}/key_rsa${keylen}.keyb" \
+ "${TEST_FILE}.rsa${keylen}_${hashalgo}.sig" \
+ "${TEST_FILE}"
then
return_code=255
fi
- let algorithmcounter=algorithmcounter+1
+ algorithmcounter=$((algorithmcounter + 1))
done
done
echo -e "Peforming ${COL_YELLOW}PKCS #1 v1.5 Padding Tests${COL_STOP}..."
- ${TEST_DIR}/vb20_rsa_padding_tests ${TESTKEY_DIR}/rsa_padding_test_pubkey.keyb
+ "${TEST_DIR}/vb20_rsa_padding_tests" \
+ "${TESTKEY_DIR}/rsa_padding_test_pubkey.keyb"
}
check_test_keys
@@ -41,4 +41,3 @@ echo "Testing signature verification..."
test_signatures
exit $return_code
-