ci: Add test cases for ECDSA using PSA Crypto

Add ECDSA verification tests to the CI using the PSA Crypto API

Signed-off-by: Roland Mikhel <roland.mikhel@arm.com>
Change-Id: I904c8929f355ec791ff28ac7c3e0ca3832b2403d
This commit is contained in:
Roland Mikhel 2023-06-12 10:41:52 +02:00 committed by Dávid Vincze
parent fb5507b4a4
commit 5c00da4542
2 changed files with 13 additions and 2 deletions

View File

@ -44,6 +44,7 @@ jobs:
- "sig-rsa validate-primary-slot ram-load multiimage" - "sig-rsa validate-primary-slot ram-load multiimage"
- "sig-rsa validate-primary-slot direct-xip multiimage" - "sig-rsa validate-primary-slot direct-xip multiimage"
- "sig-ecdsa hw-rollback-protection multiimage" - "sig-ecdsa hw-rollback-protection multiimage"
- "sig-ecdsa-psa,sig-ecdsa-psa sig-p384"
- "ram-load enc-aes256-kw multiimage" - "ram-load enc-aes256-kw multiimage"
- "ram-load enc-aes256-kw sig-ecdsa-mbedtls multiimage" - "ram-load enc-aes256-kw sig-ecdsa-mbedtls multiimage"
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -43,10 +43,20 @@ fi
if [[ ! -z $MULTI_FEATURES ]]; then if [[ ! -z $MULTI_FEATURES ]]; then
IFS=',' IFS=','
read -ra multi_features <<< "$MULTI_FEATURES" read -ra multi_features <<< "$MULTI_FEATURES"
# psa crypto tests require single thread mode
TEST_ARGS=''
for features in "${multi_features[@]}"; do
if [[ $features =~ "psa" ]]; then
TEST_ARGS='--test-threads=1'
break
fi
done
for features in "${multi_features[@]}"; do for features in "${multi_features[@]}"; do
echo "Running cargo for features=\"${features}\"" echo "Running cargo for features=\"${features}\""
time cargo test --no-run --features "$features" time cargo test --no-run --features "$features" -- $TEST_ARGS
time cargo test --features "$features" time cargo test --features "$features" -- $TEST_ARGS
rc=$? && [ $rc -ne 0 ] && EXIT_CODE=$rc rc=$? && [ $rc -ne 0 ] && EXIT_CODE=$rc
done done
fi fi