tpm2_selftest.1 6.7 KB

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