mirror of
https://github.com/tpm2dev/tpm.dev.tutorials.git
synced 2024-11-09 08:52:11 +00:00
1.9 KiB
1.9 KiB
TPM2_PolicyTicket()
TPM2_PolicyTicket()
is very similar to
TPM2_PolicySigned()
, except that a
TPM-produced ticket is used instead of a signature made by some entity,
and the TPM acts as though the TPM2_PolicySigned()
or TPM2_PolicySecret()
command used to produce
the ticket had been executed instead of TPM2_PolicyTicket()
.
This is useful for avoiding excessive interactions with a user in a short period of time. E.g., prompting the user at most once every so many minutes for:
- a password,
- smartcard PIN entry,
- and/or biometrics identification.
Inputs
TPMI_SH_POLICY policySession
(handle to the session being extended)TPM2B_DIGEST cpHashA
(the command parameter hash of a single command to be authorized, orEmpty Buffer
to not so-limit the assertion)TPM2B_NONCE policyRef
(an opaque value of the caller's and/or signer's choosing that is used to limit the value of the signature and to extend thepolicySession
'spolicyDigest
along with theauthObject
's name)TPM2B_NAME authName
(the name of the object used in theTPM2_PolicySigned()
orTPM2_PolicySecret()
command that produced theticket
)INT32 expiration
(a positive or negative number of milliseconds which, if non-zero, sets an expiration for this assertion; if zero or positive then apolicyTicket
will not be output)TPMT_TK_AUTH ticket
(the ticket)