fapi-get-info_ecc.sh 538 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. set -e
  2. source helpers.sh
  3. start_up
  4. CRYPTO_PROFILE="ECC"
  5. setup_fapi $CRYPTO_PROFILE
  6. function cleanup {
  7. tss2 delete --path=/
  8. shut_down
  9. }
  10. trap cleanup EXIT
  11. DATA_OUTPUT_FILE=$TEMP_DIR/output.file
  12. tss2 provision
  13. tss2 getinfo --info=$DATA_OUTPUT_FILE --force
  14. if [ ! -s $DATA_OUTPUT_FILE ]
  15. then
  16. echo "File is empty"
  17. exit 1
  18. fi
  19. expect <<EOF
  20. # Try with missing info file
  21. spawn tss2 getinfo
  22. set ret [wait]
  23. if {[lindex \$ret 2] || [lindex \$ret 3] != 1} {
  24. Command has not failed as expected\n"
  25. exit 1
  26. }
  27. EOF
  28. exit 0