Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing tests for create_primary #345

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions examples/run_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,59 @@ fi
rm -f run.out
touch run.out


# Create Primary Tests
echo -e "Create Primary Tests"
./examples/keygen/create_primary -rsa -oh >> run.out 2>&1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "create primary owner rsa key failed! $RESULT" && exit 1
./examples/keygen/create_primary -ecc -oh >> run.out 2>&1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "create primary owner ecc key failed! $RESULT" && exit 1

./examples/keygen/create_primary -rsa -eh >> run.out 2>&1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "create primary endosement rsa key failed! $RESULT" && exit 1
./examples/keygen/create_primary -ecc -eh >> run.out 2>&1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "create primary endosement ecc key failed! $RESULT" && exit 1

./examples/keygen/create_primary -rsa -ph >> run.out 2>&1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "create primary platform rsa key failed! $RESULT" && exit 1
./examples/keygen/create_primary -ecc -ph >> run.out 2>&1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "create primary platform ecc key failed! $RESULT" && exit 1

./examples/keygen/create_primary -rsa -oh -auth=ThisIsMyStorageKeyAuth -store=0x81000200 >> run.out 2>&1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "create primary owner rsa key stored failed! $RESULT" && exit 1

if [ $WOLFCRYPT_ENABLE -eq 1 ]; then
./examples/keygen/create_primary -rsa -oh -aes >> run.out 2>&1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "create primary owner rsa key param enc failed! $RESULT" && exit 1
./examples/keygen/create_primary -ecc -oh -aes >> run.out 2>&1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "create primary owner ecc key param enc failed! $RESULT" && exit 1

./examples/keygen/create_primary -rsa -eh -aes >> run.out 2>&1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "create primary endosement rsa key param enc failed! $RESULT" && exit 1
./examples/keygen/create_primary -ecc -eh -aes >> run.out 2>&1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "create primary endosement ecc key param enc failed! $RESULT" && exit 1

./examples/keygen/create_primary -rsa -ph -aes >> run.out 2>&1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "create primary platform rsa key param enc failed! $RESULT" && exit 1
./examples/keygen/create_primary -ecc -ph -aes >> run.out 2>&1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "create primary platform ecc key param enc failed! $RESULT" && exit 1
fi



# Native API test TPM2_x
echo -e "Native tests for TPM2_x API's"
./examples/native/native_test >> run.out 2>&1
Expand Down
Loading