-
Notifications
You must be signed in to change notification settings - Fork 0
/
tpm_flags.go
40 lines (37 loc) · 1.4 KB
/
tpm_flags.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package tpm
import "github.com/google/go-tpm/tpm2"
// This is from github.com/folbricht/tpmk
var stringToKeyAttribute = map[string]tpm2.KeyProp{
"fixedtpm": tpm2.FlagFixedTPM,
"fixedparent": tpm2.FlagFixedParent,
"sensitivedataorigin": tpm2.FlagSensitiveDataOrigin,
"userwithauth": tpm2.FlagUserWithAuth,
"adminwithpolicy": tpm2.FlagAdminWithPolicy,
"noda": tpm2.FlagNoDA,
"restricted": tpm2.FlagRestricted,
"decrypt": tpm2.FlagDecrypt,
"sign": tpm2.FlagSign,
}
var stringToNVAttribute = map[string]tpm2.NVAttr{
"ppwrite": tpm2.AttrPPWrite,
"ownerwrite": tpm2.AttrOwnerWrite,
"authwrite": tpm2.AttrAuthWrite,
"policywrite": tpm2.AttrPolicyWrite,
"policydelete": tpm2.AttrPolicyDelete,
"writelocked": tpm2.AttrWriteLocked,
"writeall": tpm2.AttrWriteAll,
"writedefine": tpm2.AttrWriteDefine,
"writestclear": tpm2.AttrWriteSTClear,
"globallock": tpm2.AttrGlobalLock,
"ppread": tpm2.AttrPPRead,
"ownerread": tpm2.AttrOwnerRead,
"authread": tpm2.AttrAuthRead,
"policyread": tpm2.AttrPolicyRead,
"noda": tpm2.AttrNoDA,
"orderly": tpm2.AttrOrderly,
"clearstclear": tpm2.AttrClearSTClear,
"readlocked": tpm2.AttrReadLocked,
"written": tpm2.AttrWritten,
"platformcreate": tpm2.AttrPlatformCreate,
"readstclear": tpm2.AttrReadSTClear,
}