public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Amrathesh via groups.io" <amrathesh=arm.com@groups.io>
To: <devel@edk2.groups.io>
Subject: [edk2-devel] [PATCH v1 1/1] uefi-sct/SctPkg: TCG2 Protocol: Expand BSCap.HashAlgorithmBitmap check
Date: Thu, 16 Jan 2025 14:49:26 +0530	[thread overview]
Message-ID: <20250116091926.3071032-2-amrathesh@arm.com> (raw)
In-Reply-To: <20250116091926.3071032-1-amrathesh@arm.com>

Previously, the test only validated SHA-256 in
EFI_TCG2_BOOT_SERVICE_CAPABILITY.HashAlgorithmBitmap,
This update checks all supported SHA256-or-stronger algorithms.

Signed-off-by: Amrathesh <amrathesh@arm.com>
---
 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTestConformance.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTestConformance.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTestConformance.c
index 2a3cd6aa4f23..2f2314386f5f 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTestConformance.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTestConformance.c
@@ -1,7 +1,7 @@
 /** @file

   Copyright 2006 - 2016 Unified EFI, Inc.<BR>
-  Copyright (c) 2021 - 2023, Arm Inc. All rights reserved.<BR>
+  Copyright (c) 2021 - 2023, 2025 Arm Inc. All rights reserved.<BR>

   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
@@ -346,7 +346,10 @@ BBTestGetCapabilityConformanceTestCheckpoint2 (
     AssertionType = EFI_TEST_ASSERTION_FAILED;
   }

-  if (!(BootServiceCap.HashAlgorithmBitmap & EFI_TCG2_BOOT_HASH_ALG_SHA256)) {
+  // Verify if system supports SHA256, SHA384, or SHA512 hashing algorithm
+  EFI_TCG2_EVENT_ALGORITHM_BITMAP HashAlgoSupportBitmap = EFI_TCG2_BOOT_HASH_ALG_SHA256 | EFI_TCG2_BOOT_HASH_ALG_SHA384 | EFI_TCG2_BOOT_HASH_ALG_SHA512;
+
+  if (!(BootServiceCap.HashAlgorithmBitmap & HashAlgoSupportBitmap)) {
     StandardLib->RecordMessage (
                      StandardLib,
                      EFI_VERBOSE_LEVEL_DEFAULT,
--
2.25.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121029): https://edk2.groups.io/g/devel/message/121029
Mute This Topic: https://groups.io/mt/110712300/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2025-01-20 10:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16  9:19 [edk2-devel] [PATCH v1 0/1] uefi-sct/SctPkg: TCG2 Protocol: Expand BSCap.HashAlgorithmBitmap check Amrathesh via groups.io
2025-01-16  9:19 ` Amrathesh via groups.io [this message]
2025-01-22  4:19   ` [edk2-devel] [PATCH v1 1/1] " G Edhaya Chandran via groups.io

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250116091926.3071032-2-amrathesh@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox