Changeset 85718 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg
- Timestamp:
- Aug 12, 2020 4:09:12 PM (4 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 81 added
- 10 deleted
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-133213 /vendor/edk2/current 103735-103757,103769-103776,129194-139864
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/CryptoPkg.dec
r80721 r85718 5 5 # It also provides a test application to test libraries. 6 6 # 7 # Copyright (c) 2009 - 20 18, Intel Corporation. All rights reserved.<BR>7 # Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR> 8 8 # SPDX-License-Identifier: BSD-2-Clause-Patent 9 9 # … … 21 21 22 22 [Includes.Common.Private] 23 Private 23 24 Library/Include 24 25 Library/OpensslLib/openssl/include … … 34 35 TlsLib|Include/Library/TlsLib.h 35 36 37 ## @libraryclass Provides Unified API for different hash implementations. 38 # 39 HashApiLib|Include/Library/HashApiLib.h 40 41 [Protocols] 42 ## EDK II Crypto DXE protocol 43 # 2C2275C9-3A7B-426F-BE54-2D22BD9D1092 44 gEdkiiCryptoProtocolGuid = { 0x2C2275C9, 0x3A7B, 0x426F, { 0xBE, 0x54, 0x2D, 0x22, 0xBD, 0x9D, 0x10, 0x92 }} 45 46 ## EDK II Crypto SMM protocol 47 # F46B2EB2-E0D7-4C96-A3B1-CB7C572EB300 48 gEdkiiSmmCryptoProtocolGuid = { 0xF46B2EB2, 0xE0D7, 0x4C96, { 0xA3, 0xB1, 0xc, 0x61, 0xbb, 0x24, 0x5c, 0x42 }} 49 50 [Ppis] 51 ## EDK II Crypto PPI 52 # 7DCE671B-C223-446A-A705-ED637AAF6771 53 gEdkiiCryptoPpiGuid = { 0x7DCE671B, 0xC223, 0x446A, { 0xA7, 0x05, 0xED, 0x63, 0x7A, 0xAF, 0x67, 0x71 }} 54 55 [Guids] 56 ## Crypto package token space guid. 57 gEfiCryptoPkgTokenSpaceGuid = { 0x6bd7de60, 0x9ef7, 0x4899, { 0x97, 0xd0, 0xab, 0xff, 0xfd, 0xe9, 0x70, 0xf2 } } 58 59 [PcdsFixedAtBuild] 60 ## Enable/Disable the families and individual services produced by the 61 # EDK II Crypto Protocols/PPIs. The default is all services disabled. 62 # This Structured PCD is associated with PCD_CRYPTO_SERVICE_FAMILY_ENABLE 63 # structure that is defined in Include/Pcd/PcdCryptoServiceFamilyEnable.h. 64 # @Prompt Enable/Disable EDK II Crypto Protocol/PPI services 65 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable|{0x00}|PCD_CRYPTO_SERVICE_FAMILY_ENABLE|0x00000002 { 66 <Packages> 67 CryptoPkg/CryptoPkg.dec 68 <HeaderFiles> 69 Pcd/PcdCryptoServiceFamilyEnable.h 70 } 71 72 ## This PCD indicates the HASH algorithm to calculate hash of data 73 # Based on the value set, the required algorithm is chosen to calculate 74 # the hash of data.<BR> 75 # The default hashing algorithm for BaseHashApiLib is set to SHA256.<BR> 76 # 0x00000001 - HASH_ALG_SHA1.<BR> 77 # 0x00000002 - HASH_ALG_SHA256.<BR> 78 # 0x00000004 - HASH_ALG_SHA384.<BR> 79 # 0x00000008 - HASH_ALG_SHA512.<BR> 80 # 0x00000010 - HASH_ALG_SM3_256.<BR> 81 # @Prompt Set policy for hashing unsigned image for Secure Boot. 82 # @ValidList 0x80000001 | 0x00000001, 0x00000002, 0x00000004, 0x00000008, 0x00000010 83 gEfiCryptoPkgTokenSpaceGuid.PcdHashApiLibPolicy|0x00000002|UINT32|0x00000001 84 36 85 [UserExtensions.TianoCore."ExtraFiles"] 37 86 CryptoPkgExtra.uni -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/CryptoPkg.dsc
r80721 r85718 1 1 ## @file 2 2 # Cryptographic Library Package for UEFI Security Implementation. 3 # 4 # Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR> 3 # PEIM, DXE Driver, and SMM Driver with all crypto services enabled. 4 # 5 # Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR> 6 # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> 5 7 # SPDX-License-Identifier: BSD-2-Clause-Patent 6 8 # … … 18 20 DSC_SPECIFICATION = 0x00010005 19 21 OUTPUT_DIRECTORY = Build/CryptoPkg 20 SUPPORTED_ARCHITECTURES = IA32|X64|ARM|AARCH64 22 SUPPORTED_ARCHITECTURES = IA32|X64|ARM|AARCH64|RISCV64 21 23 BUILD_TARGETS = DEBUG|RELEASE|NOOPT 22 24 SKUID_IDENTIFIER = DEFAULT 25 26 # 27 # Flavor of PEI, DXE, SMM modules to build. 28 # Must be one of ALL, NONE, MIN_PEI, MIN_DXE_MIN_SMM. 29 # Default is ALL that is used for package build verification. 30 # PACKAGE - Package verification build of all components. Null 31 # versions of libraries are used to minimize build times. 32 # ALL - Build PEIM, DXE, and SMM drivers. Protocols and PPIs 33 # publish all services. 34 # NONE - Build PEIM, DXE, and SMM drivers. Protocols and PPIs 35 # publish no services. Used to verify compiler/linker 36 # optimizations are working correctly. 37 # MIN_PEI - Build PEIM with PPI that publishes minimum required 38 # services. 39 # MIN_DXE_MIN_SMM - Build DXE and SMM drivers with Protocols that publish 40 # minimum required services. 41 # 42 DEFINE CRYPTO_SERVICES = PACKAGE 43 !if $(CRYPTO_SERVICES) IN "PACKAGE ALL NONE MIN_PEI MIN_DXE_MIN_SMM" 44 !else 45 !error CRYPTO_SERVICES must be set to one of PACKAGE ALL NONE MIN_PEI MIN_DXE_MIN_SMM. 46 !endif 23 47 24 48 ################################################################################ … … 30 54 BaseLib|MdePkg/Library/BaseLib/BaseLib.inf 31 55 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf 32 MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf33 56 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf 34 57 DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf 35 DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf36 PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf37 UefiLib|MdePkg/Library/UefiLib/UefiLib.inf38 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf39 58 UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf 40 UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf41 UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf42 59 UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf 43 UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf 44 45 IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf 46 OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf 60 BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf 61 TlsLib|CryptoPkg/Library/TlsLibNull/TlsLibNull.inf 62 HashApiLib|CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.inf 47 63 48 64 [LibraryClasses.ARM, LibraryClasses.AARCH64] … … 58 74 NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf 59 75 76 [LibraryClasses.common.PEIM] 77 PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf 78 MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf 79 PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf 80 PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf 81 HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf 82 83 [LibraryClasses.common.DXE_SMM_DRIVER] 84 SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf 85 MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf 86 87 !if $(CRYPTO_SERVICES) IN "ALL NONE MIN_PEI MIN_DXE_MIN_SMM" 88 [LibraryClasses] 89 MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf 90 DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf 91 DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf 92 OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf 93 PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf 94 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf 95 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 96 TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf 97 UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf #??? 98 IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf #??? 99 OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf 100 IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf 101 SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf 102 60 103 [LibraryClasses.ARM] 61 104 ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf 62 105 63 106 [LibraryClasses.common.PEIM] 107 PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf 108 ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf 64 109 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf 110 TlsLib|CryptoPkg/Library/TlsLibNull/TlsLibNull.inf 111 112 [LibraryClasses.IA32.PEIM, LibraryClasses.X64.PEIM] 113 PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf 114 115 [LibraryClasses.ARM.PEIM, LibraryClasses.AARCH64.PEIM] 116 PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf 65 117 66 118 [LibraryClasses.common.DXE_DRIVER] 119 ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf 67 120 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf 68 69 [LibraryClasses.common.DXE_RUNTIME_DRIVER] 70 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf 121 TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf 71 122 72 123 [LibraryClasses.common.DXE_SMM_DRIVER] 124 ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLib.inf 73 125 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf 74 75 [LibraryClasses.common.UEFI_DRIVER] 76 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf 77 78 [LibraryClasses.common.UEFI_APPLICATION] 79 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf 126 TlsLib|CryptoPkg/Library/TlsLibNull/TlsLibNull.inf 127 !endif 80 128 81 129 ################################################################################ … … 84 132 # 85 133 ################################################################################ 86 [PcdsFeatureFlag]87 gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable|TRUE88 gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable|TRUE89 90 134 [PcdsFixedAtBuild] 91 135 gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0f 92 136 gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000 93 137 gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x06 138 139 !if $(CRYPTO_SERVICES) IN "PACKAGE ALL" 140 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.HmacSha256.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 141 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Md5.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 142 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 143 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Dh.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 144 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Random.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 145 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Rsa.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 146 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha1.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 147 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha256.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 148 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha384.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 149 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha512.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 150 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.X509.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 151 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Tdes.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 152 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.GetContextSize | TRUE 153 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.Init | TRUE 154 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.CbcEncrypt | TRUE 155 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.CbcDecrypt | TRUE 156 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Arc4.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 157 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sm3.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 158 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Hkdf.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 159 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Tls.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 160 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.TlsSet.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 161 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.TlsGet.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 162 !endif 163 164 !if $(CRYPTO_SERVICES) == MIN_PEI 165 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.HmacSha256.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 166 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha1.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 167 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha256.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 168 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha384.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 169 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha512.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 170 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sm3.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 171 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Rsa.Services.Pkcs1Verify | TRUE 172 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Rsa.Services.New | TRUE 173 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Rsa.Services.Free | TRUE 174 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Rsa.Services.SetKey | TRUE 175 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Services.Pkcs5HashPassword | TRUE 176 !endif 177 178 !if $(CRYPTO_SERVICES) == MIN_DXE_MIN_SMM 179 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.HmacSha256.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 180 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Services.Pkcs1v2Encrypt | TRUE 181 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Services.Pkcs5HashPassword | TRUE 182 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Services.Pkcs7Verify | TRUE 183 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Services.VerifyEKUsInPkcs7Signature | TRUE 184 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Services.Pkcs7GetSigners | TRUE 185 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Services.Pkcs7FreeSigners | TRUE 186 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Services.AuthenticodeVerify | TRUE 187 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Random.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 188 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Rsa.Services.Pkcs1Verify | TRUE 189 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Rsa.Services.New | TRUE 190 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Rsa.Services.Free | TRUE 191 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Rsa.Services.SetKey | TRUE 192 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Rsa.Services.GetPublicKeyFromX509 | TRUE 193 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha1.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 194 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha256.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 195 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha256.Services.HashAll | FALSE 196 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.X509.Services.GetSubjectName | TRUE 197 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.X509.Services.GetCommonName | TRUE 198 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.X509.Services.GetOrganizationName | TRUE 199 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.X509.Services.GetTBSCert | TRUE 200 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Tls.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 201 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.TlsSet.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 202 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.TlsGet.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY 203 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.Init | TRUE 204 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.CbcEncrypt | TRUE 205 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.CbcDecrypt | TRUE 206 !endif 94 207 95 208 ################################################################################################### … … 111 224 # 112 225 ################################################################################################### 226 !if $(CRYPTO_SERVICES) == PACKAGE 113 227 [Components] 114 228 CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf 115 229 CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf 230 CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf 116 231 CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf 232 CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf 233 CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf 117 234 CryptoPkg/Library/TlsLib/TlsLib.inf 235 CryptoPkg/Library/TlsLibNull/TlsLibNull.inf 118 236 CryptoPkg/Library/OpensslLib/OpensslLib.inf 119 237 CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf 238 CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.inf 239 240 CryptoPkg/Library/BaseCryptLibOnProtocolPpi/PeiCryptLib.inf 241 CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf 242 CryptoPkg/Library/BaseCryptLibOnProtocolPpi/SmmCryptLib.inf 243 !endif 244 245 !if $(CRYPTO_SERVICES) IN "PACKAGE ALL NONE MIN_PEI" 246 [Components.IA32, Components.X64, Components.ARM, Components.AARCH64] 247 CryptoPkg/Driver/CryptoPei.inf { 248 <Defines> 249 !if $(CRYPTO_SERVICES) == ALL 250 FILE_GUID = 8DF53C2E-3380-495F-A8B7-370CFE28E1C6 251 !elseif $(CRYPTO_SERVICES) == NONE 252 FILE_GUID = E5A97EE3-71CC-407F-9DA9-6BE0C8A6C7DF 253 !elseif $(CRYPTO_SERVICES) == MIN_PEI 254 FILE_GUID = 0F5827A9-35FD-4F41-8D38-9BAFCE594D31 255 !endif 256 } 257 !endif 258 259 !if $(CRYPTO_SERVICES) IN "PACKAGE ALL NONE MIN_DXE_MIN_SMM" 260 [Components.IA32, Components.X64, Components.AARCH64] 261 CryptoPkg/Driver/CryptoDxe.inf { 262 <Defines> 263 !if $(CRYPTO_SERVICES) == ALL 264 FILE_GUID = D9444B06-060D-42C5-9344-F04707BE0169 265 !elseif $(CRYPTO_SERVICES) == NONE 266 FILE_GUID = C7A340F4-A6CC-4F95-A2DA-42BEA4C3944A 267 !elseif $(CRYPTO_SERVICES) == MIN_DXE_MIN_SMM 268 FILE_GUID = DDF5BE9E-159A-4B77-B6D7-82B84B5763A2 269 !endif 270 } 120 271 121 272 [Components.IA32, Components.X64] 122 CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf 273 CryptoPkg/Driver/CryptoSmm.inf { 274 <Defines> 275 !if $(CRYPTO_SERVICES) == ALL 276 FILE_GUID = A3542CE8-77F7-49DC-A834-45D37D2EC1FA 277 !elseif $(CRYPTO_SERVICES) == NONE 278 FILE_GUID = 6DCB3127-01E7-4131-A487-DC77A965A541 279 !elseif $(CRYPTO_SERVICES) == MIN_DXE_MIN_SMM 280 FILE_GUID = 85F7EA15-3A2B-474A-8875-180542CD6BF3 281 !endif 282 } 283 !endif 123 284 124 285 [BuildOptions] -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/CryptoPkg.uni
r80721 r85718 5 5 // It also provides a test application to test libraries. 6 6 // 7 // Copyright (c) 2009 - 20 18, Intel Corporation. All rights reserved.<BR>7 // Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR> 8 8 // 9 9 // SPDX-License-Identifier: BSD-2-Clause-Patent … … 16 16 #string STR_PACKAGE_DESCRIPTION #language en-US "This Package provides cryptographic-related libraries for UEFI security modules." 17 17 18 #string STR_gEfiCryptoPkgTokenSpaceGuid_PcdHashApiLibPolicy_PROMPT #language en-US "HASH algorithm to calculate hash" 18 19 20 #string STR_gEfiCryptoPkgTokenSpaceGuid_PcdHashApiLibPolicy_HELP #language en-US "This PCD indicates the HASH algorithm to calculate hash of data.<BR><BR>\n" 21 "Based on the value set, the required algorithm is chosen to calculate\n" 22 "the hash of data.<BR>\n" 23 "The default hashing algorithm for BaseHashApiLib is set to SHA256.<BR>\n" 24 "0x00000001 - HASH_ALG_SHA1.<BR>\n" 25 "0x00000002 - HASH_ALG_SHA256.<BR>\n" 26 "0x00000004 - HASH_ALG_SHA384.<BR>\n" 27 "0x00000008 - HASH_ALG_SHA512.<BR>\n" 28 "0x00000010 - HASH_ALG_SM3.<BR>" 19 29 30 #string STR_gEfiCryptoPkgTokenSpaceGuid_PcdCryptoServiceFamilyEnable_PROMPT #language en-US "Enable/Disable EDK II Crypto Protocol/PPI services" 31 32 #string STR_gEfiCryptoPkgTokenSpaceGuid_PcdCryptoServiceFamilyEnable_HELP #language en-US "Enable/Disable the families and individual services produced by the EDK II Crypto Protocols/PPIs. The default is all services disabled. This Structured PCD is associated with PCD_CRYPTO_SERVICE_FAMILY_ENABLE structure that is defined in Include/Pcd/PcdCryptoServiceFamilyEnable.h." -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Include/Library/BaseCryptLib.h
r80721 r85718 5 5 functionality enabling. 6 6 7 Copyright (c) 2009 - 20 19, Intel Corporation. All rights reserved.<BR>7 Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR> 8 8 SPDX-License-Identifier: BSD-2-Clause-Patent 9 9 … … 14 14 15 15 #include <Uefi/UefiBaseType.h> 16 17 ///18 /// MD4 digest size in bytes19 ///20 #define MD4_DIGEST_SIZE 1621 16 22 17 /// … … 79 74 80 75 /** 81 Retrieves the size, in bytes, of the context buffer required for MD4 hash operations.82 83 If this interface is not supported, then return zero.84 85 @return The size, in bytes, of the context buffer required for MD4 hash operations.86 @retval 0 This interface is not supported.87 88 **/89 UINTN90 EFIAPI91 Md4GetContextSize (92 VOID93 );94 95 /**96 Initializes user-supplied memory pointed by Md4Context as MD4 hash context for97 subsequent use.98 99 If Md4Context is NULL, then return FALSE.100 If this interface is not supported, then return FALSE.101 102 @param[out] Md4Context Pointer to MD4 context being initialized.103 104 @retval TRUE MD4 context initialization succeeded.105 @retval FALSE MD4 context initialization failed.106 @retval FALSE This interface is not supported.107 108 **/109 BOOLEAN110 EFIAPI111 Md4Init (112 OUT VOID *Md4Context113 );114 115 /**116 Makes a copy of an existing MD4 context.117 118 If Md4Context is NULL, then return FALSE.119 If NewMd4Context is NULL, then return FALSE.120 If this interface is not supported, then return FALSE.121 122 @param[in] Md4Context Pointer to MD4 context being copied.123 @param[out] NewMd4Context Pointer to new MD4 context.124 125 @retval TRUE MD4 context copy succeeded.126 @retval FALSE MD4 context copy failed.127 @retval FALSE This interface is not supported.128 129 **/130 BOOLEAN131 EFIAPI132 Md4Duplicate (133 IN CONST VOID *Md4Context,134 OUT VOID *NewMd4Context135 );136 137 /**138 Digests the input data and updates MD4 context.139 140 This function performs MD4 digest on a data buffer of the specified size.141 It can be called multiple times to compute the digest of long or discontinuous data streams.142 MD4 context should be already correctly initialized by Md4Init(), and should not be finalized143 by Md4Final(). Behavior with invalid context is undefined.144 145 If Md4Context is NULL, then return FALSE.146 If this interface is not supported, then return FALSE.147 148 @param[in, out] Md4Context Pointer to the MD4 context.149 @param[in] Data Pointer to the buffer containing the data to be hashed.150 @param[in] DataSize Size of Data buffer in bytes.151 152 @retval TRUE MD4 data digest succeeded.153 @retval FALSE MD4 data digest failed.154 @retval FALSE This interface is not supported.155 156 **/157 BOOLEAN158 EFIAPI159 Md4Update (160 IN OUT VOID *Md4Context,161 IN CONST VOID *Data,162 IN UINTN DataSize163 );164 165 /**166 Completes computation of the MD4 digest value.167 168 This function completes MD4 hash computation and retrieves the digest value into169 the specified memory. After this function has been called, the MD4 context cannot170 be used again.171 MD4 context should be already correctly initialized by Md4Init(), and should not be172 finalized by Md4Final(). Behavior with invalid MD4 context is undefined.173 174 If Md4Context is NULL, then return FALSE.175 If HashValue is NULL, then return FALSE.176 If this interface is not supported, then return FALSE.177 178 @param[in, out] Md4Context Pointer to the MD4 context.179 @param[out] HashValue Pointer to a buffer that receives the MD4 digest180 value (16 bytes).181 182 @retval TRUE MD4 digest computation succeeded.183 @retval FALSE MD4 digest computation failed.184 @retval FALSE This interface is not supported.185 186 **/187 BOOLEAN188 EFIAPI189 Md4Final (190 IN OUT VOID *Md4Context,191 OUT UINT8 *HashValue192 );193 194 /**195 Computes the MD4 message digest of a input data buffer.196 197 This function performs the MD4 message digest of a given data buffer, and places198 the digest value into the specified memory.199 200 If this interface is not supported, then return FALSE.201 202 @param[in] Data Pointer to the buffer containing the data to be hashed.203 @param[in] DataSize Size of Data buffer in bytes.204 @param[out] HashValue Pointer to a buffer that receives the MD4 digest205 value (16 bytes).206 207 @retval TRUE MD4 digest computation succeeded.208 @retval FALSE MD4 digest computation failed.209 @retval FALSE This interface is not supported.210 211 **/212 BOOLEAN213 EFIAPI214 Md4HashAll (215 IN CONST VOID *Data,216 IN UINTN DataSize,217 OUT UINT8 *HashValue218 );219 220 /**221 76 Retrieves the size, in bytes, of the context buffer required for MD5 hash operations. 222 77 … … 1027 882 1028 883 /** 1029 Retrieves the size, in bytes, of the context buffer required for HMAC-MD5 operations.1030 (NOTE: This API is deprecated.1031 Use HmacMd5New() / HmacMd5Free() for HMAC-MD5 Context operations.)1032 1033 If this interface is not supported, then return zero.1034 1035 @return The size, in bytes, of the context buffer required for HMAC-MD5 operations.1036 @retval 0 This interface is not supported.1037 1038 **/1039 UINTN1040 EFIAPI1041 HmacMd5GetContextSize (1042 VOID1043 );1044 1045 /**1046 Allocates and initializes one HMAC_CTX context for subsequent HMAC-MD5 use.1047 1048 If this interface is not supported, then return NULL.1049 1050 @return Pointer to the HMAC_CTX context that has been initialized.1051 If the allocations fails, HmacMd5New() returns NULL.1052 @retval NULL This interface is not supported.1053 1054 **/1055 VOID *1056 EFIAPI1057 HmacMd5New (1058 VOID1059 );1060 1061 /**1062 Release the specified HMAC_CTX context.1063 1064 If this interface is not supported, then do nothing.1065 1066 @param[in] HmacMd5Ctx Pointer to the HMAC_CTX context to be released.1067 1068 **/1069 VOID1070 EFIAPI1071 HmacMd5Free (1072 IN VOID *HmacMd5Ctx1073 );1074 1075 /**1076 Initializes user-supplied memory pointed by HmacMd5Context as HMAC-MD5 context for1077 subsequent use.1078 1079 If HmacMd5Context is NULL, then return FALSE.1080 If this interface is not supported, then return FALSE.1081 1082 @param[out] HmacMd5Context Pointer to HMAC-MD5 context being initialized.1083 @param[in] Key Pointer to the user-supplied key.1084 @param[in] KeySize Key size in bytes.1085 1086 @retval TRUE HMAC-MD5 context initialization succeeded.1087 @retval FALSE HMAC-MD5 context initialization failed.1088 @retval FALSE This interface is not supported.1089 1090 **/1091 BOOLEAN1092 EFIAPI1093 HmacMd5Init (1094 OUT VOID *HmacMd5Context,1095 IN CONST UINT8 *Key,1096 IN UINTN KeySize1097 );1098 1099 /**1100 Makes a copy of an existing HMAC-MD5 context.1101 1102 If HmacMd5Context is NULL, then return FALSE.1103 If NewHmacMd5Context is NULL, then return FALSE.1104 If this interface is not supported, then return FALSE.1105 1106 @param[in] HmacMd5Context Pointer to HMAC-MD5 context being copied.1107 @param[out] NewHmacMd5Context Pointer to new HMAC-MD5 context.1108 1109 @retval TRUE HMAC-MD5 context copy succeeded.1110 @retval FALSE HMAC-MD5 context copy failed.1111 @retval FALSE This interface is not supported.1112 1113 **/1114 BOOLEAN1115 EFIAPI1116 HmacMd5Duplicate (1117 IN CONST VOID *HmacMd5Context,1118 OUT VOID *NewHmacMd5Context1119 );1120 1121 /**1122 Digests the input data and updates HMAC-MD5 context.1123 1124 This function performs HMAC-MD5 digest on a data buffer of the specified size.1125 It can be called multiple times to compute the digest of long or discontinuous data streams.1126 HMAC-MD5 context should be already correctly initialized by HmacMd5Init(), and should not be1127 finalized by HmacMd5Final(). Behavior with invalid context is undefined.1128 1129 If HmacMd5Context is NULL, then return FALSE.1130 If this interface is not supported, then return FALSE.1131 1132 @param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context.1133 @param[in] Data Pointer to the buffer containing the data to be digested.1134 @param[in] DataSize Size of Data buffer in bytes.1135 1136 @retval TRUE HMAC-MD5 data digest succeeded.1137 @retval FALSE HMAC-MD5 data digest failed.1138 @retval FALSE This interface is not supported.1139 1140 **/1141 BOOLEAN1142 EFIAPI1143 HmacMd5Update (1144 IN OUT VOID *HmacMd5Context,1145 IN CONST VOID *Data,1146 IN UINTN DataSize1147 );1148 1149 /**1150 Completes computation of the HMAC-MD5 digest value.1151 1152 This function completes HMAC-MD5 hash computation and retrieves the digest value into1153 the specified memory. After this function has been called, the HMAC-MD5 context cannot1154 be used again.1155 HMAC-MD5 context should be already correctly initialized by HmacMd5Init(), and should not be1156 finalized by HmacMd5Final(). Behavior with invalid HMAC-MD5 context is undefined.1157 1158 If HmacMd5Context is NULL, then return FALSE.1159 If HmacValue is NULL, then return FALSE.1160 If this interface is not supported, then return FALSE.1161 1162 @param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context.1163 @param[out] HmacValue Pointer to a buffer that receives the HMAC-MD5 digest1164 value (16 bytes).1165 1166 @retval TRUE HMAC-MD5 digest computation succeeded.1167 @retval FALSE HMAC-MD5 digest computation failed.1168 @retval FALSE This interface is not supported.1169 1170 **/1171 BOOLEAN1172 EFIAPI1173 HmacMd5Final (1174 IN OUT VOID *HmacMd5Context,1175 OUT UINT8 *HmacValue1176 );1177 1178 /**1179 Retrieves the size, in bytes, of the context buffer required for HMAC-SHA1 operations.1180 (NOTE: This API is deprecated.1181 Use HmacSha1New() / HmacSha1Free() for HMAC-SHA1 Context operations.)1182 1183 If this interface is not supported, then return zero.1184 1185 @return The size, in bytes, of the context buffer required for HMAC-SHA1 operations.1186 @retval 0 This interface is not supported.1187 1188 **/1189 UINTN1190 EFIAPI1191 HmacSha1GetContextSize (1192 VOID1193 );1194 1195 /**1196 Allocates and initializes one HMAC_CTX context for subsequent HMAC-SHA1 use.1197 1198 If this interface is not supported, then return NULL.1199 1200 @return Pointer to the HMAC_CTX context that has been initialized.1201 If the allocations fails, HmacSha1New() returns NULL.1202 @return NULL This interface is not supported.1203 1204 **/1205 VOID *1206 EFIAPI1207 HmacSha1New (1208 VOID1209 );1210 1211 /**1212 Release the specified HMAC_CTX context.1213 1214 If this interface is not supported, then do nothing.1215 1216 @param[in] HmacSha1Ctx Pointer to the HMAC_CTX context to be released.1217 1218 **/1219 VOID1220 EFIAPI1221 HmacSha1Free (1222 IN VOID *HmacSha1Ctx1223 );1224 1225 /**1226 Initializes user-supplied memory pointed by HmacSha1Context as HMAC-SHA1 context for1227 subsequent use.1228 1229 If HmacSha1Context is NULL, then return FALSE.1230 If this interface is not supported, then return FALSE.1231 1232 @param[out] HmacSha1Context Pointer to HMAC-SHA1 context being initialized.1233 @param[in] Key Pointer to the user-supplied key.1234 @param[in] KeySize Key size in bytes.1235 1236 @retval TRUE HMAC-SHA1 context initialization succeeded.1237 @retval FALSE HMAC-SHA1 context initialization failed.1238 @retval FALSE This interface is not supported.1239 1240 **/1241 BOOLEAN1242 EFIAPI1243 HmacSha1Init (1244 OUT VOID *HmacSha1Context,1245 IN CONST UINT8 *Key,1246 IN UINTN KeySize1247 );1248 1249 /**1250 Makes a copy of an existing HMAC-SHA1 context.1251 1252 If HmacSha1Context is NULL, then return FALSE.1253 If NewHmacSha1Context is NULL, then return FALSE.1254 If this interface is not supported, then return FALSE.1255 1256 @param[in] HmacSha1Context Pointer to HMAC-SHA1 context being copied.1257 @param[out] NewHmacSha1Context Pointer to new HMAC-SHA1 context.1258 1259 @retval TRUE HMAC-SHA1 context copy succeeded.1260 @retval FALSE HMAC-SHA1 context copy failed.1261 @retval FALSE This interface is not supported.1262 1263 **/1264 BOOLEAN1265 EFIAPI1266 HmacSha1Duplicate (1267 IN CONST VOID *HmacSha1Context,1268 OUT VOID *NewHmacSha1Context1269 );1270 1271 /**1272 Digests the input data and updates HMAC-SHA1 context.1273 1274 This function performs HMAC-SHA1 digest on a data buffer of the specified size.1275 It can be called multiple times to compute the digest of long or discontinuous data streams.1276 HMAC-SHA1 context should be already correctly initialized by HmacSha1Init(), and should not1277 be finalized by HmacSha1Final(). Behavior with invalid context is undefined.1278 1279 If HmacSha1Context is NULL, then return FALSE.1280 If this interface is not supported, then return FALSE.1281 1282 @param[in, out] HmacSha1Context Pointer to the HMAC-SHA1 context.1283 @param[in] Data Pointer to the buffer containing the data to be digested.1284 @param[in] DataSize Size of Data buffer in bytes.1285 1286 @retval TRUE HMAC-SHA1 data digest succeeded.1287 @retval FALSE HMAC-SHA1 data digest failed.1288 @retval FALSE This interface is not supported.1289 1290 **/1291 BOOLEAN1292 EFIAPI1293 HmacSha1Update (1294 IN OUT VOID *HmacSha1Context,1295 IN CONST VOID *Data,1296 IN UINTN DataSize1297 );1298 1299 /**1300 Completes computation of the HMAC-SHA1 digest value.1301 1302 This function completes HMAC-SHA1 hash computation and retrieves the digest value into1303 the specified memory. After this function has been called, the HMAC-SHA1 context cannot1304 be used again.1305 HMAC-SHA1 context should be already correctly initialized by HmacSha1Init(), and should1306 not be finalized by HmacSha1Final(). Behavior with invalid HMAC-SHA1 context is undefined.1307 1308 If HmacSha1Context is NULL, then return FALSE.1309 If HmacValue is NULL, then return FALSE.1310 If this interface is not supported, then return FALSE.1311 1312 @param[in, out] HmacSha1Context Pointer to the HMAC-SHA1 context.1313 @param[out] HmacValue Pointer to a buffer that receives the HMAC-SHA1 digest1314 value (20 bytes).1315 1316 @retval TRUE HMAC-SHA1 digest computation succeeded.1317 @retval FALSE HMAC-SHA1 digest computation failed.1318 @retval FALSE This interface is not supported.1319 1320 **/1321 BOOLEAN1322 EFIAPI1323 HmacSha1Final (1324 IN OUT VOID *HmacSha1Context,1325 OUT UINT8 *HmacValue1326 );1327 1328 /**1329 Retrieves the size, in bytes, of the context buffer required for HMAC-SHA256 operations.1330 (NOTE: This API is deprecated.1331 Use HmacSha256New() / HmacSha256Free() for HMAC-SHA256 Context operations.)1332 1333 If this interface is not supported, then return zero.1334 1335 @return The size, in bytes, of the context buffer required for HMAC-SHA256 operations.1336 @retval 0 This interface is not supported.1337 1338 **/1339 UINTN1340 EFIAPI1341 HmacSha256GetContextSize (1342 VOID1343 );1344 1345 /**1346 884 Allocates and initializes one HMAC_CTX context for subsequent HMAC-SHA256 use. 1347 885 … … 1369 907 1370 908 /** 1371 Initializes user-supplied memory pointed by HmacSha256Context as HMAC-SHA256 context for1372 subsequent use.909 Set user-supplied key for subsequent use. It must be done before any 910 calling to HmacSha256Update(). 1373 911 1374 912 If HmacSha256Context is NULL, then return FALSE. 1375 913 If this interface is not supported, then return FALSE. 1376 914 1377 @param[out] HmacSha256Context Pointer to HMAC-SHA256 context being initialized.915 @param[out] HmacSha256Context Pointer to HMAC-SHA256 context. 1378 916 @param[in] Key Pointer to the user-supplied key. 1379 917 @param[in] KeySize Key size in bytes. 1380 918 1381 @retval TRUE HMAC-SHA256 context initialization succeeded.1382 @retval FALSE HMAC-SHA256 context initialization failed.1383 @retval FALSE This interface is not supported. 1384 1385 **/ 1386 BOOLEAN 1387 EFIAPI 1388 HmacSha256 Init(919 @retval TRUE The Key is set successfully. 920 @retval FALSE The Key is set unsuccessfully. 921 @retval FALSE This interface is not supported. 922 923 **/ 924 BOOLEAN 925 EFIAPI 926 HmacSha256SetKey ( 1389 927 OUT VOID *HmacSha256Context, 1390 928 IN CONST UINT8 *Key, … … 1419 957 This function performs HMAC-SHA256 digest on a data buffer of the specified size. 1420 958 It can be called multiple times to compute the digest of long or discontinuous data streams. 1421 HMAC-SHA256 context should be already correctly initialized by HmacSha256Init(), and should not1422 b e finalized by HmacSha256Final(). Behavior with invalid context is undefined.959 HMAC-SHA256 context should be initialized by HmacSha256New(), and should not be finalized 960 by HmacSha256Final(). Behavior with invalid context is undefined. 1423 961 1424 962 If HmacSha256Context is NULL, then return FALSE. … … 1448 986 the specified memory. After this function has been called, the HMAC-SHA256 context cannot 1449 987 be used again. 1450 HMAC-SHA256 context should be already correctly initialized by HmacSha256Init(), and should1451 not be finalizedby HmacSha256Final(). Behavior with invalid HMAC-SHA256 context is undefined.988 HMAC-SHA256 context should be initialized by HmacSha256New(), and should not be finalized 989 by HmacSha256Final(). Behavior with invalid HMAC-SHA256 context is undefined. 1452 990 1453 991 If HmacSha256Context is NULL, then return FALSE. … … 1474 1012 // Symmetric Cryptography Primitive 1475 1013 //===================================================================================== 1476 1477 /**1478 Retrieves the size, in bytes, of the context buffer required for TDES operations.1479 1480 If this interface is not supported, then return zero.1481 1482 @return The size, in bytes, of the context buffer required for TDES operations.1483 @retval 0 This interface is not supported.1484 1485 **/1486 UINTN1487 EFIAPI1488 TdesGetContextSize (1489 VOID1490 );1491 1492 /**1493 Initializes user-supplied memory as TDES context for subsequent use.1494 1495 This function initializes user-supplied memory pointed by TdesContext as TDES context.1496 In addition, it sets up all TDES key materials for subsequent encryption and decryption1497 operations.1498 There are 3 key options as follows:1499 KeyLength = 64, Keying option 1: K1 == K2 == K3 (Backward compatibility with DES)1500 KeyLength = 128, Keying option 2: K1 != K2 and K3 = K1 (Less Security)1501 KeyLength = 192 Keying option 3: K1 != K2 != K3 (Strongest)1502 1503 If TdesContext is NULL, then return FALSE.1504 If Key is NULL, then return FALSE.1505 If KeyLength is not valid, then return FALSE.1506 If this interface is not supported, then return FALSE.1507 1508 @param[out] TdesContext Pointer to TDES context being initialized.1509 @param[in] Key Pointer to the user-supplied TDES key.1510 @param[in] KeyLength Length of TDES key in bits.1511 1512 @retval TRUE TDES context initialization succeeded.1513 @retval FALSE TDES context initialization failed.1514 @retval FALSE This interface is not supported.1515 1516 **/1517 BOOLEAN1518 EFIAPI1519 TdesInit (1520 OUT VOID *TdesContext,1521 IN CONST UINT8 *Key,1522 IN UINTN KeyLength1523 );1524 1525 /**1526 Performs TDES encryption on a data buffer of the specified size in ECB mode.1527 1528 This function performs TDES encryption on data buffer pointed by Input, of specified1529 size of InputSize, in ECB mode.1530 InputSize must be multiple of block size (8 bytes). This function does not perform1531 padding. Caller must perform padding, if necessary, to ensure valid input data size.1532 TdesContext should be already correctly initialized by TdesInit(). Behavior with1533 invalid TDES context is undefined.1534 1535 If TdesContext is NULL, then return FALSE.1536 If Input is NULL, then return FALSE.1537 If InputSize is not multiple of block size (8 bytes), then return FALSE.1538 If Output is NULL, then return FALSE.1539 If this interface is not supported, then return FALSE.1540 1541 @param[in] TdesContext Pointer to the TDES context.1542 @param[in] Input Pointer to the buffer containing the data to be encrypted.1543 @param[in] InputSize Size of the Input buffer in bytes.1544 @param[out] Output Pointer to a buffer that receives the TDES encryption output.1545 1546 @retval TRUE TDES encryption succeeded.1547 @retval FALSE TDES encryption failed.1548 @retval FALSE This interface is not supported.1549 1550 **/1551 BOOLEAN1552 EFIAPI1553 TdesEcbEncrypt (1554 IN VOID *TdesContext,1555 IN CONST UINT8 *Input,1556 IN UINTN InputSize,1557 OUT UINT8 *Output1558 );1559 1560 /**1561 Performs TDES decryption on a data buffer of the specified size in ECB mode.1562 1563 This function performs TDES decryption on data buffer pointed by Input, of specified1564 size of InputSize, in ECB mode.1565 InputSize must be multiple of block size (8 bytes). This function does not perform1566 padding. Caller must perform padding, if necessary, to ensure valid input data size.1567 TdesContext should be already correctly initialized by TdesInit(). Behavior with1568 invalid TDES context is undefined.1569 1570 If TdesContext is NULL, then return FALSE.1571 If Input is NULL, then return FALSE.1572 If InputSize is not multiple of block size (8 bytes), then return FALSE.1573 If Output is NULL, then return FALSE.1574 If this interface is not supported, then return FALSE.1575 1576 @param[in] TdesContext Pointer to the TDES context.1577 @param[in] Input Pointer to the buffer containing the data to be decrypted.1578 @param[in] InputSize Size of the Input buffer in bytes.1579 @param[out] Output Pointer to a buffer that receives the TDES decryption output.1580 1581 @retval TRUE TDES decryption succeeded.1582 @retval FALSE TDES decryption failed.1583 @retval FALSE This interface is not supported.1584 1585 **/1586 BOOLEAN1587 EFIAPI1588 TdesEcbDecrypt (1589 IN VOID *TdesContext,1590 IN CONST UINT8 *Input,1591 IN UINTN InputSize,1592 OUT UINT8 *Output1593 );1594 1595 /**1596 Performs TDES encryption on a data buffer of the specified size in CBC mode.1597 1598 This function performs TDES encryption on data buffer pointed by Input, of specified1599 size of InputSize, in CBC mode.1600 InputSize must be multiple of block size (8 bytes). This function does not perform1601 padding. Caller must perform padding, if necessary, to ensure valid input data size.1602 Initialization vector should be one block size (8 bytes).1603 TdesContext should be already correctly initialized by TdesInit(). Behavior with1604 invalid TDES context is undefined.1605 1606 If TdesContext is NULL, then return FALSE.1607 If Input is NULL, then return FALSE.1608 If InputSize is not multiple of block size (8 bytes), then return FALSE.1609 If Ivec is NULL, then return FALSE.1610 If Output is NULL, then return FALSE.1611 If this interface is not supported, then return FALSE.1612 1613 @param[in] TdesContext Pointer to the TDES context.1614 @param[in] Input Pointer to the buffer containing the data to be encrypted.1615 @param[in] InputSize Size of the Input buffer in bytes.1616 @param[in] Ivec Pointer to initialization vector.1617 @param[out] Output Pointer to a buffer that receives the TDES encryption output.1618 1619 @retval TRUE TDES encryption succeeded.1620 @retval FALSE TDES encryption failed.1621 @retval FALSE This interface is not supported.1622 1623 **/1624 BOOLEAN1625 EFIAPI1626 TdesCbcEncrypt (1627 IN VOID *TdesContext,1628 IN CONST UINT8 *Input,1629 IN UINTN InputSize,1630 IN CONST UINT8 *Ivec,1631 OUT UINT8 *Output1632 );1633 1634 /**1635 Performs TDES decryption on a data buffer of the specified size in CBC mode.1636 1637 This function performs TDES decryption on data buffer pointed by Input, of specified1638 size of InputSize, in CBC mode.1639 InputSize must be multiple of block size (8 bytes). This function does not perform1640 padding. Caller must perform padding, if necessary, to ensure valid input data size.1641 Initialization vector should be one block size (8 bytes).1642 TdesContext should be already correctly initialized by TdesInit(). Behavior with1643 invalid TDES context is undefined.1644 1645 If TdesContext is NULL, then return FALSE.1646 If Input is NULL, then return FALSE.1647 If InputSize is not multiple of block size (8 bytes), then return FALSE.1648 If Ivec is NULL, then return FALSE.1649 If Output is NULL, then return FALSE.1650 If this interface is not supported, then return FALSE.1651 1652 @param[in] TdesContext Pointer to the TDES context.1653 @param[in] Input Pointer to the buffer containing the data to be encrypted.1654 @param[in] InputSize Size of the Input buffer in bytes.1655 @param[in] Ivec Pointer to initialization vector.1656 @param[out] Output Pointer to a buffer that receives the TDES encryption output.1657 1658 @retval TRUE TDES decryption succeeded.1659 @retval FALSE TDES decryption failed.1660 @retval FALSE This interface is not supported.1661 1662 **/1663 BOOLEAN1664 EFIAPI1665 TdesCbcDecrypt (1666 IN VOID *TdesContext,1667 IN CONST UINT8 *Input,1668 IN UINTN InputSize,1669 IN CONST UINT8 *Ivec,1670 OUT UINT8 *Output1671 );1672 1014 1673 1015 /** … … 1714 1056 IN CONST UINT8 *Key, 1715 1057 IN UINTN KeyLength 1716 );1717 1718 /**1719 Performs AES encryption on a data buffer of the specified size in ECB mode.1720 1721 This function performs AES encryption on data buffer pointed by Input, of specified1722 size of InputSize, in ECB mode.1723 InputSize must be multiple of block size (16 bytes). This function does not perform1724 padding. Caller must perform padding, if necessary, to ensure valid input data size.1725 AesContext should be already correctly initialized by AesInit(). Behavior with1726 invalid AES context is undefined.1727 1728 If AesContext is NULL, then return FALSE.1729 If Input is NULL, then return FALSE.1730 If InputSize is not multiple of block size (16 bytes), then return FALSE.1731 If Output is NULL, then return FALSE.1732 If this interface is not supported, then return FALSE.1733 1734 @param[in] AesContext Pointer to the AES context.1735 @param[in] Input Pointer to the buffer containing the data to be encrypted.1736 @param[in] InputSize Size of the Input buffer in bytes.1737 @param[out] Output Pointer to a buffer that receives the AES encryption output.1738 1739 @retval TRUE AES encryption succeeded.1740 @retval FALSE AES encryption failed.1741 @retval FALSE This interface is not supported.1742 1743 **/1744 BOOLEAN1745 EFIAPI1746 AesEcbEncrypt (1747 IN VOID *AesContext,1748 IN CONST UINT8 *Input,1749 IN UINTN InputSize,1750 OUT UINT8 *Output1751 );1752 1753 /**1754 Performs AES decryption on a data buffer of the specified size in ECB mode.1755 1756 This function performs AES decryption on data buffer pointed by Input, of specified1757 size of InputSize, in ECB mode.1758 InputSize must be multiple of block size (16 bytes). This function does not perform1759 padding. Caller must perform padding, if necessary, to ensure valid input data size.1760 AesContext should be already correctly initialized by AesInit(). Behavior with1761 invalid AES context is undefined.1762 1763 If AesContext is NULL, then return FALSE.1764 If Input is NULL, then return FALSE.1765 If InputSize is not multiple of block size (16 bytes), then return FALSE.1766 If Output is NULL, then return FALSE.1767 If this interface is not supported, then return FALSE.1768 1769 @param[in] AesContext Pointer to the AES context.1770 @param[in] Input Pointer to the buffer containing the data to be decrypted.1771 @param[in] InputSize Size of the Input buffer in bytes.1772 @param[out] Output Pointer to a buffer that receives the AES decryption output.1773 1774 @retval TRUE AES decryption succeeded.1775 @retval FALSE AES decryption failed.1776 @retval FALSE This interface is not supported.1777 1778 **/1779 BOOLEAN1780 EFIAPI1781 AesEcbDecrypt (1782 IN VOID *AesContext,1783 IN CONST UINT8 *Input,1784 IN UINTN InputSize,1785 OUT UINT8 *Output1786 1058 ); 1787 1059 … … 1862 1134 IN CONST UINT8 *Ivec, 1863 1135 OUT UINT8 *Output 1864 );1865 1866 /**1867 Retrieves the size, in bytes, of the context buffer required for ARC4 operations.1868 1869 If this interface is not supported, then return zero.1870 1871 @return The size, in bytes, of the context buffer required for ARC4 operations.1872 @retval 0 This interface is not supported.1873 1874 **/1875 UINTN1876 EFIAPI1877 Arc4GetContextSize (1878 VOID1879 );1880 1881 /**1882 Initializes user-supplied memory as ARC4 context for subsequent use.1883 1884 This function initializes user-supplied memory pointed by Arc4Context as ARC4 context.1885 In addition, it sets up all ARC4 key materials for subsequent encryption and decryption1886 operations.1887 1888 If Arc4Context is NULL, then return FALSE.1889 If Key is NULL, then return FALSE.1890 If KeySize does not in the range of [5, 256] bytes, then return FALSE.1891 If this interface is not supported, then return FALSE.1892 1893 @param[out] Arc4Context Pointer to ARC4 context being initialized.1894 @param[in] Key Pointer to the user-supplied ARC4 key.1895 @param[in] KeySize Size of ARC4 key in bytes.1896 1897 @retval TRUE ARC4 context initialization succeeded.1898 @retval FALSE ARC4 context initialization failed.1899 @retval FALSE This interface is not supported.1900 1901 **/1902 BOOLEAN1903 EFIAPI1904 Arc4Init (1905 OUT VOID *Arc4Context,1906 IN CONST UINT8 *Key,1907 IN UINTN KeySize1908 );1909 1910 /**1911 Performs ARC4 encryption on a data buffer of the specified size.1912 1913 This function performs ARC4 encryption on data buffer pointed by Input, of specified1914 size of InputSize.1915 Arc4Context should be already correctly initialized by Arc4Init(). Behavior with1916 invalid ARC4 context is undefined.1917 1918 If Arc4Context is NULL, then return FALSE.1919 If Input is NULL, then return FALSE.1920 If Output is NULL, then return FALSE.1921 If this interface is not supported, then return FALSE.1922 1923 @param[in, out] Arc4Context Pointer to the ARC4 context.1924 @param[in] Input Pointer to the buffer containing the data to be encrypted.1925 @param[in] InputSize Size of the Input buffer in bytes.1926 @param[out] Output Pointer to a buffer that receives the ARC4 encryption output.1927 1928 @retval TRUE ARC4 encryption succeeded.1929 @retval FALSE ARC4 encryption failed.1930 @retval FALSE This interface is not supported.1931 1932 **/1933 BOOLEAN1934 EFIAPI1935 Arc4Encrypt (1936 IN OUT VOID *Arc4Context,1937 IN CONST UINT8 *Input,1938 IN UINTN InputSize,1939 OUT UINT8 *Output1940 );1941 1942 /**1943 Performs ARC4 decryption on a data buffer of the specified size.1944 1945 This function performs ARC4 decryption on data buffer pointed by Input, of specified1946 size of InputSize.1947 Arc4Context should be already correctly initialized by Arc4Init(). Behavior with1948 invalid ARC4 context is undefined.1949 1950 If Arc4Context is NULL, then return FALSE.1951 If Input is NULL, then return FALSE.1952 If Output is NULL, then return FALSE.1953 If this interface is not supported, then return FALSE.1954 1955 @param[in, out] Arc4Context Pointer to the ARC4 context.1956 @param[in] Input Pointer to the buffer containing the data to be decrypted.1957 @param[in] InputSize Size of the Input buffer in bytes.1958 @param[out] Output Pointer to a buffer that receives the ARC4 decryption output.1959 1960 @retval TRUE ARC4 decryption succeeded.1961 @retval FALSE ARC4 decryption failed.1962 @retval FALSE This interface is not supported.1963 1964 **/1965 BOOLEAN1966 EFIAPI1967 Arc4Decrypt (1968 IN OUT VOID *Arc4Context,1969 IN UINT8 *Input,1970 IN UINTN InputSize,1971 OUT UINT8 *Output1972 );1973 1974 /**1975 Resets the ARC4 context to the initial state.1976 1977 The function resets the ARC4 context to the state it had immediately after the1978 ARC4Init() function call.1979 Contrary to ARC4Init(), Arc4Reset() requires no secret key as input, but ARC4 context1980 should be already correctly initialized by ARC4Init().1981 1982 If Arc4Context is NULL, then return FALSE.1983 If this interface is not supported, then return FALSE.1984 1985 @param[in, out] Arc4Context Pointer to the ARC4 context.1986 1987 @retval TRUE ARC4 reset succeeded.1988 @retval FALSE ARC4 reset failed.1989 @retval FALSE This interface is not supported.1990 1991 **/1992 BOOLEAN1993 EFIAPI1994 Arc4Reset (1995 IN OUT VOID *Arc4Context1996 1136 ); 1997 1137 … … 2421 1561 IN UINTN CertSize, 2422 1562 OUT UINT8 **SingleX509Cert 1563 ); 1564 1565 /** 1566 Construct a X509 stack object from a list of DER-encoded certificate data. 1567 1568 If X509Stack is NULL, then return FALSE. 1569 If this interface is not supported, then return FALSE. 1570 1571 @param[in, out] X509Stack On input, pointer to an existing or NULL X509 stack object. 1572 On output, pointer to the X509 stack object with new 1573 inserted X509 certificate. 1574 @param[in] Args VA_LIST marker for the variable argument list. 1575 A list of DER-encoded single certificate data followed 1576 by certificate size. A NULL terminates the list. The 1577 pairs are the arguments to X509ConstructCertificate(). 1578 1579 @retval TRUE The X509 stack construction succeeded. 1580 @retval FALSE The construction operation failed. 1581 @retval FALSE This interface is not supported. 1582 1583 **/ 1584 BOOLEAN 1585 EFIAPI 1586 X509ConstructCertificateStackV ( 1587 IN OUT UINT8 **X509Stack, 1588 IN VA_LIST Args 2423 1589 ); 2424 1590 -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Include/Library/TlsLib.h
r80721 r85718 398 398 399 399 /** 400 Set the specified host name to be verified. 401 402 @param[in] Tls Pointer to the TLS object. 403 @param[in] Flags The setting flags during the validation. 404 @param[in] HostName The specified host name to be verified. 405 406 @retval EFI_SUCCESS The HostName setting was set successfully. 407 @retval EFI_INVALID_PARAMETER The parameter is invalid. 408 @retval EFI_ABORTED Invalid HostName setting. 409 410 **/ 411 EFI_STATUS 412 EFIAPI 413 TlsSetVerifyHost ( 414 IN VOID *Tls, 415 IN UINT32 Flags, 416 IN CHAR8 *HostName 417 ); 418 419 /** 400 420 Sets a TLS/SSL session ID to be used during TLS/SSL connect. 401 421 -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
r80721 r85718 7 7 # buffer overflow or integer overflow. 8 8 # 9 # Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR> 9 # Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR> 10 # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> 10 11 # SPDX-License-Identifier: BSD-2-Clause-Patent 11 12 # … … 24 25 # The following information is for reference only and not required by the build tools. 25 26 # 26 # VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 27 # VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 RISCV64 27 28 # 28 29 29 30 [Sources] 30 31 InternalCryptLib.h 31 Hash/CryptMd4.c32 32 Hash/CryptMd5.c 33 33 Hash/CryptSha1.c … … 35 35 Hash/CryptSha512.c 36 36 Hash/CryptSm3.c 37 Hmac/CryptHmacMd5.c38 Hmac/CryptHmacSha1.c39 37 Hmac/CryptHmacSha256.c 40 38 Kdf/CryptHkdf.c 41 39 Cipher/CryptAes.c 42 Cipher/CryptTdes.c43 Cipher/CryptArc4.c44 40 Pk/CryptRsaBasic.c 45 41 Pk/CryptRsaExt.c … … 59 55 SysCall/TimerWrapper.c 60 56 SysCall/BaseMemAllocation.c 57 SysCall/inet_pton.c 61 58 62 59 [Sources.Ia32] … … 70 67 71 68 [Sources.AARCH64] 69 Rand/CryptRand.c 70 71 [Sources.RISCV64] 72 72 Rand/CryptRand.c 73 73 … … 102 102 GCC:*_CLANG35_*_CC_FLAGS = -std=c99 103 103 GCC:*_CLANG38_*_CC_FLAGS = -std=c99 104 GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=incompatible-pointer-types 104 105 105 106 XCODE:*_*_*_CC_FLAGS = -std=c99 -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/Cipher/CryptAes.c
r80721 r85718 76 76 return FALSE; 77 77 } 78 return TRUE;79 }80 81 /**82 Performs AES encryption on a data buffer of the specified size in ECB mode.83 84 This function performs AES encryption on data buffer pointed by Input, of specified85 size of InputSize, in ECB mode.86 InputSize must be multiple of block size (16 bytes). This function does not perform87 padding. Caller must perform padding, if necessary, to ensure valid input data size.88 AesContext should be already correctly initialized by AesInit(). Behavior with89 invalid AES context is undefined.90 91 If AesContext is NULL, then return FALSE.92 If Input is NULL, then return FALSE.93 If InputSize is not multiple of block size (16 bytes), then return FALSE.94 If Output is NULL, then return FALSE.95 96 @param[in] AesContext Pointer to the AES context.97 @param[in] Input Pointer to the buffer containing the data to be encrypted.98 @param[in] InputSize Size of the Input buffer in bytes.99 @param[out] Output Pointer to a buffer that receives the AES encryption output.100 101 @retval TRUE AES encryption succeeded.102 @retval FALSE AES encryption failed.103 104 **/105 BOOLEAN106 EFIAPI107 AesEcbEncrypt (108 IN VOID *AesContext,109 IN CONST UINT8 *Input,110 IN UINTN InputSize,111 OUT UINT8 *Output112 )113 {114 AES_KEY *AesKey;115 116 //117 // Check input parameters.118 //119 if (AesContext == NULL || Input == NULL || (InputSize % AES_BLOCK_SIZE) != 0 || Output == NULL) {120 return FALSE;121 }122 123 AesKey = (AES_KEY *) AesContext;124 125 //126 // Perform AES data encryption with ECB mode (block-by-block)127 //128 while (InputSize > 0) {129 AES_ecb_encrypt (Input, Output, AesKey, AES_ENCRYPT);130 Input += AES_BLOCK_SIZE;131 Output += AES_BLOCK_SIZE;132 InputSize -= AES_BLOCK_SIZE;133 }134 135 return TRUE;136 }137 138 /**139 Performs AES decryption on a data buffer of the specified size in ECB mode.140 141 This function performs AES decryption on data buffer pointed by Input, of specified142 size of InputSize, in ECB mode.143 InputSize must be multiple of block size (16 bytes). This function does not perform144 padding. Caller must perform padding, if necessary, to ensure valid input data size.145 AesContext should be already correctly initialized by AesInit(). Behavior with146 invalid AES context is undefined.147 148 If AesContext is NULL, then return FALSE.149 If Input is NULL, then return FALSE.150 If InputSize is not multiple of block size (16 bytes), then return FALSE.151 If Output is NULL, then return FALSE.152 153 @param[in] AesContext Pointer to the AES context.154 @param[in] Input Pointer to the buffer containing the data to be decrypted.155 @param[in] InputSize Size of the Input buffer in bytes.156 @param[out] Output Pointer to a buffer that receives the AES decryption output.157 158 @retval TRUE AES decryption succeeded.159 @retval FALSE AES decryption failed.160 161 **/162 BOOLEAN163 EFIAPI164 AesEcbDecrypt (165 IN VOID *AesContext,166 IN CONST UINT8 *Input,167 IN UINTN InputSize,168 OUT UINT8 *Output169 )170 {171 AES_KEY *AesKey;172 173 //174 // Check input parameters.175 //176 if (AesContext == NULL || Input == NULL || (InputSize % AES_BLOCK_SIZE) != 0 || Output == NULL) {177 return FALSE;178 }179 180 AesKey = (AES_KEY *) AesContext;181 182 //183 // Perform AES data decryption with ECB mode (block-by-block)184 //185 while (InputSize > 0) {186 AES_ecb_encrypt (Input, Output, AesKey + 1, AES_DECRYPT);187 Input += AES_BLOCK_SIZE;188 Output += AES_BLOCK_SIZE;189 InputSize -= AES_BLOCK_SIZE;190 }191 192 78 return TRUE; 193 79 } -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/Cipher/CryptAesNull.c
r80721 r85718 45 45 IN CONST UINT8 *Key, 46 46 IN UINTN KeyLength 47 )48 {49 ASSERT (FALSE);50 return FALSE;51 }52 53 /**54 Performs AES encryption on a data buffer of the specified size in ECB mode.55 56 Return FALSE to indicate this interface is not supported.57 58 @param[in] AesContext Pointer to the AES context.59 @param[in] Input Pointer to the buffer containing the data to be encrypted.60 @param[in] InputSize Size of the Input buffer in bytes.61 @param[out] Output Pointer to a buffer that receives the AES encryption output.62 63 @retval FALSE This interface is not supported.64 65 **/66 BOOLEAN67 EFIAPI68 AesEcbEncrypt (69 IN VOID *AesContext,70 IN CONST UINT8 *Input,71 IN UINTN InputSize,72 OUT UINT8 *Output73 )74 {75 ASSERT (FALSE);76 return FALSE;77 }78 79 /**80 Performs AES decryption on a data buffer of the specified size in ECB mode.81 82 Return FALSE to indicate this interface is not supported.83 84 @param[in] AesContext Pointer to the AES context.85 @param[in] Input Pointer to the buffer containing the data to be decrypted.86 @param[in] InputSize Size of the Input buffer in bytes.87 @param[out] Output Pointer to a buffer that receives the AES decryption output.88 89 @retval FALSE This interface is not supported.90 91 **/92 BOOLEAN93 EFIAPI94 AesEcbDecrypt (95 IN VOID *AesContext,96 IN CONST UINT8 *Input,97 IN UINTN InputSize,98 OUT UINT8 *Output99 47 ) 100 48 { -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256.c
r80721 r85718 2 2 HMAC-SHA256 Wrapper Implementation over OpenSSL. 3 3 4 Copyright (c) 2016 - 20 17, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.<BR> 5 5 SPDX-License-Identifier: BSD-2-Clause-Patent 6 6 … … 10 10 #include <openssl/hmac.h> 11 11 12 //13 // NOTE: OpenSSL redefines the size of HMAC_CTX at crypto/hmac/hmac_lcl.h14 // #define HMAC_MAX_MD_CBLOCK_SIZE 14415 //16 #define HMAC_SHA256_CTX_SIZE (sizeof(void *) * 4 + sizeof(unsigned int) + \17 sizeof(unsigned char) * 144)18 19 /**20 Retrieves the size, in bytes, of the context buffer required for HMAC-SHA256 operations.21 (NOTE: This API is deprecated.22 Use HmacSha256New() / HmacSha256Free() for HMAC-SHA256 Context operations.)23 24 @return The size, in bytes, of the context buffer required for HMAC-SHA256 operations.25 26 **/27 UINTN28 EFIAPI29 HmacSha256GetContextSize (30 VOID31 )32 {33 //34 // Retrieves the OpenSSL HMAC-SHA256 Context Size35 // NOTE: HMAC_CTX object was made opaque in openssl-1.1.x, here we just use the36 // fixed size as a workaround to make this API work for compatibility.37 // We should retire HmacSha256GetContextSize() in future, and use HmacSha256New()38 // and HmacSha256Free() for context allocation and release.39 //40 return (UINTN)HMAC_SHA256_CTX_SIZE;41 }42 43 12 /** 44 13 Allocates and initializes one HMAC_CTX context for subsequent HMAC-SHA256 use. … … 79 48 80 49 /** 81 Initializes user-supplied memory pointed by HmacSha256Context as HMAC-SHA256 context for82 subsequent use.83 84 If HmacSha256Context is NULL, then return FALSE. 85 86 @param[out] HmacSha256Context Pointer to HMAC-SHA256 context being initialized.50 Set user-supplied key for subsequent use. It must be done before any 51 calling to HmacSha256Update(). 52 53 If HmacSha256Context is NULL, then return FALSE. 54 55 @param[out] HmacSha256Context Pointer to HMAC-SHA256 context. 87 56 @param[in] Key Pointer to the user-supplied key. 88 57 @param[in] KeySize Key size in bytes. 89 58 90 @retval TRUE HMAC-SHA256 context initialization succeeded.91 @retval FALSE HMAC-SHA256 context initialization failed.92 93 **/ 94 BOOLEAN 95 EFIAPI 96 HmacSha256 Init(59 @retval TRUE The Key is set successfully. 60 @retval FALSE The Key is set unsuccessfully. 61 62 **/ 63 BOOLEAN 64 EFIAPI 65 HmacSha256SetKey ( 97 66 OUT VOID *HmacSha256Context, 98 67 IN CONST UINT8 *Key, … … 107 76 } 108 77 109 //110 // OpenSSL HMAC-SHA256 Context Initialization111 //112 memset(HmacSha256Context, 0, HMAC_SHA256_CTX_SIZE);113 if (HMAC_CTX_reset ((HMAC_CTX *)HmacSha256Context) != 1) {114 return FALSE;115 }116 78 if (HMAC_Init_ex ((HMAC_CTX *)HmacSha256Context, Key, (UINT32) KeySize, EVP_sha256(), NULL) != 1) { 117 79 return FALSE; … … 160 122 This function performs HMAC-SHA256 digest on a data buffer of the specified size. 161 123 It can be called multiple times to compute the digest of long or discontinuous data streams. 162 HMAC-SHA256 context should be already correctly initialized by HmacSha256Init(), and should not163 b e finalized by HmacSha256Final(). Behavior with invalid context is undefined.124 HMAC-SHA256 context should be initialized by HmacSha256New(), and should not be finalized 125 by HmacSha256Final(). Behavior with invalid context is undefined. 164 126 165 127 If HmacSha256Context is NULL, then return FALSE. … … 211 173 the specified memory. After this function has been called, the HMAC-SHA256 context cannot 212 174 be used again. 213 HMAC-SHA256 context should be already correctly initialized by HmacSha256Init(), and should214 not be finalizedby HmacSha256Final(). Behavior with invalid HMAC-SHA256 context is undefined.175 HMAC-SHA256 context should be initialized by HmacSha256New(), and should not be finalized 176 by HmacSha256Final(). Behavior with invalid HMAC-SHA256 context is undefined. 215 177 216 178 If HmacSha256Context is NULL, then return FALSE. -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256Null.c
r80721 r85718 2 2 HMAC-SHA256 Wrapper Implementation which does not provide real capabilities. 3 3 4 Copyright (c) 2016 - 20 17, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.<BR> 5 5 SPDX-License-Identifier: BSD-2-Clause-Patent 6 6 … … 8 8 9 9 #include "InternalCryptLib.h" 10 11 /**12 Retrieves the size, in bytes, of the context buffer required for HMAC-SHA256 operations.13 (NOTE: This API is deprecated.14 Use HmacSha256New() / HmacSha256Free() for HMAC-SHA256 Context operations.)15 16 Return zero to indicate this interface is not supported.17 18 @retval 0 This interface is not supported.19 20 **/21 UINTN22 EFIAPI23 HmacSha256GetContextSize (24 VOID25 )26 {27 ASSERT (FALSE);28 return 0;29 }30 10 31 11 /** … … 66 46 67 47 /** 68 Initializes user-supplied memory pointed by HmacSha256Context as HMAC-SHA256 context for69 subsequent use.48 Set user-supplied key for subsequent use. It must be done before any 49 calling to HmacSha256Update(). 70 50 71 51 Return FALSE to indicate this interface is not supported. 72 52 73 @param[out] HmacSha256Context Pointer to HMAC-SHA256 context being initialized.53 @param[out] HmacSha256Context Pointer to HMAC-SHA256 context. 74 54 @param[in] Key Pointer to the user-supplied key. 75 55 @param[in] KeySize Key size in bytes. … … 80 60 BOOLEAN 81 61 EFIAPI 82 HmacSha256 Init(62 HmacSha256SetKey ( 83 63 OUT VOID *HmacSha256Context, 84 64 IN CONST UINT8 *Key, -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
r80721 r85718 7 7 # buffer overflow or integer overflow. 8 8 # 9 # Note: MD4 Digest functions,10 # HMAC- MD5 functions, HMAC-SHA1/SHA256 functions, AES/TDES/ARC4functions, RSA external9 # Note: 10 # HMAC-SHA256 functions, AES functions, RSA external 11 11 # functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, X.509 12 12 # certificate handler functions, authenticode signature verification functions, … … 14 14 # supported in this instance. 15 15 # 16 # Copyright (c) 2010 - 20 19, Intel Corporation. All rights reserved.<BR>16 # Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.<BR> 17 17 # SPDX-License-Identifier: BSD-2-Clause-Patent 18 18 # … … 36 36 [Sources] 37 37 InternalCryptLib.h 38 Hash/CryptMd4Null.c39 38 Hash/CryptMd5.c 40 39 Hash/CryptSha1.c … … 42 41 Hash/CryptSm3.c 43 42 Hash/CryptSha512.c 44 Hmac/CryptHmacMd5Null.c45 Hmac/CryptHmacSha1Null.c46 43 Hmac/CryptHmacSha256Null.c 47 44 Kdf/CryptHkdfNull.c 48 45 Cipher/CryptAesNull.c 49 Cipher/CryptTdesNull.c50 Cipher/CryptArc4Null.c51 46 Pk/CryptRsaBasic.c 52 47 Pk/CryptRsaExtNull.c … … 97 92 GCC:*_CLANG35_*_CC_FLAGS = -std=c99 98 93 GCC:*_CLANG38_*_CC_FLAGS = -std=c99 94 GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=incompatible-pointer-types 99 95 100 96 XCODE:*_*_*_CC_FLAGS = -std=c99 -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.uni
r80721 r85718 7 7 // buffer overflow or integer overflow. 8 8 // 9 // Note: MD4 Digest functions, HMAC-MD5 functions, HMAC-SHA1 functions, AES/10 // TDES/ARC4functions, RSA external functions, PKCS#7 SignedData sign functions,9 // Note: AES 10 // functions, RSA external functions, PKCS#7 SignedData sign functions, 11 11 // Diffie-Hellman functions, X.509 certificate handler functions, authenticode 12 12 // signature verification functions, PEM handler functions, and pseudorandom number 13 13 // generator functions are not supported in this instance. 14 14 // 15 // Copyright (c) 2010 - 20 18, Intel Corporation. All rights reserved.<BR>15 // Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.<BR> 16 16 // 17 17 // SPDX-License-Identifier: BSD-2-Clause-Patent … … 22 22 #string STR_MODULE_ABSTRACT #language en-US "Cryptographic Library Instance for PEIM" 23 23 24 #string STR_MODULE_DESCRIPTION #language en-US "Caution: This module requires additional review when modified. This library will have external input - signature. This external input must be validated carefully to avoid security issues such as buffer overflow or integer overflow. Note: MD4 Digest functions, HMAC-MD5 functions, HMAC-SHA1 functions, AES/ TDES/ARC4functions, RSA external functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, X.509 certificate handler functions, authenticode signature verification functions, PEM handler functions, and pseudorandom number generator functions are not supported in this instance."24 #string STR_MODULE_DESCRIPTION #language en-US "Caution: This module requires additional review when modified. This library will have external input - signature. This external input must be validated carefully to avoid security issues such as buffer overflow or integer overflow. Note: AES functions, RSA external functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, X.509 certificate handler functions, authenticode signature verification functions, PEM handler functions, and pseudorandom number generator functions are not supported in this instance." 25 25 -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/Pem/CryptPem.c
r80721 r85718 2 2 PEM (Privacy Enhanced Mail) Format Handler Wrapper Implementation over OpenSSL. 3 3 4 Copyright (c) 2010 - 20 18, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.<BR> 5 5 SPDX-License-Identifier: BSD-2-Clause-Patent 6 6 … … 83 83 // 84 84 // Add possible block-cipher descriptor for PEM data decryption. 85 // NOTE: Only support most popular ciphers (3DES, AES)for the encrypted PEM.85 // NOTE: Only support most popular ciphers AES for the encrypted PEM. 86 86 // 87 if (EVP_add_cipher (EVP_des_ede3_cbc ()) == 0) {88 return FALSE;89 }90 87 if (EVP_add_cipher (EVP_aes_128_cbc ()) == 0) { 91 88 return FALSE; -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyBase.c
r80721 r85718 13 13 #include <openssl/x509v3.h> 14 14 #include <openssl/pkcs7.h> 15 16 /** 17 Check the contents of PKCS7 is not data. 18 19 It is copied from PKCS7_type_is_other() in pk7_doit.c. 20 21 @param[in] P7 Pointer to the location at which the PKCS7 is located. 22 23 @retval TRUE If the type is others. 24 @retval FALSE If the type is expected. 25 **/ 26 STATIC 27 BOOLEAN 28 Pkcs7TypeIsOther ( 29 IN PKCS7 *P7 30 ) 31 { 32 BOOLEAN Others; 33 INTN Nid = OBJ_obj2nid (P7->type); 34 35 switch (Nid) { 36 case NID_pkcs7_data: 37 case NID_pkcs7_signed: 38 case NID_pkcs7_enveloped: 39 case NID_pkcs7_signedAndEnveloped: 40 case NID_pkcs7_encrypted: 41 Others = FALSE; 42 break; 43 default: 44 Others = TRUE; 45 } 46 47 return Others; 48 } 49 50 /** 51 Get the ASN.1 string for the PKCS7. 52 53 It is copied from PKCS7_get_octet_string() in pk7_doit.c. 54 55 @param[in] P7 Pointer to the location at which the PKCS7 is located. 56 57 @return ASN1_OCTET_STRING ASN.1 string. 58 **/ 59 STATIC 60 ASN1_OCTET_STRING* 61 Pkcs7GetOctetString ( 62 IN PKCS7 *P7 63 ) 64 { 65 if (PKCS7_type_is_data (P7)) { 66 return P7->d.data; 67 } 68 69 if (Pkcs7TypeIsOther(P7) && (P7->d.other != NULL) && 70 (P7->d.other->type == V_ASN1_OCTET_STRING)) { 71 return P7->d.other->value.octet_string; 72 } 73 74 return NULL; 75 } 15 76 16 77 /** … … 99 160 // Retrieve the attached content in PKCS7 signedData 100 161 // 101 OctStr = Pkcs7->d.sign->contents->d.data; 162 OctStr = Pkcs7GetOctetString (Pkcs7->d.sign->contents); 163 if (OctStr == NULL) { 164 goto _Exit; 165 } 166 102 167 if ((OctStr->length > 0) && (OctStr->data != NULL)) { 103 168 *ContentSize = OctStr->length; -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaBasic.c
r80721 r85718 8 8 4) RsaPkcs1Verify 9 9 10 Copyright (c) 2009 - 20 18, Intel Corporation. All rights reserved.<BR>10 Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR> 11 11 SPDX-License-Identifier: BSD-2-Clause-Patent 12 12 … … 251 251 If MessageHash is NULL, then return FALSE. 252 252 If Signature is NULL, then return FALSE. 253 If HashSize is not equal to the size of MD5, SHA-1 or SHA-256digest, then return FALSE.253 If HashSize is not equal to the size of MD5, SHA-1, SHA-256, SHA-384 or SHA-512 digest, then return FALSE. 254 254 255 255 @param[in] RsaContext Pointer to RSA context for signature verification. … … 289 289 // 290 290 // Determine the message digest algorithm according to digest size. 291 // Only MD5, SHA-1 or SHA-256algorithm is supported.291 // Only MD5, SHA-1, SHA-256, SHA-384 or SHA-512 algorithm is supported. 292 292 // 293 293 switch (HashSize) { … … 302 302 case SHA256_DIGEST_SIZE: 303 303 DigestType = NID_sha256; 304 break; 305 306 case SHA384_DIGEST_SIZE: 307 DigestType = NID_sha384; 308 break; 309 310 case SHA512_DIGEST_SIZE: 311 DigestType = NID_sha512; 304 312 break; 305 313 -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaExt.c
r80721 r85718 8 8 4) RsaPkcs1Sign 9 9 10 Copyright (c) 2009 - 20 18, Intel Corporation. All rights reserved.<BR>10 Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR> 11 11 SPDX-License-Identifier: BSD-2-Clause-Patent 12 12 … … 277 277 If RsaContext is NULL, then return FALSE. 278 278 If MessageHash is NULL, then return FALSE. 279 If HashSize is not equal to the size of MD5, SHA-1 or SHA-256digest, then return FALSE.279 If HashSize is not equal to the size of MD5, SHA-1, SHA-256, SHA-384 or SHA-512 digest, then return FALSE. 280 280 If SigSize is large enough but Signature is NULL, then return FALSE. 281 281 … … 327 327 // 328 328 // Determine the message digest algorithm according to digest size. 329 // Only MD5, SHA-1 or SHA-256algorithm is supported.329 // Only MD5, SHA-1, SHA-256, SHA-384 or SHA-512 algorithm is supported. 330 330 // 331 331 switch (HashSize) { … … 340 340 case SHA256_DIGEST_SIZE: 341 341 DigestType = NID_sha256; 342 break; 343 344 case SHA384_DIGEST_SIZE: 345 DigestType = NID_sha384; 346 break; 347 348 case SHA512_DIGEST_SIZE: 349 DigestType = NID_sha512; 342 350 break; 343 351 -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c
r80721 r85718 2 2 X.509 Certificate Handler Wrapper Implementation over OpenSSL. 3 3 4 Copyright (c) 2010 - 20 18, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.<BR> 5 5 SPDX-License-Identifier: BSD-2-Clause-Patent 6 6 … … 61 61 62 62 If X509Stack is NULL, then return FALSE. 63 If this interface is not supported, then return FALSE. 63 64 64 65 @param[in, out] X509Stack On input, pointer to an existing or NULL X509 stack object. 65 66 On output, pointer to the X509 stack object with new 66 67 inserted X509 certificate. 67 @param ... A list of DER-encoded single certificate data followed 68 @param[in] Args VA_LIST marker for the variable argument list. 69 A list of DER-encoded single certificate data followed 68 70 by certificate size. A NULL terminates the list. The 69 71 pairs are the arguments to X509ConstructCertificate(). … … 71 73 @retval TRUE The X509 stack construction succeeded. 72 74 @retval FALSE The construction operation failed. 75 @retval FALSE This interface is not supported. 73 76 74 77 **/ 75 78 BOOLEAN 76 79 EFIAPI 77 X509ConstructCertificateStack (78 IN OUT UINT8 **X509Stack,79 ...80 X509ConstructCertificateStackV ( 81 IN OUT UINT8 **X509Stack, 82 IN VA_LIST Args 80 83 ) 81 84 { … … 85 88 STACK_OF(X509) *CertStack; 86 89 BOOLEAN Status; 87 VA_LIST Args;88 90 UINTN Index; 89 91 … … 107 109 } 108 110 } 109 110 VA_START (Args, X509Stack);111 111 112 112 for (Index = 0; ; Index++) { … … 146 146 } 147 147 148 VA_END (Args);149 150 148 if (!Status) { 151 149 sk_X509_pop_free (CertStack, X509_free); … … 155 153 156 154 return Status; 155 } 156 157 /** 158 Construct a X509 stack object from a list of DER-encoded certificate data. 159 160 If X509Stack is NULL, then return FALSE. 161 162 @param[in, out] X509Stack On input, pointer to an existing or NULL X509 stack object. 163 On output, pointer to the X509 stack object with new 164 inserted X509 certificate. 165 @param ... A list of DER-encoded single certificate data followed 166 by certificate size. A NULL terminates the list. The 167 pairs are the arguments to X509ConstructCertificate(). 168 169 @retval TRUE The X509 stack construction succeeded. 170 @retval FALSE The construction operation failed. 171 172 **/ 173 BOOLEAN 174 EFIAPI 175 X509ConstructCertificateStack ( 176 IN OUT UINT8 **X509Stack, 177 ... 178 ) 179 { 180 VA_LIST Args; 181 BOOLEAN Result; 182 183 VA_START (Args, X509Stack); 184 Result = X509ConstructCertificateStackV (X509Stack, Args); 185 VA_END (Args); 186 return Result; 157 187 } 158 188 -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509Null.c
r80721 r85718 3 3 real capabilities. 4 4 5 Copyright (c) 2012 - 20 18, Intel Corporation. All rights reserved.<BR>5 Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved.<BR> 6 6 SPDX-License-Identifier: BSD-2-Clause-Patent 7 7 … … 28 28 IN UINTN CertSize, 29 29 OUT UINT8 **SingleX509Cert 30 ) 31 { 32 ASSERT (FALSE); 33 return FALSE; 34 } 35 36 /** 37 Construct a X509 stack object from a list of DER-encoded certificate data. 38 39 If X509Stack is NULL, then return FALSE. 40 If this interface is not supported, then return FALSE. 41 42 @param[in, out] X509Stack On input, pointer to an existing or NULL X509 stack object. 43 On output, pointer to the X509 stack object with new 44 inserted X509 certificate. 45 @param[in] Args VA_LIST marker for the variable argument list. 46 A list of DER-encoded single certificate data followed 47 by certificate size. A NULL terminates the list. The 48 pairs are the arguments to X509ConstructCertificate(). 49 50 @retval TRUE The X509 stack construction succeeded. 51 @retval FALSE The construction operation failed. 52 @retval FALSE This interface is not supported. 53 54 **/ 55 BOOLEAN 56 EFIAPI 57 X509ConstructCertificateStackV ( 58 IN OUT UINT8 **X509Stack, 59 IN VA_LIST Args 30 60 ) 31 61 { -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
r80721 r85718 7 7 # buffer overflow or integer overflow. 8 8 # 9 # Note: MD4 Digest functions,SHA-384 Digest functions, SHA-512 Digest functions,10 # HMAC- MD5 functions, HMAC-SHA1/SHA256 functions, AES/TDES/ARC4functions, RSA external9 # Note: SHA-384 Digest functions, SHA-512 Digest functions, 10 # HMAC-SHA256 functions, AES functions, RSA external 11 11 # functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and 12 12 # authenticode signature verification functions are not supported in this instance. 13 13 # 14 # Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR> 14 # Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR> 15 # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> 15 16 # SPDX-License-Identifier: BSD-2-Clause-Patent 16 17 # … … 35 36 [Sources] 36 37 InternalCryptLib.h 37 Hash/CryptMd4Null.c38 38 Hash/CryptMd5.c 39 39 Hash/CryptSha1.c … … 41 41 Hash/CryptSm3.c 42 42 Hash/CryptSha512Null.c 43 Hmac/CryptHmacMd5Null.c44 Hmac/CryptHmacSha1Null.c45 43 Hmac/CryptHmacSha256Null.c 46 44 Kdf/CryptHkdfNull.c 47 45 Cipher/CryptAesNull.c 48 Cipher/CryptTdesNull.c49 Cipher/CryptArc4Null.c50 46 Pk/CryptRsaBasic.c 51 47 Pk/CryptRsaExtNull.c … … 76 72 77 73 [Sources.AARCH64] 74 Rand/CryptRand.c 75 76 [Sources.RISCV64] 78 77 Rand/CryptRand.c 79 78 … … 108 107 GCC:*_CLANG35_*_CC_FLAGS = -std=c99 109 108 GCC:*_CLANG38_*_CC_FLAGS = -std=c99 109 GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=incompatible-pointer-types 110 110 111 111 XCODE:*_*_*_CC_FLAGS = -std=c99 -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.uni
r80721 r85718 7 7 // buffer overflow or integer overflow. 8 8 // 9 // Note: MD4 Digest functions, HMAC-MD5 functions, HMAC-SHA1 functions, AES/10 // TDES/ARC4functions, RSA external functions, PKCS#7 SignedData sign functions,9 // Note: AES 10 // functions, RSA external functions, PKCS#7 SignedData sign functions, 11 11 // Diffie-Hellman functions, and authenticode signature verification functions are 12 12 // not supported in this instance. 13 13 // 14 // Copyright (c) 2009 - 20 18, Intel Corporation. All rights reserved.<BR>14 // Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR> 15 15 // 16 16 // SPDX-License-Identifier: BSD-2-Clause-Patent … … 21 21 #string STR_MODULE_ABSTRACT #language en-US "Cryptographic Library Instance for DXE_RUNTIME_DRIVER" 22 22 23 #string STR_MODULE_DESCRIPTION #language en-US "Caution: This module requires additional review when modified. This library will have external input - signature. This external input must be validated carefully to avoid security issues such as buffer overflow or integer overflow. Note: MD4 Digest functions, HMAC-MD5 functions, HMAC-SHA1 functions, AES/ TDES/ARC4functions, RSA external functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and authenticode signature verification functions are not supported in this instance."23 #string STR_MODULE_DESCRIPTION #language en-US "Caution: This module requires additional review when modified. This library will have external input - signature. This external input must be validated carefully to avoid security issues such as buffer overflow or integer overflow. Note: AES functions, RSA external functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and authenticode signature verification functions are not supported in this instance." 24 24 -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
r80721 r85718 7 7 # buffer overflow or integer overflow. 8 8 # 9 # Note: MD4 Digest functions, SHA-384 Digest functions, SHA-512 Digest functions, 10 # HMAC-MD5 functions, HMAC-SHA1 functions, TDES/ARC4 functions, RSA external 11 # functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and 9 # Note: SHA-384 Digest functions, SHA-512 Digest functions, 10 # RSA external functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and 12 11 # authenticode signature verification functions are not supported in this instance. 13 12 # 14 # Copyright (c) 2010 - 20 19, Intel Corporation. All rights reserved.<BR>13 # Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.<BR> 15 14 # SPDX-License-Identifier: BSD-2-Clause-Patent 16 15 # … … 35 34 [Sources] 36 35 InternalCryptLib.h 37 Hash/CryptMd4Null.c38 36 Hash/CryptMd5.c 39 37 Hash/CryptSha1.c … … 41 39 Hash/CryptSm3.c 42 40 Hash/CryptSha512Null.c 43 Hmac/CryptHmacMd5Null.c44 Hmac/CryptHmacSha1Null.c45 41 Hmac/CryptHmacSha256.c 46 42 Kdf/CryptHkdfNull.c 47 43 Cipher/CryptAes.c 48 Cipher/CryptTdesNull.c49 Cipher/CryptArc4Null.c50 44 Pk/CryptRsaBasic.c 51 45 Pk/CryptRsaExtNull.c … … 105 99 GCC:*_CLANG35_*_CC_FLAGS = -std=c99 106 100 GCC:*_CLANG38_*_CC_FLAGS = -std=c99 101 GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=incompatible-pointer-types -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.uni
r80721 r85718 7 7 // buffer overflow or integer overflow. 8 8 // 9 // Note: MD4 Digest functions, HMAC-MD5 functions, HMAC-SHA1 functions, AES/10 // TDES/ARC4functions, RSA external functions, PKCS#7 SignedData sign functions,9 // Note: AES 10 // functions, RSA external functions, PKCS#7 SignedData sign functions, 11 11 // Diffie-Hellman functions, and authenticode signature verification functions are 12 12 // not supported in this instance. 13 13 // 14 // Copyright (c) 2010 - 20 18, Intel Corporation. All rights reserved.<BR>14 // Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.<BR> 15 15 // 16 16 // SPDX-License-Identifier: BSD-2-Clause-Patent … … 21 21 #string STR_MODULE_ABSTRACT #language en-US "Cryptographic Library Instance for SMM driver" 22 22 23 #string STR_MODULE_DESCRIPTION #language en-US "Caution: This module requires additional review when modified. This library will have external input - signature. This external input must be validated carefully to avoid security issues such as buffer overflow or integer overflow. Note: MD4 Digest functions, HMAC-MD5 functions, HMAC-SHA1 functions, AES/ TDES/ARC4functions, RSA external functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and authenticode signature verification functions are not supported in this instance."23 #string STR_MODULE_DESCRIPTION #language en-US "Caution: This module requires additional review when modified. This library will have external input - signature. This external input must be validated carefully to avoid security issues such as buffer overflow or integer overflow. Note: AES functions, RSA external functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and authenticode signature verification functions are not supported in this instance." 24 24 -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
r80721 r85718 116 116 // 117 117 118 char *strchr(const char *str, int ch) 119 { 120 return ScanMem8 (str, AsciiStrSize (str), (UINT8)ch); 121 } 122 118 123 /* Scan a string for the last occurrence of a character */ 119 124 char *strrchr (const char *str, int c) -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/Include/CrtLibSupport.h
r80721 r85718 4 4 5 5 Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR> 6 Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> 6 7 SPDX-License-Identifier: BSD-2-Clause-Patent 7 8 … … 44 45 #define CONFIG_HEADER_BN_H 45 46 46 #if defined(MDE_CPU_X64) || defined(MDE_CPU_AARCH64) || defined(MDE_CPU_IA64) 47 #if defined(MDE_CPU_X64) || defined(MDE_CPU_AARCH64) || defined(MDE_CPU_IA64) || defined(MDE_CPU_RISCV64) 47 48 // 48 49 // With GCC we would normally use SIXTY_FOUR_BIT_LONG, but MSVC needs … … 75 76 // 76 77 #define EINVAL 22 /* Invalid argument */ 78 #define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ 77 79 #define INT_MAX 0x7FFFFFFF /* Maximum (signed) int value */ 78 80 #define LONG_MAX 0X7FFFFFFFL /* max value for a long */ … … 82 84 83 85 // 86 // Address families. 87 // 88 #define AF_INET 2 /* internetwork: UDP, TCP, etc. */ 89 #define AF_INET6 24 /* IP version 6 */ 90 91 // 92 // Define constants based on RFC0883, RFC1034, RFC 1035 93 // 94 #define NS_INT16SZ 2 /*%< #/bytes of data in a u_int16_t */ 95 #define NS_INADDRSZ 4 /*%< IPv4 T_A */ 96 #define NS_IN6ADDRSZ 16 /*%< IPv6 T_AAAA */ 97 98 // 84 99 // Basic types mapping 85 100 // 86 101 typedef UINTN size_t; 102 typedef UINTN u_int; 87 103 typedef INTN ssize_t; 88 104 typedef INT32 time_t; 89 105 typedef UINT8 __uint8_t; 90 106 typedef UINT8 sa_family_t; 107 typedef UINT8 u_char; 91 108 typedef UINT32 uid_t; 92 109 typedef UINT32 gid_t; … … 148 165 int strcmp (const char *, const char *); 149 166 int strncasecmp (const char *, const char *, size_t); 167 char *strchr (const char *, int); 150 168 char *strrchr (const char *, int); 151 169 unsigned long strtoul (const char *, char **, int); … … 176 194 void abort (void); 177 195 #endif 196 int inet_pton (int, const char *, void *); 178 197 179 198 // … … 189 208 #define strncpy(strDest,strSource,count) AsciiStrnCpyS(strDest,MAX_STRING_SIZE,strSource,(UINTN)count) 190 209 #define strcat(strDest,strSource) AsciiStrCatS(strDest,MAX_STRING_SIZE,strSource) 191 #define strchr(str,ch) ScanMem8((VOID *)(str),AsciiStrSize(str),(UINT8)ch)192 210 #define strncmp(string1,string2,count) (int)(AsciiStrnCmp(string1,string2,(UINTN)(count))) 193 211 #define strcasecmp(str1,str2) (int)AsciiStriCmp(str1,str2) -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/Include/internal/dso_conf.h
r77662 r85718 1 /* WARNING: do not edit! */ 2 /* Generated from crypto/include/internal/dso_conf.h.in */ 3 /* 4 * Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved. 5 * 6 * Licensed under the OpenSSL license (the "License"). You may not use 7 * this file except in compliance with the License. You can obtain a copy 8 * in the file LICENSE in the source distribution or at 9 * https://www.openssl.org/source/license.html 10 */ 11 12 #ifndef HEADER_DSO_CONF_H 13 # define HEADER_DSO_CONF_H 14 # define DSO_NONE 15 # define DSO_EXTENSION ".so" 16 #endif -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/Include/openssl/opensslconf.h
r80721 r85718 50 50 # define OPENSSL_NO_CT 51 51 #endif 52 #ifndef OPENSSL_NO_DES 53 # define OPENSSL_NO_DES 54 #endif 52 55 #ifndef OPENSSL_NO_DSA 53 56 # define OPENSSL_NO_DSA … … 62 65 # define OPENSSL_NO_MD2 63 66 #endif 67 #ifndef OPENSSL_NO_MD4 68 # define OPENSSL_NO_MD4 69 #endif 64 70 #ifndef OPENSSL_NO_MDC2 65 71 # define OPENSSL_NO_MDC2 … … 71 77 # define OPENSSL_NO_RC2 72 78 #endif 79 #ifndef OPENSSL_NO_RC4 80 # define OPENSSL_NO_RC4 81 #endif 73 82 #ifndef OPENSSL_NO_RC5 74 83 # define OPENSSL_NO_RC5 … … 109 118 #ifndef OPENSSL_NO_ASYNC 110 119 # define OPENSSL_NO_ASYNC 111 #endif112 #ifndef OPENSSL_NO_AUTOALGINIT113 # define OPENSSL_NO_AUTOALGINIT114 120 #endif 115 121 #ifndef OPENSSL_NO_AUTOERRINIT -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c
r80721 r85718 3 3 Cryptographic Library. 4 4 5 Copyright (c) 2010 - 201 8, Intel Corporation. All rights reserved.<BR>5 Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR> 6 6 SPDX-License-Identifier: BSD-2-Clause-Patent 7 7 … … 14 14 typedef UINTN size_t; 15 15 16 #if defined(__GNUC__) || defined(__clang__) 17 #define GLOBAL_USED __attribute__((used)) 18 #else 19 #define GLOBAL_USED 20 #endif 21 16 22 /* OpenSSL will use floating point support, and C compiler produces the _fltused 17 23 symbol by default. Simply define this symbol here to satisfy the linker. */ 18 int _fltused = 1;24 int GLOBAL_USED _fltused = 1; 19 25 20 26 /* Sets buffers to a specified character */ -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/OpensslLib/OpensslLib.inf
r80953 r85718 2 2 # This module provides OpenSSL Library implementation. 3 3 # 4 # Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR> 4 # Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.<BR> 5 # (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR> 5 6 # SPDX-License-Identifier: BSD-2-Clause-Patent 6 7 # … … 23 24 24 25 [Sources] 25 buildinf.h26 rand_pool_noise.h27 26 $(OPENSSL_PATH)/e_os.h 27 $(OPENSSL_PATH)/ms/uplink.h 28 28 # Autogenerated files list starts here 29 29 $(OPENSSL_PATH)/crypto/aes/aes_cbc.c 30 30 $(OPENSSL_PATH)/crypto/aes/aes_cfb.c 31 31 $(OPENSSL_PATH)/crypto/aes/aes_core.c 32 $(OPENSSL_PATH)/crypto/aes/aes_ecb.c33 32 $(OPENSSL_PATH)/crypto/aes/aes_ige.c 34 33 $(OPENSSL_PATH)/crypto/aes/aes_misc.c 35 34 $(OPENSSL_PATH)/crypto/aes/aes_ofb.c 36 35 $(OPENSSL_PATH)/crypto/aes/aes_wrap.c 37 $(OPENSSL_PATH)/crypto/aes/aes_locl.h38 36 $(OPENSSL_PATH)/crypto/aria/aria.c 39 $(OPENSSL_PATH)/crypto/arm_arch.h40 37 $(OPENSSL_PATH)/crypto/asn1/a_bitstr.c 41 38 $(OPENSSL_PATH)/crypto/asn1/a_d2i_fp.c … … 102 99 $(OPENSSL_PATH)/crypto/asn1/x_spki.c 103 100 $(OPENSSL_PATH)/crypto/asn1/x_val.c 104 $(OPENSSL_PATH)/crypto/asn1/standard_methods.h105 $(OPENSSL_PATH)/crypto/asn1/charmap.h106 $(OPENSSL_PATH)/crypto/asn1/tbl_standard.h107 $(OPENSSL_PATH)/crypto/asn1/asn1_item_list.h108 $(OPENSSL_PATH)/crypto/asn1/asn1_locl.h109 101 $(OPENSSL_PATH)/crypto/async/arch/async_null.c 110 102 $(OPENSSL_PATH)/crypto/async/arch/async_posix.c … … 113 105 $(OPENSSL_PATH)/crypto/async/async_err.c 114 106 $(OPENSSL_PATH)/crypto/async/async_wait.c 115 $(OPENSSL_PATH)/crypto/async/arch/async_win.h116 $(OPENSSL_PATH)/crypto/async/async_locl.h117 $(OPENSSL_PATH)/crypto/async/arch/async_posix.h118 $(OPENSSL_PATH)/crypto/async/arch/async_null.h119 107 $(OPENSSL_PATH)/crypto/bio/b_addr.c 120 108 $(OPENSSL_PATH)/crypto/bio/b_dump.c … … 139 127 $(OPENSSL_PATH)/crypto/bio/bss_null.c 140 128 $(OPENSSL_PATH)/crypto/bio/bss_sock.c 141 $(OPENSSL_PATH)/crypto/bio/bio_lcl.h142 129 $(OPENSSL_PATH)/crypto/bn/bn_add.c 143 130 $(OPENSSL_PATH)/crypto/bn/bn_asm.c … … 171 158 $(OPENSSL_PATH)/crypto/bn/bn_word.c 172 159 $(OPENSSL_PATH)/crypto/bn/bn_x931p.c 173 $(OPENSSL_PATH)/crypto/bn/rsaz_exp.h174 $(OPENSSL_PATH)/crypto/bn/bn_prime.h175 $(OPENSSL_PATH)/crypto/bn/bn_lcl.h176 160 $(OPENSSL_PATH)/crypto/buffer/buf_err.c 177 161 $(OPENSSL_PATH)/crypto/buffer/buffer.c … … 182 166 $(OPENSSL_PATH)/crypto/comp/comp_err.c 183 167 $(OPENSSL_PATH)/crypto/comp/comp_lib.c 184 $(OPENSSL_PATH)/crypto/comp/comp_lcl.h185 168 $(OPENSSL_PATH)/crypto/conf/conf_api.c 186 169 $(OPENSSL_PATH)/crypto/conf/conf_def.c … … 191 174 $(OPENSSL_PATH)/crypto/conf/conf_sap.c 192 175 $(OPENSSL_PATH)/crypto/conf/conf_ssl.c 193 $(OPENSSL_PATH)/crypto/conf/conf_lcl.h194 $(OPENSSL_PATH)/crypto/conf/conf_def.h195 176 $(OPENSSL_PATH)/crypto/cpt_err.c 196 177 $(OPENSSL_PATH)/crypto/cryptlib.c 197 178 $(OPENSSL_PATH)/crypto/ctype.c 198 179 $(OPENSSL_PATH)/crypto/cversion.c 199 $(OPENSSL_PATH)/crypto/des/cbc_cksm.c200 $(OPENSSL_PATH)/crypto/des/cbc_enc.c201 $(OPENSSL_PATH)/crypto/des/cfb64ede.c202 $(OPENSSL_PATH)/crypto/des/cfb64enc.c203 $(OPENSSL_PATH)/crypto/des/cfb_enc.c204 $(OPENSSL_PATH)/crypto/des/des_enc.c205 $(OPENSSL_PATH)/crypto/des/ecb3_enc.c206 $(OPENSSL_PATH)/crypto/des/ecb_enc.c207 $(OPENSSL_PATH)/crypto/des/fcrypt.c208 $(OPENSSL_PATH)/crypto/des/fcrypt_b.c209 $(OPENSSL_PATH)/crypto/des/ofb64ede.c210 $(OPENSSL_PATH)/crypto/des/ofb64enc.c211 $(OPENSSL_PATH)/crypto/des/ofb_enc.c212 $(OPENSSL_PATH)/crypto/des/pcbc_enc.c213 $(OPENSSL_PATH)/crypto/des/qud_cksm.c214 $(OPENSSL_PATH)/crypto/des/rand_key.c215 $(OPENSSL_PATH)/crypto/des/set_key.c216 $(OPENSSL_PATH)/crypto/des/str2key.c217 $(OPENSSL_PATH)/crypto/des/xcbc_enc.c218 $(OPENSSL_PATH)/crypto/des/spr.h219 $(OPENSSL_PATH)/crypto/des/des_locl.h220 180 $(OPENSSL_PATH)/crypto/dh/dh_ameth.c 221 181 $(OPENSSL_PATH)/crypto/dh/dh_asn1.c … … 232 192 $(OPENSSL_PATH)/crypto/dh/dh_rfc5114.c 233 193 $(OPENSSL_PATH)/crypto/dh/dh_rfc7919.c 234 $(OPENSSL_PATH)/crypto/dh/dh_locl.h235 194 $(OPENSSL_PATH)/crypto/dso/dso_dl.c 236 195 $(OPENSSL_PATH)/crypto/dso/dso_dlfcn.c … … 240 199 $(OPENSSL_PATH)/crypto/dso/dso_vms.c 241 200 $(OPENSSL_PATH)/crypto/dso/dso_win32.c 242 $(OPENSSL_PATH)/crypto/dso/dso_locl.h243 201 $(OPENSSL_PATH)/crypto/ebcdic.c 244 202 $(OPENSSL_PATH)/crypto/err/err.c … … 305 263 $(OPENSSL_PATH)/crypto/evp/pmeth_gn.c 306 264 $(OPENSSL_PATH)/crypto/evp/pmeth_lib.c 307 $(OPENSSL_PATH)/crypto/evp/evp_locl.h308 265 $(OPENSSL_PATH)/crypto/ex_data.c 309 266 $(OPENSSL_PATH)/crypto/getenv.c … … 311 268 $(OPENSSL_PATH)/crypto/hmac/hm_pmeth.c 312 269 $(OPENSSL_PATH)/crypto/hmac/hmac.c 313 $(OPENSSL_PATH)/crypto/hmac/hmac_lcl.h314 270 $(OPENSSL_PATH)/crypto/init.c 315 271 $(OPENSSL_PATH)/crypto/kdf/hkdf.c … … 319 275 $(OPENSSL_PATH)/crypto/lhash/lh_stats.c 320 276 $(OPENSSL_PATH)/crypto/lhash/lhash.c 321 $(OPENSSL_PATH)/crypto/lhash/lhash_lcl.h322 $(OPENSSL_PATH)/crypto/md4/md4_dgst.c323 $(OPENSSL_PATH)/crypto/md4/md4_one.c324 $(OPENSSL_PATH)/crypto/md4/md4_locl.h325 277 $(OPENSSL_PATH)/crypto/md5/md5_dgst.c 326 278 $(OPENSSL_PATH)/crypto/md5/md5_one.c 327 $(OPENSSL_PATH)/crypto/md5/md5_locl.h328 279 $(OPENSSL_PATH)/crypto/mem.c 329 280 $(OPENSSL_PATH)/crypto/mem_clr.c … … 340 291 $(OPENSSL_PATH)/crypto/modes/wrap128.c 341 292 $(OPENSSL_PATH)/crypto/modes/xts128.c 342 $(OPENSSL_PATH)/crypto/modes/modes_lcl.h343 293 $(OPENSSL_PATH)/crypto/o_dir.c 344 294 $(OPENSSL_PATH)/crypto/o_fips.c … … 352 302 $(OPENSSL_PATH)/crypto/objects/obj_lib.c 353 303 $(OPENSSL_PATH)/crypto/objects/obj_xref.c 354 $(OPENSSL_PATH)/crypto/objects/obj_dat.h355 $(OPENSSL_PATH)/crypto/objects/obj_xref.h356 $(OPENSSL_PATH)/crypto/objects/obj_lcl.h357 304 $(OPENSSL_PATH)/crypto/ocsp/ocsp_asn.c 358 305 $(OPENSSL_PATH)/crypto/ocsp/ocsp_cl.c … … 365 312 $(OPENSSL_PATH)/crypto/ocsp/ocsp_vfy.c 366 313 $(OPENSSL_PATH)/crypto/ocsp/v3_ocsp.c 367 $(OPENSSL_PATH)/crypto/ocsp/ocsp_lcl.h368 314 $(OPENSSL_PATH)/crypto/pem/pem_all.c 369 315 $(OPENSSL_PATH)/crypto/pem/pem_err.c … … 393 339 $(OPENSSL_PATH)/crypto/pkcs12/p12_utl.c 394 340 $(OPENSSL_PATH)/crypto/pkcs12/pk12err.c 395 $(OPENSSL_PATH)/crypto/pkcs12/p12_lcl.h396 341 $(OPENSSL_PATH)/crypto/pkcs7/bio_pk7.c 397 342 $(OPENSSL_PATH)/crypto/pkcs7/pk7_asn1.c … … 402 347 $(OPENSSL_PATH)/crypto/pkcs7/pk7_smime.c 403 348 $(OPENSSL_PATH)/crypto/pkcs7/pkcs7err.c 404 $(OPENSSL_PATH)/crypto/ppc_arch.h405 349 $(OPENSSL_PATH)/crypto/rand/drbg_ctr.c 406 350 $(OPENSSL_PATH)/crypto/rand/drbg_lib.c … … 411 355 $(OPENSSL_PATH)/crypto/rand/rand_vms.c 412 356 $(OPENSSL_PATH)/crypto/rand/rand_win.c 413 $(OPENSSL_PATH)/crypto/rand/rand_lcl.h414 $(OPENSSL_PATH)/crypto/rc4/rc4_enc.c415 $(OPENSSL_PATH)/crypto/rc4/rc4_skey.c416 $(OPENSSL_PATH)/crypto/rc4/rc4_locl.h417 357 $(OPENSSL_PATH)/crypto/rsa/rsa_ameth.c 418 358 $(OPENSSL_PATH)/crypto/rsa/rsa_asn1.c … … 437 377 $(OPENSSL_PATH)/crypto/rsa/rsa_x931.c 438 378 $(OPENSSL_PATH)/crypto/rsa/rsa_x931g.c 439 $(OPENSSL_PATH)/crypto/rsa/rsa_locl.h440 $(OPENSSL_PATH)/crypto/s390x_arch.h441 379 $(OPENSSL_PATH)/crypto/sha/keccak1600.c 442 380 $(OPENSSL_PATH)/crypto/sha/sha1_one.c … … 444 382 $(OPENSSL_PATH)/crypto/sha/sha256.c 445 383 $(OPENSSL_PATH)/crypto/sha/sha512.c 446 $(OPENSSL_PATH)/crypto/sha/sha_locl.h447 384 $(OPENSSL_PATH)/crypto/siphash/siphash.c 448 385 $(OPENSSL_PATH)/crypto/siphash/siphash_ameth.c 449 386 $(OPENSSL_PATH)/crypto/siphash/siphash_pmeth.c 450 $(OPENSSL_PATH)/crypto/siphash/siphash_local.h451 387 $(OPENSSL_PATH)/crypto/sm3/m_sm3.c 452 388 $(OPENSSL_PATH)/crypto/sm3/sm3.c 453 $(OPENSSL_PATH)/crypto/sm3/sm3_locl.h454 389 $(OPENSSL_PATH)/crypto/sm4/sm4.c 455 390 $(OPENSSL_PATH)/crypto/stack/stack.c 456 $(OPENSSL_PATH)/crypto/sparc_arch.h457 391 $(OPENSSL_PATH)/crypto/threads_none.c 458 392 $(OPENSSL_PATH)/crypto/threads_pthread.c … … 464 398 $(OPENSSL_PATH)/crypto/ui/ui_openssl.c 465 399 $(OPENSSL_PATH)/crypto/ui/ui_util.c 466 $(OPENSSL_PATH)/crypto/ui/ui_locl.h467 $(OPENSSL_PATH)/crypto/vms_rms.h468 400 $(OPENSSL_PATH)/crypto/uid.c 469 401 $(OPENSSL_PATH)/crypto/x509/by_dir.c … … 503 435 $(OPENSSL_PATH)/crypto/x509/x_x509.c 504 436 $(OPENSSL_PATH)/crypto/x509/x_x509a.c 505 $(OPENSSL_PATH)/crypto/x509/x509_lcl.h506 437 $(OPENSSL_PATH)/crypto/x509v3/pcy_cache.c 507 438 $(OPENSSL_PATH)/crypto/x509v3/pcy_data.c … … 541 472 $(OPENSSL_PATH)/crypto/x509v3/v3_utl.c 542 473 $(OPENSSL_PATH)/crypto/x509v3/v3err.c 474 $(OPENSSL_PATH)/crypto/arm_arch.h 475 $(OPENSSL_PATH)/crypto/mips_arch.h 476 $(OPENSSL_PATH)/crypto/ppc_arch.h 477 $(OPENSSL_PATH)/crypto/s390x_arch.h 478 $(OPENSSL_PATH)/crypto/sparc_arch.h 479 $(OPENSSL_PATH)/crypto/vms_rms.h 480 $(OPENSSL_PATH)/crypto/aes/aes_locl.h 481 $(OPENSSL_PATH)/crypto/asn1/asn1_item_list.h 482 $(OPENSSL_PATH)/crypto/asn1/asn1_locl.h 483 $(OPENSSL_PATH)/crypto/asn1/charmap.h 484 $(OPENSSL_PATH)/crypto/asn1/standard_methods.h 485 $(OPENSSL_PATH)/crypto/asn1/tbl_standard.h 486 $(OPENSSL_PATH)/crypto/async/async_locl.h 487 $(OPENSSL_PATH)/crypto/async/arch/async_null.h 488 $(OPENSSL_PATH)/crypto/async/arch/async_posix.h 489 $(OPENSSL_PATH)/crypto/async/arch/async_win.h 490 $(OPENSSL_PATH)/crypto/bio/bio_lcl.h 491 $(OPENSSL_PATH)/crypto/bn/bn_lcl.h 492 $(OPENSSL_PATH)/crypto/bn/bn_prime.h 493 $(OPENSSL_PATH)/crypto/bn/rsaz_exp.h 494 $(OPENSSL_PATH)/crypto/comp/comp_lcl.h 495 $(OPENSSL_PATH)/crypto/conf/conf_def.h 496 $(OPENSSL_PATH)/crypto/conf/conf_lcl.h 497 $(OPENSSL_PATH)/crypto/dh/dh_locl.h 498 $(OPENSSL_PATH)/crypto/dso/dso_locl.h 499 $(OPENSSL_PATH)/crypto/evp/evp_locl.h 500 $(OPENSSL_PATH)/crypto/hmac/hmac_lcl.h 501 $(OPENSSL_PATH)/crypto/lhash/lhash_lcl.h 502 $(OPENSSL_PATH)/crypto/md5/md5_locl.h 503 $(OPENSSL_PATH)/crypto/modes/modes_lcl.h 504 $(OPENSSL_PATH)/crypto/objects/obj_dat.h 505 $(OPENSSL_PATH)/crypto/objects/obj_lcl.h 506 $(OPENSSL_PATH)/crypto/objects/obj_xref.h 507 $(OPENSSL_PATH)/crypto/ocsp/ocsp_lcl.h 508 $(OPENSSL_PATH)/crypto/pkcs12/p12_lcl.h 509 $(OPENSSL_PATH)/crypto/rand/rand_lcl.h 510 $(OPENSSL_PATH)/crypto/rsa/rsa_locl.h 511 $(OPENSSL_PATH)/crypto/sha/sha_locl.h 512 $(OPENSSL_PATH)/crypto/siphash/siphash_local.h 513 $(OPENSSL_PATH)/crypto/sm3/sm3_locl.h 514 $(OPENSSL_PATH)/crypto/store/store_locl.h 515 $(OPENSSL_PATH)/crypto/ui/ui_locl.h 516 $(OPENSSL_PATH)/crypto/x509/x509_lcl.h 517 $(OPENSSL_PATH)/crypto/x509v3/ext_dat.h 543 518 $(OPENSSL_PATH)/crypto/x509v3/pcy_int.h 519 $(OPENSSL_PATH)/crypto/x509v3/standard_exts.h 544 520 $(OPENSSL_PATH)/crypto/x509v3/v3_admis.h 545 $(OPENSSL_PATH)/crypto/x509v3/standard_exts.h546 $(OPENSSL_PATH)/crypto/x509v3/ext_dat.h547 $(OPENSSL_PATH)/ms/uplink.h548 521 $(OPENSSL_PATH)/ssl/bio_ssl.c 549 522 $(OPENSSL_PATH)/ssl/d1_lib.c … … 590 563 $(OPENSSL_PATH)/ssl/tls13_enc.c 591 564 $(OPENSSL_PATH)/ssl/tls_srp.c 565 $(OPENSSL_PATH)/ssl/packet_locl.h 566 $(OPENSSL_PATH)/ssl/ssl_cert_table.h 567 $(OPENSSL_PATH)/ssl/ssl_locl.h 568 $(OPENSSL_PATH)/ssl/record/record.h 592 569 $(OPENSSL_PATH)/ssl/record/record_locl.h 593 570 $(OPENSSL_PATH)/ssl/statem/statem.h 594 571 $(OPENSSL_PATH)/ssl/statem/statem_locl.h 595 $(OPENSSL_PATH)/ssl/ssl_locl.h596 $(OPENSSL_PATH)/ssl/record/record.h597 $(OPENSSL_PATH)/ssl/ssl_cert_table.h598 $(OPENSSL_PATH)/ssl/packet_locl.h599 572 # Autogenerated files list ends here 600 573 buildinf.h 574 rand_pool_noise.h 601 575 ossl_store.c 602 576 rand_pool.c … … 661 635 GCC:*_*_ARM_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable 662 636 GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable 637 GCC:*_*_RISCV64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=format -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable 663 638 GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized 664 639 GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized 640 GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize 665 641 666 642 # suppress the following warnings in openssl so we don't break the build with warnings-as-errors: -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
r80953 r85718 2 2 # This module provides OpenSSL Library implementation. 3 3 # 4 # Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR> 4 # Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.<BR> 5 # (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR> 5 6 # SPDX-License-Identifier: BSD-2-Clause-Patent 6 7 # … … 29 30 $(OPENSSL_PATH)/crypto/aes/aes_cfb.c 30 31 $(OPENSSL_PATH)/crypto/aes/aes_core.c 31 $(OPENSSL_PATH)/crypto/aes/aes_ecb.c32 32 $(OPENSSL_PATH)/crypto/aes/aes_ige.c 33 33 $(OPENSSL_PATH)/crypto/aes/aes_misc.c 34 34 $(OPENSSL_PATH)/crypto/aes/aes_ofb.c 35 35 $(OPENSSL_PATH)/crypto/aes/aes_wrap.c 36 $(OPENSSL_PATH)/crypto/aes/aes_locl.h37 36 $(OPENSSL_PATH)/crypto/aria/aria.c 38 $(OPENSSL_PATH)/crypto/arm_arch.h39 37 $(OPENSSL_PATH)/crypto/asn1/a_bitstr.c 40 38 $(OPENSSL_PATH)/crypto/asn1/a_d2i_fp.c … … 101 99 $(OPENSSL_PATH)/crypto/asn1/x_spki.c 102 100 $(OPENSSL_PATH)/crypto/asn1/x_val.c 103 $(OPENSSL_PATH)/crypto/asn1/standard_methods.h104 $(OPENSSL_PATH)/crypto/asn1/charmap.h105 $(OPENSSL_PATH)/crypto/asn1/tbl_standard.h106 $(OPENSSL_PATH)/crypto/asn1/asn1_item_list.h107 $(OPENSSL_PATH)/crypto/asn1/asn1_locl.h108 101 $(OPENSSL_PATH)/crypto/async/arch/async_null.c 109 102 $(OPENSSL_PATH)/crypto/async/arch/async_posix.c 110 103 $(OPENSSL_PATH)/crypto/async/arch/async_win.c 111 $(OPENSSL_PATH)/crypto/async/arch/async_posix.h112 $(OPENSSL_PATH)/crypto/async/arch/async_null.h113 $(OPENSSL_PATH)/crypto/async/arch/async_win.h114 104 $(OPENSSL_PATH)/crypto/async/async.c 115 105 $(OPENSSL_PATH)/crypto/async/async_err.c 116 106 $(OPENSSL_PATH)/crypto/async/async_wait.c 117 $(OPENSSL_PATH)/crypto/async/async_locl.h118 107 $(OPENSSL_PATH)/crypto/bio/b_addr.c 119 108 $(OPENSSL_PATH)/crypto/bio/b_dump.c … … 138 127 $(OPENSSL_PATH)/crypto/bio/bss_null.c 139 128 $(OPENSSL_PATH)/crypto/bio/bss_sock.c 140 $(OPENSSL_PATH)/crypto/bio/bio_lcl.h141 129 $(OPENSSL_PATH)/crypto/bn/bn_add.c 142 130 $(OPENSSL_PATH)/crypto/bn/bn_asm.c … … 170 158 $(OPENSSL_PATH)/crypto/bn/bn_word.c 171 159 $(OPENSSL_PATH)/crypto/bn/bn_x931p.c 172 $(OPENSSL_PATH)/crypto/bn/rsaz_exp.h173 $(OPENSSL_PATH)/crypto/bn/bn_prime.h174 $(OPENSSL_PATH)/crypto/bn/bn_lcl.h175 160 $(OPENSSL_PATH)/crypto/buffer/buf_err.c 176 161 $(OPENSSL_PATH)/crypto/buffer/buffer.c … … 181 166 $(OPENSSL_PATH)/crypto/comp/comp_err.c 182 167 $(OPENSSL_PATH)/crypto/comp/comp_lib.c 183 $(OPENSSL_PATH)/crypto/comp/comp_lcl.h184 168 $(OPENSSL_PATH)/crypto/conf/conf_api.c 185 169 $(OPENSSL_PATH)/crypto/conf/conf_def.c … … 190 174 $(OPENSSL_PATH)/crypto/conf/conf_sap.c 191 175 $(OPENSSL_PATH)/crypto/conf/conf_ssl.c 192 $(OPENSSL_PATH)/crypto/conf/conf_lcl.h193 $(OPENSSL_PATH)/crypto/conf/conf_def.h194 176 $(OPENSSL_PATH)/crypto/cpt_err.c 195 177 $(OPENSSL_PATH)/crypto/cryptlib.c 196 178 $(OPENSSL_PATH)/crypto/ctype.c 197 179 $(OPENSSL_PATH)/crypto/cversion.c 198 $(OPENSSL_PATH)/crypto/des/cbc_cksm.c199 $(OPENSSL_PATH)/crypto/des/cbc_enc.c200 $(OPENSSL_PATH)/crypto/des/cfb64ede.c201 $(OPENSSL_PATH)/crypto/des/cfb64enc.c202 $(OPENSSL_PATH)/crypto/des/cfb_enc.c203 $(OPENSSL_PATH)/crypto/des/des_enc.c204 $(OPENSSL_PATH)/crypto/des/ecb3_enc.c205 $(OPENSSL_PATH)/crypto/des/ecb_enc.c206 $(OPENSSL_PATH)/crypto/des/fcrypt.c207 $(OPENSSL_PATH)/crypto/des/fcrypt_b.c208 $(OPENSSL_PATH)/crypto/des/ofb64ede.c209 $(OPENSSL_PATH)/crypto/des/ofb64enc.c210 $(OPENSSL_PATH)/crypto/des/ofb_enc.c211 $(OPENSSL_PATH)/crypto/des/pcbc_enc.c212 $(OPENSSL_PATH)/crypto/des/qud_cksm.c213 $(OPENSSL_PATH)/crypto/des/rand_key.c214 $(OPENSSL_PATH)/crypto/des/set_key.c215 $(OPENSSL_PATH)/crypto/des/str2key.c216 $(OPENSSL_PATH)/crypto/des/xcbc_enc.c217 $(OPENSSL_PATH)/crypto/des/spr.h218 $(OPENSSL_PATH)/crypto/des/des_locl.h219 180 $(OPENSSL_PATH)/crypto/dh/dh_ameth.c 220 181 $(OPENSSL_PATH)/crypto/dh/dh_asn1.c … … 231 192 $(OPENSSL_PATH)/crypto/dh/dh_rfc5114.c 232 193 $(OPENSSL_PATH)/crypto/dh/dh_rfc7919.c 233 $(OPENSSL_PATH)/crypto/dh/dh_locl.h234 194 $(OPENSSL_PATH)/crypto/dso/dso_dl.c 235 195 $(OPENSSL_PATH)/crypto/dso/dso_dlfcn.c … … 239 199 $(OPENSSL_PATH)/crypto/dso/dso_vms.c 240 200 $(OPENSSL_PATH)/crypto/dso/dso_win32.c 241 $(OPENSSL_PATH)/crypto/dso/dso_locl.h242 201 $(OPENSSL_PATH)/crypto/ebcdic.c 243 202 $(OPENSSL_PATH)/crypto/err/err.c … … 281 240 $(OPENSSL_PATH)/crypto/evp/m_md2.c 282 241 $(OPENSSL_PATH)/crypto/evp/m_md4.c 283 $(OPENSSL_PATH)/crypto/md4/md4_locl.h284 242 $(OPENSSL_PATH)/crypto/evp/m_md5.c 285 243 $(OPENSSL_PATH)/crypto/evp/m_md5_sha1.c … … 305 263 $(OPENSSL_PATH)/crypto/evp/pmeth_gn.c 306 264 $(OPENSSL_PATH)/crypto/evp/pmeth_lib.c 307 $(OPENSSL_PATH)/crypto/evp/evp_locl.h308 265 $(OPENSSL_PATH)/crypto/ex_data.c 309 266 $(OPENSSL_PATH)/crypto/getenv.c … … 311 268 $(OPENSSL_PATH)/crypto/hmac/hm_pmeth.c 312 269 $(OPENSSL_PATH)/crypto/hmac/hmac.c 313 $(OPENSSL_PATH)/crypto/hmac/hmac_lcl.h314 270 $(OPENSSL_PATH)/crypto/init.c 315 271 $(OPENSSL_PATH)/crypto/kdf/hkdf.c … … 319 275 $(OPENSSL_PATH)/crypto/lhash/lh_stats.c 320 276 $(OPENSSL_PATH)/crypto/lhash/lhash.c 321 $(OPENSSL_PATH)/crypto/lhash/lhash_lcl.h322 $(OPENSSL_PATH)/crypto/md4/md4_dgst.c323 $(OPENSSL_PATH)/crypto/md4/md4_one.c324 277 $(OPENSSL_PATH)/crypto/md5/md5_dgst.c 325 278 $(OPENSSL_PATH)/crypto/md5/md5_one.c 326 $(OPENSSL_PATH)/crypto/md5/md5_locl.h327 279 $(OPENSSL_PATH)/crypto/mem.c 328 280 $(OPENSSL_PATH)/crypto/mem_clr.c … … 339 291 $(OPENSSL_PATH)/crypto/modes/wrap128.c 340 292 $(OPENSSL_PATH)/crypto/modes/xts128.c 341 $(OPENSSL_PATH)/crypto/modes/modes_lcl.h342 293 $(OPENSSL_PATH)/crypto/o_dir.c 343 294 $(OPENSSL_PATH)/crypto/o_fips.c … … 351 302 $(OPENSSL_PATH)/crypto/objects/obj_lib.c 352 303 $(OPENSSL_PATH)/crypto/objects/obj_xref.c 353 $(OPENSSL_PATH)/crypto/objects/obj_dat.h354 $(OPENSSL_PATH)/crypto/objects/obj_xref.h355 $(OPENSSL_PATH)/crypto/objects/obj_lcl.h356 304 $(OPENSSL_PATH)/crypto/ocsp/ocsp_asn.c 357 305 $(OPENSSL_PATH)/crypto/ocsp/ocsp_cl.c … … 364 312 $(OPENSSL_PATH)/crypto/ocsp/ocsp_vfy.c 365 313 $(OPENSSL_PATH)/crypto/ocsp/v3_ocsp.c 366 $(OPENSSL_PATH)/crypto/ocsp/ocsp_lcl.h367 314 $(OPENSSL_PATH)/crypto/pem/pem_all.c 368 315 $(OPENSSL_PATH)/crypto/pem/pem_err.c … … 400 347 $(OPENSSL_PATH)/crypto/pkcs7/pk7_smime.c 401 348 $(OPENSSL_PATH)/crypto/pkcs7/pkcs7err.c 402 $(OPENSSL_PATH)/crypto/pkcs12/p12_lcl.h403 $(OPENSSL_PATH)/crypto/ppc_arch.h404 349 $(OPENSSL_PATH)/crypto/rand/drbg_ctr.c 405 350 $(OPENSSL_PATH)/crypto/rand/drbg_lib.c … … 410 355 $(OPENSSL_PATH)/crypto/rand/rand_vms.c 411 356 $(OPENSSL_PATH)/crypto/rand/rand_win.c 412 $(OPENSSL_PATH)/crypto/rand/rand_lcl.h413 $(OPENSSL_PATH)/crypto/rc4/rc4_enc.c414 $(OPENSSL_PATH)/crypto/rc4/rc4_skey.c415 $(OPENSSL_PATH)/crypto/rc4/rc4_locl.h416 357 $(OPENSSL_PATH)/crypto/rsa/rsa_ameth.c 417 358 $(OPENSSL_PATH)/crypto/rsa/rsa_asn1.c … … 436 377 $(OPENSSL_PATH)/crypto/rsa/rsa_x931.c 437 378 $(OPENSSL_PATH)/crypto/rsa/rsa_x931g.c 438 $(OPENSSL_PATH)/crypto/rsa/rsa_locl.h439 379 $(OPENSSL_PATH)/crypto/sha/keccak1600.c 440 380 $(OPENSSL_PATH)/crypto/sha/sha1_one.c … … 442 382 $(OPENSSL_PATH)/crypto/sha/sha256.c 443 383 $(OPENSSL_PATH)/crypto/sha/sha512.c 444 $(OPENSSL_PATH)/crypto/sha/sha_locl.h445 384 $(OPENSSL_PATH)/crypto/siphash/siphash.c 446 385 $(OPENSSL_PATH)/crypto/siphash/siphash_ameth.c 447 386 $(OPENSSL_PATH)/crypto/siphash/siphash_pmeth.c 448 $(OPENSSL_PATH)/crypto/siphash/siphash_local.h449 387 $(OPENSSL_PATH)/crypto/sm3/m_sm3.c 450 388 $(OPENSSL_PATH)/crypto/sm3/sm3.c 451 $(OPENSSL_PATH)/crypto/sm3/sm3_locl.h452 389 $(OPENSSL_PATH)/crypto/sm4/sm4.c 453 390 $(OPENSSL_PATH)/crypto/stack/stack.c 454 $(OPENSSL_PATH)/crypto/s390x_arch.h455 $(OPENSSL_PATH)/crypto/sparc_arch.h456 391 $(OPENSSL_PATH)/crypto/threads_none.c 457 392 $(OPENSSL_PATH)/crypto/threads_pthread.c … … 463 398 $(OPENSSL_PATH)/crypto/ui/ui_openssl.c 464 399 $(OPENSSL_PATH)/crypto/ui/ui_util.c 465 $(OPENSSL_PATH)/crypto/ui/ui_locl.h466 400 $(OPENSSL_PATH)/crypto/uid.c 467 $(OPENSSL_PATH)/crypto/vms_rms.h468 401 $(OPENSSL_PATH)/crypto/x509/by_dir.c 469 402 $(OPENSSL_PATH)/crypto/x509/by_file.c … … 502 435 $(OPENSSL_PATH)/crypto/x509/x_x509.c 503 436 $(OPENSSL_PATH)/crypto/x509/x_x509a.c 504 $(OPENSSL_PATH)/crypto/x509/x509_lcl.h505 437 $(OPENSSL_PATH)/crypto/x509v3/pcy_cache.c 506 438 $(OPENSSL_PATH)/crypto/x509v3/pcy_data.c … … 540 472 $(OPENSSL_PATH)/crypto/x509v3/v3_utl.c 541 473 $(OPENSSL_PATH)/crypto/x509v3/v3err.c 474 $(OPENSSL_PATH)/crypto/arm_arch.h 475 $(OPENSSL_PATH)/crypto/mips_arch.h 476 $(OPENSSL_PATH)/crypto/ppc_arch.h 477 $(OPENSSL_PATH)/crypto/s390x_arch.h 478 $(OPENSSL_PATH)/crypto/sparc_arch.h 479 $(OPENSSL_PATH)/crypto/vms_rms.h 480 $(OPENSSL_PATH)/crypto/aes/aes_locl.h 481 $(OPENSSL_PATH)/crypto/asn1/asn1_item_list.h 482 $(OPENSSL_PATH)/crypto/asn1/asn1_locl.h 483 $(OPENSSL_PATH)/crypto/asn1/charmap.h 484 $(OPENSSL_PATH)/crypto/asn1/standard_methods.h 485 $(OPENSSL_PATH)/crypto/asn1/tbl_standard.h 486 $(OPENSSL_PATH)/crypto/async/async_locl.h 487 $(OPENSSL_PATH)/crypto/async/arch/async_null.h 488 $(OPENSSL_PATH)/crypto/async/arch/async_posix.h 489 $(OPENSSL_PATH)/crypto/async/arch/async_win.h 490 $(OPENSSL_PATH)/crypto/bio/bio_lcl.h 491 $(OPENSSL_PATH)/crypto/bn/bn_lcl.h 492 $(OPENSSL_PATH)/crypto/bn/bn_prime.h 493 $(OPENSSL_PATH)/crypto/bn/rsaz_exp.h 494 $(OPENSSL_PATH)/crypto/comp/comp_lcl.h 495 $(OPENSSL_PATH)/crypto/conf/conf_def.h 496 $(OPENSSL_PATH)/crypto/conf/conf_lcl.h 497 $(OPENSSL_PATH)/crypto/dh/dh_locl.h 498 $(OPENSSL_PATH)/crypto/dso/dso_locl.h 499 $(OPENSSL_PATH)/crypto/evp/evp_locl.h 500 $(OPENSSL_PATH)/crypto/hmac/hmac_lcl.h 501 $(OPENSSL_PATH)/crypto/lhash/lhash_lcl.h 502 $(OPENSSL_PATH)/crypto/md5/md5_locl.h 503 $(OPENSSL_PATH)/crypto/modes/modes_lcl.h 504 $(OPENSSL_PATH)/crypto/objects/obj_dat.h 505 $(OPENSSL_PATH)/crypto/objects/obj_lcl.h 506 $(OPENSSL_PATH)/crypto/objects/obj_xref.h 507 $(OPENSSL_PATH)/crypto/ocsp/ocsp_lcl.h 508 $(OPENSSL_PATH)/crypto/pkcs12/p12_lcl.h 509 $(OPENSSL_PATH)/crypto/rand/rand_lcl.h 510 $(OPENSSL_PATH)/crypto/rsa/rsa_locl.h 511 $(OPENSSL_PATH)/crypto/sha/sha_locl.h 512 $(OPENSSL_PATH)/crypto/siphash/siphash_local.h 513 $(OPENSSL_PATH)/crypto/sm3/sm3_locl.h 514 $(OPENSSL_PATH)/crypto/store/store_locl.h 515 $(OPENSSL_PATH)/crypto/ui/ui_locl.h 516 $(OPENSSL_PATH)/crypto/x509/x509_lcl.h 517 $(OPENSSL_PATH)/crypto/x509v3/ext_dat.h 542 518 $(OPENSSL_PATH)/crypto/x509v3/pcy_int.h 519 $(OPENSSL_PATH)/crypto/x509v3/standard_exts.h 543 520 $(OPENSSL_PATH)/crypto/x509v3/v3_admis.h 544 $(OPENSSL_PATH)/crypto/x509v3/standard_exts.h545 $(OPENSSL_PATH)/crypto/x509v3/ext_dat.h546 521 # Autogenerated files list ends here 547 522 buildinf.h … … 609 584 GCC:*_*_ARM_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable 610 585 GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable 586 GCC:*_*_RISCV64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable 611 587 GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized 612 588 GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized 589 GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize 613 590 614 591 # suppress the following warnings in openssl so we don't break the build with warnings-as-errors: -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/OpensslLib/process_files.pl
r80721 r85718 3 3 # This script runs the OpenSSL Configure script, then processes the 4 4 # resulting file list into our local OpensslLib[Crypto].inf and also 5 # takes a copy of opensslconf.h.5 # takes copies of opensslconf.h and dso_conf.h. 6 6 # 7 7 # This only needs to be done once by a developer when updating to a … … 52 52 "no-asm", 53 53 "no-async", 54 "no-autoalginit",55 54 "no-autoerrinit", 56 55 "no-autoload-config", … … 64 63 "no-ct", 65 64 "no-deprecated", 65 "no-des", 66 66 "no-dgram", 67 67 "no-dsa", … … 75 75 "no-hw", 76 76 "no-idea", 77 "no-md4", 77 78 "no-mdc2", 78 79 "no-pic", … … 81 82 "no-posix-io", 82 83 "no-rc2", 84 "no-rc4", 83 85 "no-rfc3779", 84 86 "no-rmd160", … … 107 109 die "Failed to generate opensslconf.h!\n"; 108 110 111 # Generate dso_conf.h per config data 112 system( 113 "perl -I. -Mconfigdata util/dofile.pl " . 114 "crypto/include/internal/dso_conf.h.in " . 115 "> include/internal/dso_conf.h" 116 ) == 0 || 117 die "Failed to generate dso_conf.h!\n"; 118 109 119 chdir($basedir) || 110 120 die "Cannot change to base directory \"" . $basedir . "\""; … … 135 145 next if $s =~ "crypto/store/"; 136 146 next if $s =~ "crypto/err/err_all.c"; 147 next if $s =~ "crypto/aes/aes_ecb.c"; 137 148 138 149 if ($product =~ "libssl") { … … 144 155 } 145 156 } 157 158 159 # 160 # Update the perl script to generate the missing header files 161 # 162 my @dir_list = (); 163 for (sort keys %{$unified_info{dirinfo}}){ 164 push @dir_list,$_; 165 } 166 167 my $dir = getcwd(); 168 my @files = (); 169 my @headers = (); 170 chdir ("openssl"); 171 foreach(@dir_list){ 172 @files = glob($_."/*.h"); 173 push @headers, @files; 174 } 175 chdir ($dir); 176 177 foreach (@headers){ 178 if(/ssl/){ 179 push @sslfilelist, ' $(OPENSSL_PATH)/' . $_ . "\r\n"; 180 next; 181 } 182 push @cryptofilelist, ' $(OPENSSL_PATH)/' . $_ . "\r\n"; 183 } 184 146 185 147 186 # … … 222 261 223 262 # 224 # Copy opensslconf.h generated from OpenSSL Configuration263 # Copy opensslconf.h and dso_conf.h generated from OpenSSL Configuration 225 264 # 226 265 print "\n--> Duplicating opensslconf.h into Include/openssl ... "; … … 228 267 $OPENSSL_PATH . "/../../Include/openssl/") || 229 268 die "Cannot copy opensslconf.h!"; 269 print "Done!"; 270 print "\n--> Duplicating dso_conf.h into Include/internal ... "; 271 copy($OPENSSL_PATH . "/include/internal/dso_conf.h", 272 $OPENSSL_PATH . "/../../Include/internal/") || 273 die "Cannot copy dso_conf.h!"; 230 274 print "Done!\n"; 231 275 -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/OpensslLib/rand_pool.c
r80953 r85718 134 134 135 135 // 136 // Chose an arbit ary key and zero the feed_forward_value (FFV)136 // Chose an arbitrary key and zero the feed_forward_value (FFV) 137 137 // 138 138 for (Index = 0; Index < 16; Index++) { … … 292 292 293 293 /* 294 * Dummy Impleme mtation for UEFI294 * Dummy Implementation for UEFI 295 295 * 296 296 * This is OpenSSL required interface. … … 302 302 303 303 /* 304 * Dummy Impleme mtation for UEFI304 * Dummy Implementation for UEFI 305 305 * 306 306 * This is OpenSSL required interface. … … 311 311 312 312 /* 313 * Dummy Impleme mtation for UEFI313 * Dummy Implementation for UEFI 314 314 * 315 315 * This is OpenSSL required interface. -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/OpensslLib/rand_pool_noise.c
r80721 r85718 23 23 { 24 24 // 25 // Return FALSE will fallback to use Performa ceCounter to25 // Return FALSE will fallback to use PerformanceCounter to 26 26 // generate noise. 27 27 // -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/TlsLib/TlsConfig.c
r80721 r85718 2 2 SSL/TLS Configuration Library Wrapper Implementation over OpenSSL. 3 3 4 Copyright (c) 2016 - 201 7, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR> 5 5 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> 6 6 SPDX-License-Identifier: BSD-2-Clause-Patent … … 499 499 500 500 /** 501 Set the specified host name to be verified. 502 503 @param[in] Tls Pointer to the TLS object. 504 @param[in] Flags The setting flags during the validation. 505 @param[in] HostName The specified host name to be verified. 506 507 @retval EFI_SUCCESS The HostName setting was set successfully. 508 @retval EFI_INVALID_PARAMETER The parameter is invalid. 509 @retval EFI_ABORTED Invalid HostName setting. 510 511 **/ 512 EFI_STATUS 513 EFIAPI 514 TlsSetVerifyHost ( 515 IN VOID *Tls, 516 IN UINT32 Flags, 517 IN CHAR8 *HostName 518 ) 519 { 520 TLS_CONNECTION *TlsConn; 521 X509_VERIFY_PARAM *VerifyParam; 522 UINTN BinaryAddressSize; 523 UINT8 BinaryAddress[MAX (NS_INADDRSZ, NS_IN6ADDRSZ)]; 524 INTN ParamStatus; 525 526 TlsConn = (TLS_CONNECTION *) Tls; 527 if (TlsConn == NULL || TlsConn->Ssl == NULL || HostName == NULL) { 528 return EFI_INVALID_PARAMETER; 529 } 530 531 SSL_set_hostflags(TlsConn->Ssl, Flags); 532 533 VerifyParam = SSL_get0_param (TlsConn->Ssl); 534 ASSERT (VerifyParam != NULL); 535 536 BinaryAddressSize = 0; 537 if (inet_pton (AF_INET6, HostName, BinaryAddress) == 1) { 538 BinaryAddressSize = NS_IN6ADDRSZ; 539 } else if (inet_pton (AF_INET, HostName, BinaryAddress) == 1) { 540 BinaryAddressSize = NS_INADDRSZ; 541 } 542 543 if (BinaryAddressSize > 0) { 544 DEBUG ((DEBUG_VERBOSE, "%a:%a: parsed \"%a\" as an IPv%c address " 545 "literal\n", gEfiCallerBaseName, __FUNCTION__, HostName, 546 (UINTN)((BinaryAddressSize == NS_IN6ADDRSZ) ? '6' : '4'))); 547 ParamStatus = X509_VERIFY_PARAM_set1_ip (VerifyParam, BinaryAddress, 548 BinaryAddressSize); 549 } else { 550 ParamStatus = X509_VERIFY_PARAM_set1_host (VerifyParam, HostName, 0); 551 } 552 553 return (ParamStatus == 1) ? EFI_SUCCESS : EFI_ABORTED; 554 } 555 556 /** 501 557 Sets a TLS/SSL session ID to be used during TLS/SSL connect. 502 558 -
trunk/src/VBox/Devices/EFI/FirmwareNew/CryptoPkg/Library/TlsLib/TlsLib.inf
r80721 r85718 3 3 # 4 4 # Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR> 5 # (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>5 # (C) Copyright 2016-2020 Hewlett Packard Enterprise Development LP<BR> 6 6 # SPDX-License-Identifier: BSD-2-Clause-Patent 7 7 # … … 20 20 # The following information is for reference only and not required by the build tools. 21 21 # 22 # VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 22 # VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 RISCV64 23 23 # 24 24
Note:
See TracChangeset
for help on using the changeset viewer.