tpm2_sessionconfig.1 7.9 KB

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