1tpm2_send(1)                General Commands Manual               tpm2_send(1)
2
3
4

NAME

6       tpm2_send(1) - Send a raw command buffer to the TPM.
7

SYNOPSIS

9       tpm2_send [OPTIONS]
10

DESCRIPTION

12       tpm2_send(1)  Sends a TPM command to the TPM.  The command is read from
13       a file as a binary stream and transmitted to the  TPM  using  the  TCTI
14       specified by the caller.  The response received from the TPM is written
15       to the output file.
16
17       Likely the caller will want to redirect this to a file or into  a  pro‐
18       gram to decode and display the response in a human readable form.
19

OPTIONS

21       · -o, –out-file=OUTPUT_FILE:
22
23         Output file to send response buffer to.  Defaults to stdout.
24

COMMON OPTIONS

26       This  collection of options are common to many programs and provide in‐
27       formation that many users may expect.
28
29       · -h, –help: Display the tools manpage.  This requires the manpages  to
30         be installed or on MANPATH, See man(1) for more details.
31
32       · -v,  –version:  Display  version information for this tool, supported
33         tctis and exit.
34
35       · -V, –verbose: Increase the information that the tool  prints  to  the
36         console  during  its  execution.  When using this option the file and
37         line number are printed.
38
39       · -Q, –quiet: Silence normal tool output to stdout.
40
41       · -Z, –enable-errata: Enable the application of errata fixups.   Useful
42         if  an  errata fixup needs to be applied to commands sent to the TPM.
43         # TCTI ENVIRONMENT
44
45       This collection of environment variables that may be used to  configure
46       the various TCTI modules available.
47
48       The  values  passed  through  these  variables  can  be overridden on a
49       per-command basis using the available command line options, see the TC‐
50       TI_OPTIONS section.
51
52       The variables respected depend on how the software was configured.
53
54       · TPM2TOOLS_TCTI_NAME:  Select the TCTI used for communication with the
55         next component down the TSS stack.  In most configurations this  will
56         be  the  TPM but it could be a simulator or proxy.  The current known
57         TCTIs are:
58
59         · tabrmd   -   The    new    resource    manager,    called    tabrmd
60           (https://github.com/01org/tpm2-abrmd).
61
62         · socket  -  Typically used with the old resource manager, or talking
63           directly to a simulator.
64
65         · device - Used when talking directly to a TPM device file.
66
67       · TPM2TOOLS_DEVICE_FILE: When using the device TCTI,  specify  the  TPM
68         device file.  The default is “/dev/tpm0”.
69
70         Note:  Using  the tpm directly requires the users to ensure that con‐
71         current access does not occur and that they manage the tpm resources.
72         These  tasks  are  usually managed by a resource manager.  Linux 4.12
73         and greater supports an in kernel resource manager  at  “/dev/tpmrm”,
74         typically “/dev/tpmrm0”.
75
76       · TPM2TOOLS_SOCKET_ADDRESS: When using the socket TCTI, specify the do‐
77         main name or IP address used.  The default is 127.0.0.1.
78
79       · TPM2TOOLS_SOCKET_PORT: When using the socket TCTI, specify  the  port
80         number used.  The default is 2321.
81

TCTI OPTIONS

83       This  collection  of options are used to configure the varous TCTI mod‐
84       ules available.  They override any environment variables.
85
86       · -T, –tcti=TCTI_NAME[:TCTI_OPTIONS]: Select the TCTI used for communi‐
87         cation  with the next component down the TSS stack.  In most configu‐
88         rations   this    will    be    the    resource    manager:    tabrmd
89         (https://github.com/01org/tpm2-abrmd)  Optionally,  tcti specific op‐
90         tions can appended to TCTI_NAME by appending a : to TCTI_NAME.
91
92         · For the device TCTI, the TPM device file for use by the device TCTI
93           can  be  specified.   The  default  is  /dev/tpm0.  Example: -T de‐
94           vice:/dev/tpm0
95
96         · For the socket TCTI, the domain name or IP address and port  number
97           used by the socket can be specified.  The default are 127.0.0.1 and
98           2321.  Example: -T socket:127.0.0.1:2321
99
100         · For the abrmd TCTI, it takes no options.  Example: -T abrmd
101

EXAMPLES

103       Send the contents of tpm2-command.bin to a device and collect  the  re‐
104       sponse  as  tpm2-response.bin.   All  examples of below accomplish this
105       task.
106
107              tpm2_send --tcti=device < tpm2-command.bin > tpm2-response.bin
108              tpm2_send --tcti=device -i tpm2-command.bin > tpm2-response.bin
109              tpm2_send --tcti=device < tpm2-command.bin -o tpm2-response.bin
110              tpm2_send --tcti=device -i tpm2-command.bin -o tpm2-response.bin
111

RETURNS

113       0 on success or 1 on failure.
114

BUGS

116       Github Issues (https://github.com/01org/tpm2-tools/issues)
117

HELP

119       See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)
120
121
122
123tpm2-tools                      SEPTEMBER 2017                    tpm2_send(1)
Impressum