tpm2_getcap.1 7.5 KB

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