Documentation ¶
Overview ¶
Package tpm reads and extends pcrs with measurements.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtendPCR ¶
func ExtendPCR(tpmHandle io.ReadWriteCloser, pcr int, hash []byte) error
* ExtendPCR writes the measurements passed as 'hash' arg to pcr#x, * where x is provided by 'pcr' arg. * * pcr is owned by 'tpm2Handle', a tpm device handle. * err is returned if write to pcr fails.
func ExtendPCRDebug ¶
* ExtendPCRDebug extends a PCR with the contents of a byte slice * and notifies the kernel of this measurement by sending event via sysfs. * * In debug mode, it prints * 1. old pcr value before the hash is written to pcr * 2. new pcr values after hash is written to pcr * 3. compares old and new pcr values and prints error if they are not
func GetHandle ¶
func GetHandle() (io.ReadWriteCloser, error)
* GetHandle returns a tpm device handle from go-tpm/tpm2 * returns a tpm handle from go-tpm/tpm2 * that can be used for storing hashes.
Types ¶
This section is empty.