TianoCore EDK2 master
|
#include <IndustryStandard/UefiTcgPlatform.h>
#include <Library/Tpm2CommandLib.h>
#include <Library/Tpm2DeviceLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
Go to the source code of this file.
Data Structures | |
struct | INTERNAL_HASH_INFO |
Functions | |
UINT16 EFIAPI | GetHashSizeFromAlgo (IN TPMI_ALG_HASH HashAlgo) |
UINT32 EFIAPI | GetHashMaskFromAlgo (IN TPMI_ALG_HASH HashAlgo) |
UINT32 EFIAPI | CopyAuthSessionCommand (IN TPMS_AUTH_COMMAND *AuthSessionIn OPTIONAL, OUT UINT8 *AuthSessionOut) |
UINT32 EFIAPI | CopyAuthSessionResponse (IN UINT8 *AuthSessionIn, OUT TPMS_AUTH_RESPONSE *AuthSessionOut OPTIONAL) |
BOOLEAN EFIAPI | IsHashAlgSupportedInHashAlgorithmMask (IN TPMI_ALG_HASH HashAlg, IN UINT32 HashAlgorithmMask) |
VOID *EFIAPI | CopyDigestListToBuffer (IN OUT VOID *Buffer, IN TPML_DIGEST_VALUES *DigestList, IN UINT32 HashAlgorithmMask) |
UINT32 EFIAPI | GetDigestListSize (IN TPML_DIGEST_VALUES *DigestList) |
EFI_STATUS EFIAPI | GetDigestFromDigestList (IN TPMI_ALG_HASH HashAlg, IN TPML_DIGEST_VALUES *DigestList, OUT VOID *Digest) |
Variables | |
STATIC INTERNAL_HASH_INFO | mHashInfo [] |
Implement TPM2 help.
Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Tpm2Help.c.
UINT32 EFIAPI CopyAuthSessionCommand | ( | IN TPMS_AUTH_COMMAND *AuthSessionIn | OPTIONAL, |
OUT UINT8 * | AuthSessionOut | ||
) |
Copy AuthSessionIn to TPM2 command buffer.
[in] | AuthSessionIn | Input AuthSession data |
[out] | AuthSessionOut | Output AuthSession data in TPM2 command buffer |
Definition at line 88 of file Tpm2Help.c.
UINT32 EFIAPI CopyAuthSessionResponse | ( | IN UINT8 * | AuthSessionIn, |
OUT TPMS_AUTH_RESPONSE *AuthSessionOut | OPTIONAL | ||
) |
Copy AuthSessionIn from TPM2 response buffer.
[in] | AuthSessionIn | Input AuthSession data in TPM2 response buffer |
[out] | AuthSessionOut | Output AuthSession data |
Definition at line 154 of file Tpm2Help.c.
VOID *EFIAPI CopyDigestListToBuffer | ( | IN OUT VOID * | Buffer, |
IN TPML_DIGEST_VALUES * | DigestList, | ||
IN UINT32 | HashAlgorithmMask | ||
) |
Copy TPML_DIGEST_VALUES into a buffer
[in,out] | Buffer | Buffer to hold copied TPML_DIGEST_VALUES compact binary. |
[in] | DigestList | TPML_DIGEST_VALUES to be copied. |
[in] | HashAlgorithmMask | HASH bits corresponding to the desired digests to copy. |
Definition at line 260 of file Tpm2Help.c.
EFI_STATUS EFIAPI GetDigestFromDigestList | ( | IN TPMI_ALG_HASH | HashAlg, |
IN TPML_DIGEST_VALUES * | DigestList, | ||
OUT VOID * | Digest | ||
) |
This function get digest from digest list.
[in] | HashAlg | Digest algorithm |
[in] | DigestList | Digest list |
[out] | Digest | Digest |
EFI_SUCCESS | Digest is found and returned. |
EFI_NOT_FOUND | Digest is not found. |
Definition at line 331 of file Tpm2Help.c.
UINT32 EFIAPI GetDigestListSize | ( | IN TPML_DIGEST_VALUES * | DigestList | ) |
Get TPML_DIGEST_VALUES data size.
[in] | DigestList | TPML_DIGEST_VALUES data. |
Definition at line 302 of file Tpm2Help.c.
UINT32 EFIAPI GetHashMaskFromAlgo | ( | IN TPMI_ALG_HASH | HashAlgo | ) |
Get hash mask from algorithm.
[in] | HashAlgo | Hash algorithm |
Definition at line 63 of file Tpm2Help.c.
UINT16 EFIAPI GetHashSizeFromAlgo | ( | IN TPMI_ALG_HASH | HashAlgo | ) |
Return size of digest.
[in] | HashAlgo | Hash algorithm |
Definition at line 39 of file Tpm2Help.c.
BOOLEAN EFIAPI IsHashAlgSupportedInHashAlgorithmMask | ( | IN TPMI_ALG_HASH | HashAlg, |
IN UINT32 | HashAlgorithmMask | ||
) |
Return if hash alg is supported in HashAlgorithmMask.
HashAlg | Hash algorithm to be checked. |
HashAlgorithmMask | Bitfield of allowed hash algorithms. |
TRUE | Hash algorithm is supported. |
FALSE | Hash algorithm is not supported. |
Definition at line 208 of file Tpm2Help.c.
STATIC INTERNAL_HASH_INFO mHashInfo[] |
Definition at line 22 of file Tpm2Help.c.