1tpm2_sessionconfig(1) General Commands Manual tpm2_sessionconfig(1)
2
3
4
6 tpm2_sessionconfig(1) - Configure session attributes and print session
7 info from a session file.
8
10 tpm2_sessionconfig [OPTIONS] [ARGUMENT]
11
13 tpm2_sessionconfig(1) - Configure session attributes and print session
14 info from a session file.
15
16 The tool operates in one of two modes: 1. Configure/ modify the ses‐
17 sion attributes. 2. Print the session information. This is the de‐
18 fault behavior.
19
21 • --enable-continuesession:
22
23 Enable continueSession in the session-attributes.
24
25 • --disable-continuesession
26
27 Disable continuesession in the session-attributes.
28
29 • --enable-auditexclusive
30
31 Enable auditexclusive in the session-attributes.
32
33 • --disable-auditexclusive
34
35 Disable auditexclusive in the session-attributes.
36
37 • --enable-auditreset
38
39 Enable auditreset in the session-attributes.
40
41 • --disable-auditreset
42
43 Disable auditreset in the session-attributes.
44
45 • --enable-decrypt
46
47 Enable decrypt in the session-attributes.
48
49 • --disable-decrypt
50
51 Disable decrypt in the session-attributes.
52
53 • --enable-encrypt
54
55 Enable encrypt in the session-attributes.
56
57 • --disable-encrypt
58
59 Disable encrypt in the session-attributes.
60
61 • --enable-audit
62
63 Enable audit in the session-attributes.
64
65 • --disable-audit
66
67 Disable audit in the session-attributes.
68
69 • ARGUMENT the session context file.
70
71 References
73 This collection of options are common to many programs and provide in‐
74 formation that many users may expect.
75
76 • -h, --help=[man|no-man]: Display the tools manpage. By default, it
77 attempts to invoke the manpager for the tool, however, on failure
78 will output a short tool summary. This is the same behavior if the
79 “man” option argument is specified, however if explicit “man” is re‐
80 quested, the tool will provide errors from man on stderr. If the
81 “no-man” option if specified, or the manpager fails, the short op‐
82 tions will be output to stdout.
83
84 To successfully use the manpages feature requires the manpages to be
85 installed or on MANPATH, See man(1) for more details.
86
87 • -v, --version: Display version information for this tool, supported
88 tctis and exit.
89
90 • -V, --verbose: Increase the information that the tool prints to the
91 console during its execution. When using this option the file and
92 line number are printed.
93
94 • -Q, --quiet: Silence normal tool output to stdout.
95
96 • -Z, --enable-errata: Enable the application of errata fixups. Useful
97 if an errata fixup needs to be applied to commands sent to the TPM.
98 Defining the environment TPM2TOOLS_ENABLE_ERRATA is equivalent. in‐
99 formation many users may expect.
100
102 The TCTI or “Transmission Interface” is the communication mechanism
103 with the TPM. TCTIs can be changed for communication with TPMs across
104 different mediums.
105
106 To control the TCTI, the tools respect:
107
108 1. The command line option -T or --tcti
109
110 2. The environment variable: TPM2TOOLS_TCTI.
111
112 Note: The command line option always overrides the environment vari‐
113 able.
114
115 The current known TCTIs are:
116
117 • tabrmd - The resource manager, called tabrmd
118 (https://github.com/tpm2-software/tpm2-abrmd). Note that tabrmd and
119 abrmd as a tcti name are synonymous.
120
121 • mssim - Typically used for communicating to the TPM software simula‐
122 tor.
123
124 • device - Used when talking directly to a TPM device file.
125
126 • none - Do not initalize a connection with the TPM. Some tools allow
127 for off-tpm options and thus support not using a TCTI. Tools that do
128 not support it will error when attempted to be used without a TCTI
129 connection. Does not support ANY options and MUST BE presented as
130 the exact text of “none”.
131
132 The arguments to either the command line option or the environment
133 variable are in the form:
134
135 <tcti-name>:<tcti-option-config>
136
137 Specifying an empty string for either the <tcti-name> or <tcti-op‐
138 tion-config> results in the default being used for that portion respec‐
139 tively.
140
141 TCTI Defaults
142 When a TCTI is not specified, the default TCTI is searched for using
143 dlopen(3) semantics. The tools will search for tabrmd, device and
144 mssim TCTIs IN THAT ORDER and USE THE FIRST ONE FOUND. You can query
145 what TCTI will be chosen as the default by using the -v option to print
146 the version information. The “default-tcti” key-value pair will indi‐
147 cate which of the aforementioned TCTIs is the default.
148
149 Custom TCTIs
150 Any TCTI that implements the dynamic TCTI interface can be loaded. The
151 tools internally use dlopen(3), and the raw tcti-name value is used for
152 the lookup. Thus, this could be a path to the shared library, or a li‐
153 brary name as understood by dlopen(3) semantics.
154
156 This collection of options are used to configure the various known TCTI
157 modules available:
158
159 • device: For the device TCTI, the TPM character device file for use by
160 the device TCTI can be specified. The default is /dev/tpm0.
161
162 Example: -T device:/dev/tpm0 or export TPM2TOOLS_TCTI=“de‐
163 vice:/dev/tpm0”
164
165 • mssim: For the mssim TCTI, the domain name or IP address and port
166 number used by the simulator can be specified. The default are
167 127.0.0.1 and 2321.
168
169 Example: -T mssim:host=localhost,port=2321 or export TPM2TOOLS_TC‐
170 TI=“mssim:host=localhost,port=2321”
171
172 • abrmd: For the abrmd TCTI, the configuration string format is a se‐
173 ries of simple key value pairs separated by a `,' character. Each
174 key and value string are separated by a `=' character.
175
176 • TCTI abrmd supports two keys:
177
178 1. `bus_name' : The name of the tabrmd service on the bus (a
179 string).
180
181 2. `bus_type' : The type of the dbus instance (a string) limited to
182 `session' and `system'.
183
184 Specify the tabrmd tcti name and a config string of bus_name=com.ex‐
185 ample.FooBar:
186
187 \--tcti=tabrmd:bus_name=com.example.FooBar
188
189 Specify the default (abrmd) tcti and a config string of bus_type=ses‐
190 sion:
191
192 \--tcti:bus_type=session
193
194 NOTE: abrmd and tabrmd are synonymous. the various known TCTI mod‐
195 ules.
196
198 Start a bounded & salted session, disable continuesession and display ses‐
199 sion
200 tpm2 createprimary -c prim.ctx
201 tpm2 startauthsession -S session.ctx --policy-session -c prim.ctx
202
203 ### Session info before changing attributes
204 tpm2 sessionconfig session.ctx
205
206 ### Session info after changing attributes
207 tpm2 sessionconfig --disable-continuesession
208 tpm2 sessionconfig session.ctx
209
211 Tools can return any of the following codes:
212
213 • 0 - Success.
214
215 • 1 - General non-specific error.
216
217 • 2 - Options handling error.
218
219 • 3 - Authentication error.
220
221 • 4 - TCTI related error.
222
223 • 5 - Non supported scheme. Applicable to tpm2_testparams.
224
226 Github Issues (https://github.com/tpm2-software/tpm2-tools/issues)
227
229 See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)
230
231
232
233tpm2-tools tpm2_sessionconfig(1)