[go: up one dir, main page]

File: tpm2_print.1.md

package info (click to toggle)
tpm2-tools 5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,396 kB
  • sloc: ansic: 35,984; sh: 12,809; xml: 8,089; makefile: 569
file content (82 lines) | stat: -rw-r--r-- 1,992 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
% tpm2_print(1) tpm2-tools | General Commands Manual

# NAME

**tpm2_print**(1) - Prints TPM data structures

# SYNOPSIS

**tpm2_print** [*OPTIONS*] [*ARGUMENT* or *STDIN*]

# DESCRIPTION

**tpm2_print**(1) - Decodes a TPM data structure and prints enclosed elements to
stdout as YAML. A file path containing a TPM object may be specified as the
path argument. Reads from stdin if unspecified.

# OPTIONS

  * **-t**, **\--type**:

    Required. Type of data structure. The option supports the following arguments:
      * **TPMS_ATTEST**
      * **TPMS_CONTEXT**
      * **TPM2B_PUBLIC**
      * **TPMT_PUBLIC**
  * **ARGUMENT** the command line argument specifies the path of the TPM data.

## References

[context object format](common/ctxobj.md) details the methods for specifying
_OBJECT_.

[authorization formatting](common/authorizations.md) details the methods for
specifying _AUTH_.

[common options](common/options.md) collection of common options that provide
information many users may expect.

[common tcti options](common/tcti.md) collection of options used to configure
the various known TCTI modules.

## References

[common options](common/options.md) collection of common options that provide
information many users may expect.

[common tcti options](common/tcti.md) collection of options used to configure
the various known TCTI modules.

# EXAMPLES

## Print a TPM Quote

### Setup a key to generate a qoute from
```bash
tpm2_createprimary -C e -c primary.ctx
tpm2_create -C primary.ctx -u key.pub -r key.priv
tpm2_load -C primary.ctx -u key.pub -r key.priv -c key.ctx
tpm2_quote -c key.ctx -l 0x0004:16,17,18+0x000b:16,17,18 -g sha256 -m msg.dat
```

### Print a Quote

```bash
tpm2_print -t TPMS_ATTEST msg.dat
```

### Print a public file

```bash
tpm2_print -t TPM2B_PUBLIC key.pub
```

### Print a tpmt public file
```bash
tpm2_readpublic -c key.ctx -f tpmt -o key.tpmt
tpm2_print -t TPMT_PUBLIC key.tpmt
```

[returns](common/returns.md)

[footer](common/footer.md)