set -e source helpers.sh start_up CRYPTO_PROFILE="ECC" setup_fapi $CRYPTO_PROFILE function cleanup { # If this test is successful, no keys are created. Thus, command below will # always fail tss2 delete --path=/ || true shut_down } trap cleanup EXIT PW=abc PLAIN_TEXT=$TEMP_DIR/plaintext.file KEY_PATH="HS/SRK/myRSACrypt" ENCRYPTED_FILE=$TEMP_DIR/encrypted.file VERSION_FILE=$TEMP_DIR/version.file echo -n "Secret Text!" > $PLAIN_TEXT expect < $VERSION_FILE VERSION=$(cat $VERSION_FILE | cut -d'=' -f 4) size=${#VERSION} if [ $size -ge 129 ]; then echo "Error: Version length greater than 128 characters" ; exit 1 fi exit 0