| 1 |
# attest-tool |
| 2 |
|
| 3 |
`attest-tool` is a simple utility to exercise attestation-related operations on your system. |
| 4 |
|
| 5 |
## Building attest-tool |
| 6 |
|
| 7 |
If your system has git and a [Go 1.15+ compiler](https://golang.org/dl/) installed, you can |
| 8 |
install `attest-tool` from source by running the following commands: |
| 9 |
|
| 10 |
```shell |
| 11 |
git clone 'https://github.com/google/go-attestation' && cd go-attestation/attest/attest-tool |
| 12 |
go build -o attest-tool ./ # compiled to ./attest-tool |
| 13 |
``` |
| 14 |
|
| 15 |
## Testing attestation readiness |
| 16 |
|
| 17 |
The main use-case of `attest-tool` is testing whether attestation works on the local system. |
| 18 |
|
| 19 |
Once `attest-tool` has been built, you can run it in self-test mode like this: |
| 20 |
|
| 21 |
```shell |
| 22 |
./attest-tool self-test |
| 23 |
``` |
| 24 |
|
| 25 |
After a few seconds, it should print out a 'PASS' message, or a 'FAIL' message with a |
| 26 |
description of what went wrong. |
| 27 |
|
| 28 |
On Linux, `attest-tool` either needs to be run as root, or granted access to the TPM (`/dev/tpmrm0`) device |
| 29 |
& event log (`/sys/kernel/security/tpm0/binary_bios_measurements`) |