Skip to content

Commit

Permalink
SecurityPkg: Update format to pass CI
Browse files Browse the repository at this point in the history
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
  • Loading branch information
Wenxing-hou authored and jyao1 committed Feb 22, 2024
1 parent 766d691 commit 797e1d3
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @file
# SPDM library.
#
# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @file
# SPDM library.
#
# Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ libspdm_sleep (
* @param microseconds The time interval for which execution is to be suspended, in milliseconds.
*
**/
void libspdm_sleep_in_us(uint64_t microseconds)
void
libspdm_sleep_in_us (
uint64_t microseconds
)
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @file
# SPDM library.
#
# Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Protocol/Tcg2Protocol.h>

typedef struct {
EFI_GUID Guid;
UINT32 Mask;
EFI_GUID Guid;
UINT32 Mask;
} TPM2_HASH_MASK;

TPM2_HASH_MASK mTpm2HashMask[] = {
{HASH_ALGORITHM_SHA1_GUID, HASH_ALG_SHA1},
{HASH_ALGORITHM_SHA256_GUID, HASH_ALG_SHA256},
{HASH_ALGORITHM_SHA384_GUID, HASH_ALG_SHA384},
{HASH_ALGORITHM_SHA512_GUID, HASH_ALG_SHA512},
{HASH_ALGORITHM_SM3_256_GUID, HASH_ALG_SM3_256},
TPM2_HASH_MASK mTpm2HashMask[] = {
{ HASH_ALGORITHM_SHA1_GUID, HASH_ALG_SHA1 },
{ HASH_ALGORITHM_SHA256_GUID, HASH_ALG_SHA256 },
{ HASH_ALGORITHM_SHA384_GUID, HASH_ALG_SHA384 },
{ HASH_ALGORITHM_SHA512_GUID, HASH_ALG_SHA512 },
{ HASH_ALGORITHM_SM3_256_GUID, HASH_ALG_SM3_256 },
};

/**
Expand All @@ -48,6 +48,7 @@ Tpm2GetHashMaskFromAlgo (
return mTpm2HashMask[Index].Mask;
}
}

return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,16 @@ HashCompleteAndExtend (
OUT TPML_DIGEST_VALUES *DigestList
)
{
TPML_DIGEST_VALUES Digest;
HASH_HANDLE *HashCtx;
UINTN Index;
EFI_STATUS Status;
UINT32 HashMask;
TPML_DIGEST_VALUES TcgPcrEvent2Digest;
EFI_TCG2_EVENT_ALGORITHM_BITMAP TpmHashAlgorithmBitmap;
UINT32 ActivePcrBanks;
UINT32 *BufferPtr;
UINT32 DigestListBinSize;
TPML_DIGEST_VALUES Digest;
HASH_HANDLE *HashCtx;
UINTN Index;
EFI_STATUS Status;
UINT32 HashMask;
TPML_DIGEST_VALUES TcgPcrEvent2Digest;
EFI_TCG2_EVENT_ALGORITHM_BITMAP TpmHashAlgorithmBitmap;
UINT32 ActivePcrBanks;
UINT32 *BufferPtr;
UINT32 DigestListBinSize;

if (mHashInterfaceCount == 0) {
return EFI_UNSUPPORTED;
Expand Down
1 change: 0 additions & 1 deletion SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,4 +1172,3 @@ Tpm2NvExtend (
ZeroMem (&RecvBuffer, sizeof (RecvBuffer));
return Status;
}

0 comments on commit 797e1d3

Please sign in to comment.