mirror of
https://git.proxmox.com/git/libtpms
synced 2025-08-19 12:47:49 +00:00

Add a simple test case to make sure that reading the PCRs works as expected and that the state file is written as expected. This state file (NVChip) is only written because libtpms doesn't have any callbacks registered. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
14 lines
184 B
Plaintext
14 lines
184 B
Plaintext
|
|
# Get the size of a file in bytes
|
|
#
|
|
# @1: filename
|
|
function get_filesize()
|
|
{
|
|
if [[ "$(uname -s)" =~ (Linux|CYGWIN_NT-) ]]; then
|
|
stat -c%s $1
|
|
else
|
|
# OpenBSD
|
|
stat -f%z $1
|
|
fi
|
|
}
|