Skip to content

Commit

Permalink
ci: Add test cases for ECDSA using PSA Crypto
Browse files Browse the repository at this point in the history
Add ECDSA verification tests to the CI using the PSA Crypto API

Signed-off-by: Roland Mikhel <[email protected]>
Change-Id: I904c8929f355ec791ff28ac7c3e0ca3832b2403d
  • Loading branch information
Roland Mikhel committed Jul 17, 2023
1 parent aa99d77 commit 7b91822
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/sim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
- "sig-rsa validate-primary-slot ram-load multiimage"
- "sig-rsa validate-primary-slot direct-xip multiimage"
- "sig-ecdsa hw-rollback-protection multiimage"
- "sig-ecdsa-psa psa-crypto-api"
- "sig-ecdsa-psa psa-crypto-api use-p384-curve"
- "ram-load enc-aes256-kw multiimage"
- "ram-load enc-aes256-kw sig-ecdsa-mbedtls multiimage"
runs-on: ubuntu-latest
Expand Down
14 changes: 12 additions & 2 deletions ci/sim_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,20 @@ fi
if [[ ! -z $MULTI_FEATURES ]]; then
IFS=','
read -ra multi_features <<< "$MULTI_FEATURES"

# psa crypto tests require single thread mode
TEST_ARGS=''
for features in "${multi_features[@]}"; do
if [[ $features =~ "psa-crypto-api" ]]; then
TEST_ARGS='--test-threads=1'
break
fi
done

for features in "${multi_features[@]}"; do
echo "Running cargo for features=\"${features}\""
time cargo test --no-run --features "$features"
time cargo test --features "$features"
time cargo test --no-run --features "$features" -- $TEST_ARGS
time cargo test --features "$features" -- $TEST_ARGS
rc=$? && [ $rc -ne 0 ] && EXIT_CODE=$rc
done
fi
Expand Down

0 comments on commit 7b91822

Please sign in to comment.