Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeviceSecurityPkg: test exceed LIBSPDM_MAX_ROOT_CERT_SUPPORT. #337

Draft
wants to merge 106 commits into
base: DeviceSecurity
Choose a base branch
from
Draft
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
30123a4
EmulatorPkg/dsc: enlarge variable size.
jyao1 Jan 17, 2020
332b728
EmulatorPkg/dsc: Add release build.
jyao1 Mar 5, 2020
b3ab318
MdePkg/Include: Add SPDM1.1 support.
jyao1 Feb 26, 2020
66289c6
Add DeviceSecurityPkg POC.
jyao1 Aug 27, 2019
8e39ff8
SecurityPkg: Add Tpm2NvExtend() support.
jyao1 Jun 8, 2022
3ad108b
Add libspdm.
jyao1 Jun 8, 2022
f950bed
Add a new test config: trust anchor is not in device security policy …
Zhiqiang520 Jun 8, 2022
1172c0f
some measurement is not correct for auth success.
qizhangz Jun 14, 2022
4c70560
Add branch description.
jyao1 Jun 20, 2022
754a9e7
Add three new test configs: DeviceSecurityPolicy is Authentication On…
Zhiqiang520 Jun 13, 2022
0167128
update Tcg2DumpLog and DeployCert.
qizhangz Jun 29, 2022
554b63a
SecurityPkg/HashLibBaseCryptoRouter: extend whole digest to NV index.
qizhangz Jun 29, 2022
75bb8c3
Fix data structure definition.
jyao1 Jun 30, 2022
de1effb
clean up nonce registration.
jyao1 Jun 30, 2022
5a128f3
signature database should include root certificate not cert chain.
qizhangz Jun 30, 2022
538fe2f
Add new event log.
jyao1 Jun 30, 2022
4895578
fix the failure of TestSpdm().
qizhangz Jun 30, 2022
26e0698
Update RIM example.
jyao1 Jun 30, 2022
9d257eb
Clean up Device Auth definition.
jyao1 Jun 30, 2022
53b40a7
update NV attribute according to PTP spec.
qizhangz Jul 1, 2022
b0c6912
Add a new test config: the device reports that the measurement conten…
Zhiqiang520 Jun 29, 2022
3ea7ef8
Add missing tag-version.
jyao1 Jul 1, 2022
e88f697
Fix comid typo.
jyao1 Jul 1, 2022
4b49036
update with libspdm 2.1.0.
qizhangz Jul 4, 2022
ad16f5a
sync libspdm 2.1.0
qizhangz Jul 4, 2022
ad3dd99
only request GENERATE SIGNATURE for measurement when authenticated.
qizhangz Jul 5, 2022
baec7ed
update the version of NV_INDEX_INSTANCE_EVENT_LOG_STRUCT and NV_INDEX…
qizhangz Jul 15, 2022
494a681
check SubHeaderLength for Tcg event log dump.
qizhangz Jul 15, 2022
a50dd5b
1. Set SPDM requester support more algorithms default. 2. Add a new t…
Zhiqiang520 Jul 21, 2022
c460b6b
fix some typo.
Zhiqiang520 Jul 28, 2022
cf430e4
enable PcdOpensslEcEnabled.
qizhangz Aug 1, 2022
41df44a
update Cryptlib HAL.
qizhangz Aug 1, 2022
bb54e80
update Crypto config.
qizhangz Aug 1, 2022
93f087e
udpate Device Security with Crypt lib.
qizhangz Aug 1, 2022
8a89097
update Crypt test.
qizhangz Aug 1, 2022
e3f35a3
Fix ValidateCryptHmac fail.
Zhiqiang520 Aug 3, 2022
dd621d5
Fix ValidateCryptRsa2( ) function fail when running Cryptest.efi
Zhiqiang520 Aug 16, 2022
6cdacdb
update Crypt test, remove ValidateCryptPkcs7Ec().
Zhiqiang520 Aug 16, 2022
a7d86b2
Update RsaVerify from RSA1024 to RSA2048, fix ValidateCryptRsa( ) fun…
Zhiqiang520 Aug 17, 2022
75c4514
Add a new test config: Set SPDM responder support RSASSA_4096 and SHA…
Zhiqiang520 Aug 17, 2022
5bc4dde
Add a new test config: Set SPDM responder support ECDSA_ECC_NIST_P256…
Zhiqiang520 Aug 18, 2022
3cd9a24
Fix typo.
Zhiqiang520 Aug 24, 2022
2583c15
Add a new test config: Set SPDM responder support ECDSA_ECC_NIST_P384…
Zhiqiang520 Aug 24, 2022
3c2f34a
Add a new test config: Set SPDM responder support ECDSA_ECC_NIST_P521…
Zhiqiang520 Aug 28, 2022
74d0403
Add test configs to test PCI DOE.
Zhiqiang520 Aug 30, 2022
189175b
If the Responder does not support MEASUREMENTS response capabilities,…
Zhiqiang520 Aug 31, 2022
7d62826
Add two test configs: Set SPDM responder support SECP_256_R1 and AES_…
Zhiqiang520 Aug 30, 2022
a1041b7
DeviceSecurityPkg: Update CryptlibStub with X509.
qizhangz Sep 23, 2022
89386ee
DeviceSecurityPkg: sync libspdm 2.2.0.
qizhangz Sep 28, 2022
d425855
DeviceSecurityPkg: update with libspdm 2.2.0.
qizhangz Sep 30, 2022
2579c88
DeviceSecurityPkg: platform_lib of os_stub.
qizhangz Sep 30, 2022
887166f
DeviceSecurityPkg: memlib of os_stub.
qizhangz Oct 3, 2022
fca06ee
DeviceSecurityPkg: cryptlib of os_stub.
qizhangz Oct 3, 2022
d74ba0b
DeviceSecurityPkg: spdm stub code refine.
qizhangz Oct 4, 2022
214e978
DeviceSecurityPkg: Pass GCC build.
qizhangz Oct 8, 2022
3d0d6e2
DeviceSecurityPkg: define LIBSPDM_STDINT_ALT.
qizhangz Oct 8, 2022
f6c1067
DeviceSecurityPkg: undo SpdmLibStub.
qizhangz Oct 9, 2022
a721565
DeviceSecurityPkg: Uncrustify alignment.
qizhangz Oct 9, 2022
329d7fe
DeviceSecurityPkg: wrap RsaPkcs1Verify and RsaPkcs1Sign.
qizhangz Oct 11, 2022
5040d56
DeviceSecurityPkg: add some NULL pointer check.
qizhangz Oct 12, 2022
ccec989
correct get testconfig.
Zhiqiang520 Oct 13, 2022
52bc322
DeviceSecurityPkg: update with X509 upstream.
qizhangz Oct 18, 2022
6601862
DeviceSecurityPkg: remove unused file.
qizhangz Oct 18, 2022
6dd109e
DeviceSecurityPkg: spdm return type is libspdm_return_t.
qizhangz Oct 18, 2022
e5d8459
DeviceSecurityPkg: reconfig Include layout.
qizhangz Oct 19, 2022
ed7bc2c
DeviceSecurityPkg: fix a typo.
qizhangz Oct 19, 2022
6af18da
DeviceSecurityPkg: fix build error.
qizhangz Oct 21, 2022
a6691d7
DeviceSecurityPkg: include OpensslLibFull lib for EC enabled.
qizhangz Oct 25, 2022
77b80ab
DeviceSecurityPkg: reconfig includes.
qizhangz Oct 31, 2022
56467f3
DeviceSecurityPkg: Requester Nonce is needed.
qizhangz Oct 31, 2022
04ef112
DeviceSecurityPkg: set PcrIndex and EventType for No Data.
qizhangz Nov 3, 2022
09d0cb6
DeviceSecurityPkg: get Sig Measurement without CHAL_CAP.
qizhangz Nov 7, 2022
3c7fb8d
DeviceSecurityPkg: enum slot id for GET_CERTIFICATE.
qizhangz Nov 7, 2022
77fa4a3
DeviceSecurityPkg: Add a new test config.
Zhiqiang520 Nov 5, 2022
0a28d48
DeviceSecurityPkg: support multiple cert in Database
qizhangz Nov 8, 2022
7d0461d
DeviceSecurityPkg: handle ContentChanged case for measurement.
qizhangz Nov 10, 2022
38dc1dd
DeviceSecurityPkg: Add test different certificate chains.
Zhiqiang520 Nov 8, 2022
e658cd2
DeviceSecurityPkg: Record SlotId in Data.
qizhangz Nov 14, 2022
dda8605
DeviceSecurityPkg: return SecurityState.
qizhangz Nov 15, 2022
62edd2a
DeviceSecurityPkg: test SignatureType is not EFI_CERT_X509_GUID.
Zhiqiang520 Nov 11, 2022
15c8e2d
DeviceSecurityPkg: measurement with AUTH_FAIL_INVALID and No Data.
qizhangz Nov 21, 2022
2da8439
DeviceSecurityPkg: SubheaderUID for each responder.
qizhangz Nov 21, 2022
8dcc69f
DeviceSecurityPkg: check return value of libspdm.
qizhangz Nov 21, 2022
b83ede0
DeviceSecurityPkg: remove TCG_DEVICE_SECURITY_EVENT_DATA_VERSION_1
qizhangz Nov 22, 2022
c4782d7
DeviceSecurityPkg: measure signature db to PCR 1.
qizhangz Nov 29, 2022
fd2bd99
DeviceSecurityPkg: create SPDM Uid from volatile variable.
qizhangz Nov 29, 2022
03e1e06
DeviceSecurityPkg: record signature db full status.
qizhangz Nov 29, 2022
5d9e2a7
DeviceSecurityPkg: test SPDM_MESSAGE_VERSION_11.
Zhiqiang520 Dec 2, 2022
af6a6b4
DeviceSecurityPkg: test SPDM_MESSAGE_VERSION_10.
Zhiqiang520 Dec 2, 2022
cc71188
remove libspdm from DeviceSecurityPkg.
qizhangz Dec 6, 2022
a6d43b3
DeviceSecurityPkg: move SpdmLib to SecurityPkg.
qizhangz Dec 6, 2022
ae9e1c6
SecurityPkg: add libspdm.
qizhangz Dec 6, 2022
373fc83
SecurityPkg: add SpdmLib of libspdm wrapper.
qizhangz Dec 6, 2022
87aadbc
SecurityPkg: add OsStub lib to support libspdm.
qizhangz Dec 6, 2022
00ad4a1
SecurityPkg: add SpdmSecurityLib.
qizhangz Dec 6, 2022
815e9ad
SecurityPkg: add definition of signature database devdb.
qizhangz Dec 6, 2022
36155d1
SecurityPkg: add defintion of DeviceSecurityPolicy.
qizhangz Dec 6, 2022
5033505
SecurityPkg: update dec&dsc file for SPDM.
qizhangz Dec 6, 2022
bf64c93
MdePkg: add Tcg Spdm definition.
qizhangz Dec 6, 2022
09043e4
SecurityPkg: update YAML to ignore the Ecc errors of spdm.
qizhangz Dec 7, 2022
b8333d2
.pytool/CISettings.py: add libspdm submodule.
qizhangz Dec 7, 2022
411c40c
DeviceSecurityPkg: rename to DeviceSecurityTestPkg.
qizhangz Dec 12, 2022
4184682
SecurityPkg/DeviceSecurity: fix signature parsing issue.
qizhangz Dec 14, 2022
30d09a7
SecurityPkg/DeviceSecurity: fix possible memory leak.
qizhangz Dec 15, 2022
8453ff0
SecurityPkg/DeviceSecurity: Record Nonc for No Trust Anchor case.
qizhangz Dec 18, 2022
584e0cf
DeviceSecurityTestPkg: Test LIBSPDM_MAX_ROOT_CERT_SUPPORT.
Zhiqiang520 Dec 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -20,3 +20,6 @@
[submodule "RedfishPkg/Library/JsonLib/jansson"]
path = RedfishPkg/Library/JsonLib/jansson
url = https://github.com/akheron/jansson
[submodule "SecurityPkg/DeviceSecurity/SpdmLib/libspdm"]
path = SecurityPkg/DeviceSecurity/SpdmLib/libspdm
url = https://github.com/DMTF/libspdm.git
2 changes: 2 additions & 0 deletions .pytool/CISettings.py
Original file line number Diff line number Diff line change
@@ -200,6 +200,8 @@ def GetRequiredSubmodules(self):
"BaseTools/Source/C/BrotliCompress/brotli", False))
rs.append(RequiredSubmodule(
"RedfishPkg/Library/JsonLib/jansson", False))
rs.append(RequiredSubmodule(
"SecurityPkg/DeviceSecurity/SpdmLib/libspdm", False))
return rs

def GetName(self):
93 changes: 93 additions & 0 deletions DeviceSecurityTestPkg/DeviceSecurityTestPkg.dec
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
## @file
# This package provides EDKII Device Security related support.
#
# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##

[Defines]
DEC_SPECIFICATION = 0x00010005
PACKAGE_NAME = DeviceSecurityTestPkg
PACKAGE_GUID = 575E6A14-ACD5-4101-A74C-747D49D17AC9
PACKAGE_VERSION = 0.1

[Includes]
Include
../SecurityPkg/DeviceSecurity/SpdmLib/Include
../SecurityPkg/DeviceSecurity/SpdmLib/libspdm/include

[Includes.Common.Private]
#Library/SpdmLib/Include
#Library/SpdmLib/libspdm/include
Include/PrivateTest

[Includes.X64]
../SecurityPkg/DeviceSecurity/SpdmLib/libspdm/include/hal/x64

[LibraryClasses]
## @libraryclass Perform SPDM (following SPDM spec) and measure data to TPM (following TCG PFP spec).
##
#SpdmMeasurementLib|Include/Library/SpdmSecurityLib.h

[Guids]
gEfiDeviceSecurityPkgTokenSpaceGuid = { 0x506945e8, 0x7603, 0x49ee, { 0xbf, 0x36, 0x6c, 0x28, 0x74, 0xca, 0x26, 0xdc }}

## Include/Guid/DeviceSecurity.h
gEdkiiDeviceSignatureDatabaseGuid = {0xb9c2b4f4, 0xbf5f, 0x462d, {0x8a, 0xdf, 0xc5, 0xc7, 0xa, 0xc3, 0x5d, 0xad}}

gEfiDeviceSecurityPkgTestConfig = { 0x6761aa6c, 0x41bf, 0x4a38, { 0x84, 0x93, 0x26, 0x6b, 0x11, 0x98, 0x44, 0xfc }}

gEfiDeviceSecuritySpdmUidGuid = {0xe37b5665, 0x5ef9, 0x4e7e, {0xb4, 0x91, 0xd6, 0x78, 0xab, 0xff, 0xfb, 0xcb }}

[Ppis]

## Include/Ppi/DeviceSecurity.h
gEdkiiDeviceSecurityPpiGuid = {0x4b05faa, 0x7f36, 0x4dc5, {0xbf, 0xb3, 0x42, 0xde, 0x30, 0xbc, 0x3d, 0x80}}


## Include/Ppi/DeviceSecurityPolicy.h
gEdkiiDeviceSecurityPolicyPpiGuid = {0x5b7b8831, 0xb15b, 0x4e39, {0xad, 0xfc, 0x88, 0x4d, 0x5a, 0x89, 0xf7, 0x4a}}

## Include/Ppi/SpdmIo.h
gSpdmIoPpiGuid = {0x02320bff, 0x6b67, 0x4acc, {0x8b, 0x37, 0x45, 0xf4, 0x20, 0xfa, 0x9f, 0x98}}

## Include/Ppi/Spdm.h
gSpdmPpiGuid = {0x0a1227b3, 0x0f30, 0x4639, {0xbe, 0xb3, 0xb4, 0x60, 0x77, 0x35, 0xee, 0x89}}

## Include/PrivateTest/Ppi/SpdmTest.h
gSpdmTestPpiGuid = {0x9580d073, 0x5c95, 0x469f, {0x9a, 0xbe, 0xd4, 0xbc, 0xb7, 0x5f, 0xbf, 0x5c}}

[Protocols]
## Include/Protocol/DeviceSecurityPolicy.h
gEdkiiDeviceSecurityPolicyProtocolGuid = {0x9e15104a, 0x9e7c, 0x437d, {0xb1, 0xf0, 0x6c, 0xbb, 0xfb, 0x75, 0xdc, 0x87}}

## Include/Protocol/SpdmIo.h
gSpdmIoProtocolGuid = {0x78cad8aa, 0x7f4, 0x4c9b, {0x95, 0x5e, 0x85, 0x73, 0x2e, 0x37, 0x21, 0x96}}

## Include/Protocol/Spdm.h
gSpdmProtocolGuid = {0x4f96162, 0x9ed8, 0x4499, {0x96, 0xd8, 0x58, 0x8c, 0x6d, 0xc6, 0x11, 0x5d}}

## Include/PrivateTest/Protocol/SpdmTest.h
gSpdmTestProtocolGuid = {0xcbd8291b, 0x824a, 0x4b28, {0xad, 0x1f, 0x71, 0x1e, 0xc5, 0x4d, 0x13, 0x31}}

[PcdsFixedAtBuild, PcdsPatchableInModule]
## PCD to indicate the BaseAsymAlgo in negotiate algorithm message.
# Please refer to MdePkg\Include\IndustryStandard\Spdm.h, SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_xxx.
gEfiDeviceSecurityPkgTokenSpaceGuid.PcdSpdmBaseAsymAlgo|0x01|UINT32|0x00000001

## PCD to indicate the BaseHashAlgo in negotiate algorithm message.
# Please refer to MdePkg\Include\IndustryStandard\Spdm.h, SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_xxx.
gEfiDeviceSecurityPkgTokenSpaceGuid.PcdSpdmBaseHashAlgo|0x01|UINT32|0x00000002

## PCD to indicate the DHENamedGroup in negotiate algorithm message.
# Please refer to MdePkg\Include\IndustryStandard\Spdm.h, SPDM_ALGORITHMS_DHE_NAMED_GROUP_xxx.
gEfiDeviceSecurityPkgTokenSpaceGuid.PcdSpdmDHENamedGroup|0x01|UINT16|0x00000003

## PCD to indicate the AEADCipherSuite in negotiate algorithm message.
# Please refer to MdePkg\Include\IndustryStandard\Spdm.h, SPDM_ALGORITHMS_AEAD_CIPHER_SUITE_xxx.
gEfiDeviceSecurityPkgTokenSpaceGuid.PcdSpdmAEADCipherSuite|0x01|UINT16|0x00000004

## PCD to indicate the KeySchedule in negotiate algorithm message.
# Please refer to MdePkg\Include\IndustryStandard\Spdm.h, SPDM_ALGORITHMS_KEY_SCHEDULE_xxx.
gEfiDeviceSecurityPkgTokenSpaceGuid.PcdSpdmKeySchedule|0x01|UINT16|0x00000005
Loading