tpm2_gettestresult.1 6.5 KB

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