feature/tpm: check TPM family data for compatibility (#17624)
Check that the TPM we have opened is advertised as a 2.0 family device before using it for state sealing / hardware attestation. Updates #17622 Signed-off-by: Patrick O'Doherty <patrick@tailscale.com>
This commit is contained in:
committed by
GitHub
parent
afaa23c3b4
commit
36ad24b20f
@@ -133,6 +133,19 @@ func TestStore(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkInfo(b *testing.B) {
|
||||
b.StopTimer()
|
||||
skipWithoutTPM(b)
|
||||
b.StartTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
hi := info()
|
||||
if hi == nil {
|
||||
b.Fatalf("tpm info error")
|
||||
}
|
||||
}
|
||||
b.StopTimer()
|
||||
}
|
||||
|
||||
func BenchmarkStore(b *testing.B) {
|
||||
skipWithoutTPM(b)
|
||||
b.StopTimer()
|
||||
|
||||
Reference in New Issue
Block a user