Skip to content

Commit

Permalink
Removed references to OpensslLib and changed all instances of BaseCry…
Browse files Browse the repository at this point in the history
…ptLib to be the NULL implementation (#222)

## Description

There are some references to BaseCryptLib and Openssl in package dsc
files. In MU_BASECORE Openssl and it's BaseCryptLib implementations were
removed so we need to update to using the NULL lib.

- [ ] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [ ] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [ ] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

## How This Was Tested

Tested with CI

## Integration Instructions

N/A
  • Loading branch information
kenlautner authored Jan 19, 2024
1 parent ddba631 commit 9d3f57c
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 43 deletions.
7 changes: 4 additions & 3 deletions FmpDevicePkg/FmpDevicePkg.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@
"loongarch",
"loongson"
]
},
"Defines": {
"BLD_*_CONTINUOUS_INTEGRATION": "TRUE",
}
# MU_CHANGE - Removed conditional logic around openssl crypto so this is no longer necessary
#"Defines": {
# "BLD_*_CONTINUOUS_INTEGRATION": "TRUE",
#}
}
17 changes: 10 additions & 7 deletions FmpDevicePkg/FmpDevicePkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,17 @@
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
!ifdef CONTINUOUS_INTEGRATION
# MU_CHANGE [START] - Remove references to openssl crypto
#!ifdef CONTINUOUS_INTEGRATION
# BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
#!else
# IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
# OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
# BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
# RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf
#!endif
BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
!else
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf
!endif
# MU_CHANGE [END]
FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf
FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf
Expand Down
7 changes: 4 additions & 3 deletions SecurityPkg/SecurityPkg.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@
"AdditionalIncludePaths": [] # Additional paths to spell check (wildcards supported)
},

"Defines": {
"BLD_*_CONTINUOUS_INTEGRATION": "TRUE",
},
# MU_CHANGE - Removed conditional logic around openssl crypto so this is no longer necessary
#"Defines": {
# "BLD_*_CONTINUOUS_INTEGRATION": "TRUE",
#},

"DebugMacroCheck": {
"StringSubstitutions": {
Expand Down
66 changes: 36 additions & 30 deletions SecurityPkg/SecurityPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,16 @@
PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
!ifdef CONTINUOUS_INTEGRATION
# MU_CHANGE [START] - Remove references to openssl crypto
#!ifdef CONTINUOUS_INTEGRATION
# BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
#!else
# IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
# OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
# BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
#!endif
BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
!else
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
!endif
# MU_CHANGE [END]
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf
Expand All @@ -138,13 +141,7 @@
[LibraryClasses.common.DXE_DRIVER]
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
!ifdef CONTINUOUS_INTEGRATION
BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
!else
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
!endif
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf
Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf
Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf
Expand All @@ -160,25 +157,31 @@

[LibraryClasses.common.DXE_RUNTIME_DRIVER]
ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf
!ifdef CONTINUOUS_INTEGRATION
# MU_CHANGE [START] - Remove references to openssl crypto
#!ifdef CONTINUOUS_INTEGRATION
# BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
#!else
# IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
# OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
# BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
#!endif
BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
!else
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
!endif
# MU_CHANGE [END]
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf
Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf
Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf

[LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION]
!ifdef CONTINUOUS_INTEGRATION
# MU_CHANGE [START] - Remove references to openssl crypto
#!ifdef CONTINUOUS_INTEGRATION
# BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
#!else
# IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
# OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
# BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
#!endif
BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
!else
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
!endif
# MU_CHANGE [END]
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf
Expand All @@ -191,13 +194,16 @@
MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf
ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLib.inf
SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
!ifdef CONTINUOUS_INTEGRATION
# MU_CHANGE [START] - Remove references to openssl crypto
#!ifdef CONTINUOUS_INTEGRATION
# BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
#!else
# IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
# OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
# BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
#!endif
BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
!else
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
!endif
# MU_CHANGE [END]
Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf
Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf
Tcg2PhysicalPresenceLib|SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.inf
Expand Down

0 comments on commit 9d3f57c

Please # to comment.