% tpm2_tr_encode(1) tpm2-tools | General Commands Manual
tpm2_tr_encode(1) - Encodes a peristent handle and TPM2B_NAME
as a serialized ESYS_TR
as
output.
tpm2_tr_encode [OPTIONS]
tpm2_tr_encode(1) - Encodes a peristent TPM2 handle along with a populated TPM2B_PUBLIC
as
a serialized ESYS_TR
. This is useful for moving a public and handle from one environment
where a TPM is not available to another environment with a TPM and make use of it through the
ESAPI API or tpm2-tools(1).
-
-c, --object-context=OBJECT:
Persistent handle.
Public key format.
-
-o, --output=FILE:
The output file path, recording the serialized
ESYS_TR
.
context object format details the methods for specifying OBJECT.
common options collection of common options that provide information many users may expect.
common tcti options collection of options used to configure the various known TCTI modules.
tpm2_createprimary -c primary.ctx
tpm2_evictcontrol -c primary.ctx -o primary.tr 0x81000002
tpm2_readpublic -c primary.tr -o primary.pub
tpm2_tr_encode -c 0x81000002 -u primary.pub -o primary2.tr