tpm2_pcrextend.1 7.3 KB

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