TianoCore EDK2 master
Loading...
Searching...
No Matches
Tpm2EnhancedAuthorization.c File Reference

Go to the source code of this file.

Data Structures

struct  TPM2_POLICY_SECRET_COMMAND
 
struct  TPM2_POLICY_SECRET_RESPONSE
 
struct  TPM2_POLICY_OR_COMMAND
 
struct  TPM2_POLICY_OR_RESPONSE
 
struct  TPM2_POLICY_COMMAND_CODE_COMMAND
 
struct  TPM2_POLICY_COMMAND_CODE_RESPONSE
 
struct  TPM2_POLICY_GET_DIGEST_COMMAND
 
struct  TPM2_POLICY_GET_DIGEST_RESPONSE
 

Functions

EFI_STATUS EFIAPI Tpm2PolicySecret (IN TPMI_DH_ENTITY AuthHandle, IN TPMI_SH_POLICY PolicySession, IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL, IN TPM2B_NONCE *NonceTPM, IN TPM2B_DIGEST *CpHashA, IN TPM2B_NONCE *PolicyRef, IN INT32 Expiration, OUT TPM2B_TIMEOUT *Timeout, OUT TPMT_TK_AUTH *PolicyTicket)
 
EFI_STATUS EFIAPI Tpm2PolicyOR (IN TPMI_SH_POLICY PolicySession, IN TPML_DIGEST *HashList)
 
EFI_STATUS EFIAPI Tpm2PolicyCommandCode (IN TPMI_SH_POLICY PolicySession, IN TPM_CC Code)
 
EFI_STATUS EFIAPI Tpm2PolicyGetDigest (IN TPMI_SH_POLICY PolicySession, OUT TPM2B_DIGEST *PolicyHash)
 

Detailed Description

Implement TPM2 EnhancedAuthorization related command.

Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Tpm2EnhancedAuthorization.c.

Function Documentation

◆ Tpm2PolicyCommandCode()

EFI_STATUS EFIAPI Tpm2PolicyCommandCode ( IN TPMI_SH_POLICY  PolicySession,
IN TPM_CC  Code 
)

This command indicates that the authorization will be limited to a specific command code.

Parameters
[in]PolicySessionHandle for the policy session being extended.
[in]CodeThe allowed commandCode.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORThe command was unsuccessful.

Definition at line 290 of file Tpm2EnhancedAuthorization.c.

◆ Tpm2PolicyGetDigest()

EFI_STATUS EFIAPI Tpm2PolicyGetDigest ( IN TPMI_SH_POLICY  PolicySession,
OUT TPM2B_DIGEST PolicyHash 
)

This command returns the current policyDigest of the session. This command allows the TPM to be used to perform the actions required to precompute the authPolicy for an object.

Parameters
[in]PolicySessionHandle for the policy session.
[out]PolicyHashthe current value of the policyHash of policySession.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORThe command was unsuccessful.

Definition at line 347 of file Tpm2EnhancedAuthorization.c.

◆ Tpm2PolicyOR()

EFI_STATUS EFIAPI Tpm2PolicyOR ( IN TPMI_SH_POLICY  PolicySession,
IN TPML_DIGEST HashList 
)

This command allows options in authorizations without requiring that the TPM evaluate all of the options. If a policy may be satisfied by different sets of conditions, the TPM need only evaluate one set that satisfies the policy. This command will indicate that one of the required sets of conditions has been satisfied.

Parameters
[in]PolicySessionHandle for the policy session being extended.
[in]HashListthe list of hashes to check for a match.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORThe command was unsuccessful.

Definition at line 224 of file Tpm2EnhancedAuthorization.c.

◆ Tpm2PolicySecret()

EFI_STATUS EFIAPI Tpm2PolicySecret ( IN TPMI_DH_ENTITY  AuthHandle,
IN TPMI_SH_POLICY  PolicySession,
IN TPMS_AUTH_COMMAND *AuthSession  OPTIONAL,
IN TPM2B_NONCE NonceTPM,
IN TPM2B_DIGEST CpHashA,
IN TPM2B_NONCE PolicyRef,
IN INT32  Expiration,
OUT TPM2B_TIMEOUT Timeout,
OUT TPMT_TK_AUTH PolicyTicket 
)

This command includes a secret-based authorization to a policy. The caller proves knowledge of the secret value using an authorization session using the authValue associated with authHandle.

Parameters
[in]AuthHandleHandle for an entity providing the authorization
[in]PolicySessionHandle for the policy session being extended.
[in]AuthSessionAuth Session context
[in]NonceTPMThe policy nonce for the session.
[in]CpHashADigest of the command parameters to which this authorization is limited.
[in]PolicyRefA reference to a policy relating to the authorization.
[in]ExpirationTime when authorization will expire, measured in seconds from the time that nonceTPM was generated.
[out]TimeoutTime value used to indicate to the TPM when the ticket expires.
[out]PolicyTicketA ticket that includes a value indicating when the authorization expires.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORThe command was unsuccessful.

Definition at line 90 of file Tpm2EnhancedAuthorization.c.