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 authored and davidvincze committed Sep 12, 2023
1 parent fb5507b commit 5c00da4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/sim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ 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,sig-ecdsa-psa sig-p384"
- "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" ]]; 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 5c00da4

Please sign in to comment.