swtpm/tests/test_save_load_encrypted_state_2
Stefan Berger 05cd79b843 Support read()/write() for TPM state blob transfer
Support the read/write interface and POSIX API calls for transfer of
TPM state blobs.

Extend the swtpm_ioctl program to support this as well. Use the
environment variable SWTPM_IOCTL_BUFFERSIZE to set the size of the
buffer to use and enable the read/write interface in this (test)
program.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-06-04 18:49:25 -04:00

19 lines
420 B
Bash
Executable File

#!/bin/bash
# Run the test_save_load_encrypted_state with swtpm_ioctl using the
# read/write interface rather than ioctl
export VTPM_NAME="vtpm-test2-save-load-encrypted-state"
cd "$(dirname "$0")"
export SWTPM_IOCTL_BUFFERSIZE=100
bash test_save_load_encrypted_state
ret=$?
[ $ret -ne 0 ] && exit $ret
export SWTPM_IOCTL_BUFFERSIZE=4096
bash test_save_load_encrypted_state
ret=$?
[ $ret -ne 0 ] && exit $ret
exit 0