tpm2_getekcertificate.1 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. .\" Automatically generated by Pandoc 1.19.2.4
  2. .\"
  3. .TH "tpm2_getekcertificate" "1" "" "tpm2\-tools" "General Commands Manual"
  4. .hy
  5. .SH NAME
  6. .PP
  7. \f[B]tpm2_getekcertificate\f[](1) \- Retrieve the Endorsement key
  8. Certificate.
  9. .SH SYNOPSIS
  10. .PP
  11. \f[B]tpm2_getekcertificate\f[] [\f[I]OPTIONS\f[]] [\f[I]ARGUMENT\f[]]
  12. .SH DESCRIPTION
  13. .PP
  14. \f[B]tpm2_getekcertificate\f[](1) \- Retrieve the endorsement key
  15. certificate.
  16. The certificate is present either on the TCG specified TPM NV indices OR
  17. on the TPM manufacturer\[aq]s endorsement certificate hosting server.
  18. Following are the conditions dictating the certificate location lookup.
  19. .IP "1." 3
  20. NV\-Index:
  21. .RS 4
  22. .PP
  23. Default search location when \f[B]ARGUMENT\f[] is not specified.
  24. .RE
  25. .IP "2." 3
  26. Intel\-EK\-certificate\-server:
  27. .RS 4
  28. .PP
  29. Search location when EK certificate could not be found in the NV index
  30. AND tpmEPSgenerated bit is CLEAR AND manufacturer is INTC.
  31. .RE
  32. .IP "3." 3
  33. Intel\-EK\-Re\-certification\-server:
  34. .RS 4
  35. .PP
  36. Search location when EK certificate could not be found in the NV index
  37. AND tpmEPSgenerated bit is SET AND manufacturer is INTC.
  38. .PP
  39. Note:
  40. .PP
  41. In this operation information is provided regarding additional software
  42. to be run as part of the re\-provisioning/ re\-certification service.
  43. .PP
  44. After re\-provisioning/ recertification process is complete, EK
  45. certificates can be read from the NV indexes by running another instance
  46. of \f[B]tpm2_getekcertificate\f[].
  47. .RE
  48. .IP "4." 3
  49. Generic or other EK\-certificate\-server:
  50. .RS 4
  51. .PP
  52. Search location when \f[B]ARGUMENT\f[] specifies the EK certificate web
  53. hosting address.
  54. .RE
  55. .SH OPTIONS
  56. .IP \[bu] 2
  57. \f[B]\-o\f[], \f[B]\-\-ek\-certificate\f[]=\f[I]FILE\f[] or
  58. \f[I]STDOUT\f[]:
  59. .RS 2
  60. .PP
  61. The file to save the Endorsement key certificate.
  62. When EK certificates are found in the TPM NV indices, this option can be
  63. specified additional times to save the RSA and ECC EK certificates in
  64. order.
  65. The tool will warn if additional EK certificates are found on the TPM NV
  66. indices and only a single output file is specified.
  67. If the option isn\[aq]t specified all the EK certificates retrieved
  68. either from the manufacturer web hosting or from the TPM NV indices, are
  69. output to stdout.
  70. .RE
  71. .IP \[bu] 2
  72. \f[B]\-X\f[], \f[B]\-\-allow\-unverified\f[]:
  73. .RS 2
  74. .PP
  75. Specifies to attempt connecting with the TPM manufacturer provisioning
  76. server without verifying server certificate.
  77. This option is irrelevant when EK certificates are found on the TPM NV
  78. indices.
  79. .PP
  80. \f[B]WARNING\f[]: This option should be used only on platforms with
  81. older CA certificates.
  82. .RE
  83. .IP \[bu] 2
  84. \f[B]\-u\f[], \f[B]\-\-ek\-public\f[]=\f[I]FILE\f[]:
  85. .RS 2
  86. .PP
  87. Specifies the file path for the endorsement key public portion in tss
  88. format.
  89. .RE
  90. .IP \[bu] 2
  91. \f[B]\-x\f[], \f[B]\-\-offline\f[]:
  92. .RS 2
  93. .PP
  94. This flags the tool to operate in an offline mode.
  95. In that the certificates can be retrieved for supplied EK public that do
  96. not belong to the platform the tool is run on.
  97. Useful in factory provisioning of multiple platforms that are not
  98. individually connected to the Internet.
  99. In such a scenario a single Internet facing provisioning server can
  100. utilize this tool in this mode.
  101. This forces the tool to not look for the EK certificates on the NV
  102. indices.
  103. .RE
  104. .IP \[bu] 2
  105. \f[B]\-\-raw\f[]:
  106. .RS 2
  107. .PP
  108. This flags the tool to output the EK certificate as is received from the
  109. source: NV/ Web\-Hosting.
  110. .RE
  111. .IP \[bu] 2
  112. \f[B]ARGUMENT\f[] the command line argument specifies the URL address
  113. for the EK certificate portal.
  114. This forces the tool to not look for the EK certificates on the NV
  115. indices.
  116. .SS References
  117. .SH COMMON OPTIONS
  118. .PP
  119. This collection of options are common to many programs and provide
  120. information that many users may expect.
  121. .IP \[bu] 2
  122. \f[B]\-h\f[], \f[B]\-\-help=[man|no\-man]\f[]: Display the tools
  123. manpage.
  124. By default, it attempts to invoke the manpager for the tool, however, on
  125. failure will output a short tool summary.
  126. This is the same behavior if the "man" option argument is specified,
  127. however if explicit "man" is requested, the tool will provide errors
  128. from man on stderr.
  129. If the "no\-man" option if specified, or the manpager fails, the short
  130. options will be output to stdout.
  131. .RS 2
  132. .PP
  133. To successfully use the manpages feature requires the manpages to be
  134. installed or on \f[I]MANPATH\f[], See man(1) for more details.
  135. .RE
  136. .IP \[bu] 2
  137. \f[B]\-v\f[], \f[B]\-\-version\f[]: Display version information for this
  138. tool, supported tctis and exit.
  139. .IP \[bu] 2
  140. \f[B]\-V\f[], \f[B]\-\-verbose\f[]: Increase the information that the
  141. tool prints to the console during its execution.
  142. When using this option the file and line number are printed.
  143. .IP \[bu] 2
  144. \f[B]\-Q\f[], \f[B]\-\-quiet\f[]: Silence normal tool output to stdout.
  145. .IP \[bu] 2
  146. \f[B]\-Z\f[], \f[B]\-\-enable\-errata\f[]: Enable the application of
  147. errata fixups.
  148. Useful if an errata fixup needs to be applied to commands sent to the
  149. TPM.
  150. Defining the environment TPM2TOOLS_ENABLE_ERRATA is equivalent.
  151. information many users may expect.
  152. .SH TCTI Configuration
  153. .PP
  154. The TCTI or "Transmission Interface" is the communication mechanism with
  155. the TPM.
  156. TCTIs can be changed for communication with TPMs across different
  157. mediums.
  158. .PP
  159. To control the TCTI, the tools respect:
  160. .IP "1." 3
  161. The command line option \f[B]\-T\f[] or \f[B]\-\-tcti\f[]
  162. .IP "2." 3
  163. The environment variable: \f[I]TPM2TOOLS_TCTI\f[].
  164. .PP
  165. \f[B]Note:\f[] The command line option always overrides the environment
  166. variable.
  167. .PP
  168. The current known TCTIs are:
  169. .IP \[bu] 2
  170. tabrmd \- The resource manager, called
  171. tabrmd (https://github.com/tpm2-software/tpm2-abrmd).
  172. Note that tabrmd and abrmd as a tcti name are synonymous.
  173. .IP \[bu] 2
  174. mssim \- Typically used for communicating to the TPM software simulator.
  175. .IP \[bu] 2
  176. device \- Used when talking directly to a TPM device file.
  177. .IP \[bu] 2
  178. none \- Do not initalize a connection with the TPM.
  179. Some tools allow for off\-tpm options and thus support not using a TCTI.
  180. Tools that do not support it will error when attempted to be used
  181. without a TCTI connection.
  182. Does not support \f[I]ANY\f[] options and \f[I]MUST BE\f[] presented as
  183. the exact text of "none".
  184. .PP
  185. The arguments to either the command line option or the environment
  186. variable are in the form:
  187. .PP
  188. \f[C]<tcti\-name>:<tcti\-option\-config>\f[]
  189. .PP
  190. Specifying an empty string for either the \f[C]<tcti\-name>\f[] or
  191. \f[C]<tcti\-option\-config>\f[] results in the default being used for
  192. that portion respectively.
  193. .SS TCTI Defaults
  194. .PP
  195. When a TCTI is not specified, the default TCTI is searched for using
  196. \f[I]dlopen(3)\f[] semantics.
  197. The tools will search for \f[I]tabrmd\f[], \f[I]device\f[] and
  198. \f[I]mssim\f[] TCTIs \f[B]IN THAT ORDER\f[] and \f[B]USE THE FIRST ONE
  199. FOUND\f[].
  200. You can query what TCTI will be chosen as the default by using the
  201. \f[B]\-v\f[] option to print the version information.
  202. The "default\-tcti" key\-value pair will indicate which of the
  203. aforementioned TCTIs is the default.
  204. .SS Custom TCTIs
  205. .PP
  206. Any TCTI that implements the dynamic TCTI interface can be loaded.
  207. The tools internally use \f[I]dlopen(3)\f[], and the raw
  208. \f[I]tcti\-name\f[] value is used for the lookup.
  209. Thus, this could be a path to the shared library, or a library name as
  210. understood by \f[I]dlopen(3)\f[] semantics.
  211. .SH TCTI OPTIONS
  212. .PP
  213. This collection of options are used to configure the various known TCTI
  214. modules available:
  215. .IP \[bu] 2
  216. \f[B]device\f[]: For the device TCTI, the TPM character device file for
  217. use by the device TCTI can be specified.
  218. The default is \f[I]/dev/tpm0\f[].
  219. .RS 2
  220. .PP
  221. Example: \f[B]\-T device:/dev/tpm0\f[] or \f[B]export
  222. \f[I]TPM2TOOLS_TCTI\f[]="device:/dev/tpm0"\f[]
  223. .RE
  224. .IP \[bu] 2
  225. \f[B]mssim\f[]: For the mssim TCTI, the domain name or IP address and
  226. port number used by the simulator can be specified.
  227. The default are 127.0.0.1 and 2321.
  228. .RS 2
  229. .PP
  230. Example: \f[B]\-T mssim:host=localhost,port=2321\f[] or \f[B]export
  231. \f[I]TPM2TOOLS_TCTI\f[]="mssim:host=localhost,port=2321"\f[]
  232. .RE
  233. .IP \[bu] 2
  234. \f[B]abrmd\f[]: For the abrmd TCTI, the configuration string format is a
  235. series of simple key value pairs separated by a \[aq],\[aq] character.
  236. Each key and value string are separated by a \[aq]=\[aq] character.
  237. .RS 2
  238. .IP \[bu] 2
  239. TCTI abrmd supports two keys:
  240. .RS 2
  241. .IP "1." 3
  242. \[aq]bus_name\[aq] : The name of the tabrmd service on the bus (a
  243. string).
  244. .IP "2." 3
  245. \[aq]bus_type\[aq] : The type of the dbus instance (a string) limited to
  246. \[aq]session\[aq] and \[aq]system\[aq].
  247. .RE
  248. .PP
  249. Specify the tabrmd tcti name and a config string of
  250. \f[C]bus_name=com.example.FooBar\f[]:
  251. .PP
  252. \f[C]\\\-\-tcti=tabrmd:bus_name=com.example.FooBar\f[]
  253. .PP
  254. Specify the default (abrmd) tcti and a config string of
  255. \f[C]bus_type=session\f[]:
  256. .PP
  257. \f[C]\\\-\-tcti:bus_type=session\f[]
  258. .PP
  259. \f[B]NOTE\f[]: abrmd and tabrmd are synonymous.
  260. the various known TCTI modules.
  261. .RE
  262. .SH NOTES
  263. .PP
  264. When the verbose option is specified, additional curl debugging
  265. information is provided by setting the curl mode verbose, see
  266. <https://curl.haxx.se/libcurl/c/CURLOPT_VERBOSE.html> for more
  267. information.
  268. .SH EXAMPLES
  269. .SS Retrieve EK certificate from TPM manufacturer backend by supplying
  270. EK public.
  271. .IP
  272. .nf
  273. \f[C]
  274. tpm2_createek\ \-G\ rsa\ \-u\ ek.pub\ \-c\ key.ctx
  275. tpm2_getekcertificate\ \-X\ \-o\ ECcert.bin\ \-u\ ek.pub\ \\
  276. https://tpm.manufacturer.com/ekcertserver/
  277. \f[]
  278. .fi
  279. .SS Retrieve EK certificate from Intel backend if certificate not found
  280. on NV.
  281. .IP
  282. .nf
  283. \f[C]
  284. tpm2_createek\ \-G\ rsa\ \-u\ ek.pub\ \-c\ key.ctx
  285. tpm2_getekcertificate\ \-X\ \-o\ ECcert.bin\ \-u\ ek.pub
  286. \f[]
  287. .fi
  288. .SS Retrieve EK certificate from Intel backend for an offline platform.
  289. .IP
  290. .nf
  291. \f[C]
  292. tpm2_getekcertificate\ \-X\ \-x\ \-o\ ECcert.bin\ \-u\ ek.pub
  293. \f[]
  294. .fi
  295. .SS Retrieve EK certificate from TPM NV indices only, fail otherwise.
  296. .IP
  297. .nf
  298. \f[C]
  299. tpm2_getekcertificate\ \-o\ ECcert.bin
  300. \f[]
  301. .fi
  302. .SS Retrieve multiple EK certificates from TPM NV indices only, fail
  303. otherwise.
  304. .IP
  305. .nf
  306. \f[C]
  307. tpm2_getekcertificate\ \-o\ RSA_EK_cert.bin\ \-o\ ECC_EK_cert.bin
  308. \f[]
  309. .fi
  310. .SH Returns
  311. .PP
  312. Tools can return any of the following codes:
  313. .IP \[bu] 2
  314. 0 \- Success.
  315. .IP \[bu] 2
  316. 1 \- General non\-specific error.
  317. .IP \[bu] 2
  318. 2 \- Options handling error.
  319. .IP \[bu] 2
  320. 3 \- Authentication error.
  321. .IP \[bu] 2
  322. 4 \- TCTI related error.
  323. .IP \[bu] 2
  324. 5 \- Non supported scheme.
  325. Applicable to tpm2_testparams.
  326. .SH BUGS
  327. .PP
  328. Github Issues (https://github.com/tpm2-software/tpm2-tools/issues)
  329. .SH HELP
  330. .PP
  331. See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)