Changeset 58459 in vbox for trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg
- Timestamp:
- Oct 28, 2015 8:17:18 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 5 deleted
- 46 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
-
Property svn:mergeinfo
set to (toggle deleted branches)
/vendor/edk2/current 103735-103757
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Application/Cryptest/Cryptest.c
r48674 r58459 1 /** @file 1 /** @file 2 2 Application for Cryptographic Primitives Validation. 3 3 4 Copyright (c) 2009 - 201 1, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 74 74 } 75 75 76 Status = ValidateTSCounterSignature (); 77 if (EFI_ERROR (Status)) { 78 return Status; 79 } 80 76 81 Status = ValidateCryptDh (); 77 82 if (EFI_ERROR (Status)) { -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Application/Cryptest/Cryptest.h
r48674 r58459 1 /** @file 1 /** @file 2 2 Application for Cryptographic Primitives Validation. 3 3 4 Copyright (c) 2009 - 201 1, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 110 110 111 111 /** 112 Validate UEFI-OpenSSL RFC3161 Timestamp CounterSignature Verification Interfaces. 113 114 @retval EFI_SUCCESS Validation succeeded. 115 @retval EFI_ABORTED Validation failed. 116 117 **/ 118 EFI_STATUS 119 ValidateTSCounterSignature ( 120 VOID 121 ); 122 123 /** 112 124 Validate UEFI-OpenSSL DH Interfaces. 113 125 -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Application/Cryptest/Cryptest.inf
r48674 r58459 1 1 ## @file 2 # UEFI Application for the Validation of cryptography library 3 # (based on OpenSSL 0.9.8l). 4 # This is a shell application that will test the crypto library. 2 # Shell application that will test the crypto library. 5 3 # 6 # Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR> 4 # UEFI Application for the Validation of cryptography library (based on OpenSSL 0.9.8zb). 5 # 6 # Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR> 7 7 # This program and the accompanying materials 8 8 # are licensed and made available under the terms and conditions of the BSD License … … 18 18 INF_VERSION = 0x00010005 19 19 BASE_NAME = Cryptest 20 MODULE_UNI_FILE = Cryptest.uni 20 21 FILE_GUID = fb925ac7-192a-9567-8586-7c6f5f710607 21 22 MODULE_TYPE = UEFI_APPLICATION … … 38 39 RsaVerify2.c 39 40 AuthenticodeVerify.c 41 TSVerify.c 40 42 DhVerify.c 41 43 RandVerify.c … … 54 56 MemoryAllocationLib 55 57 BaseCryptLib 58 59 [UserExtensions.TianoCore."ExtraFiles"] 60 CryptestExtra.uni 61 -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Application/Cryptest/DhVerify.c
r48674 r58459 1 /** @file 1 /** @file 2 2 Application for Diffie-Hellman Primitives Validation. 3 3 4 Copyright (c) 2010 , Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 41 41 42 42 Print (L"\nUEFI-OpenSSL DH Engine Testing:\n"); 43 44 // 45 // Initialize Key Length 46 // 47 PublicKey1Length = sizeof (PublicKey1); 48 PublicKey2Length = sizeof (PublicKey2); 49 Key1Length = sizeof (Key1); 50 Key2Length = sizeof (Key2); 43 51 44 52 // -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Application/Cryptest/HashVerify.c
r48674 r58459 1 /** @file 1 /** @file 2 2 Application for Hash Primitives Validation. 3 3 4 Copyright (c) 2010 , Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 53 53 0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea, 0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, 0x23, 54 54 0xb0, 0x03, 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c, 0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad 55 }; 56 57 // 58 // Result for SHA-384("abc"). (From "D.1 SHA-384 Example" of NIST FIPS 180-2) 59 // 60 GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8 Sha384Digest[SHA384_DIGEST_SIZE] = { 61 0xcb, 0x00, 0x75, 0x3f, 0x45, 0xa3, 0x5e, 0x8b, 0xb5, 0xa0, 0x3d, 0x69, 0x9a, 0xc6, 0x50, 0x07, 62 0x27, 0x2c, 0x32, 0xab, 0x0e, 0xde, 0xd1, 0x63, 0x1a, 0x8b, 0x60, 0x5a, 0x43, 0xff, 0x5b, 0xed, 63 0x80, 0x86, 0x07, 0x2b, 0xa1, 0xe7, 0xcc, 0x23, 0x58, 0xba, 0xec, 0xa1, 0x34, 0xc8, 0x25, 0xa7 64 }; 65 66 // 67 // Result for SHA-512("abc"). (From "C.1 SHA-512 Example" of NIST FIPS 180-2) 68 // 69 GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8 Sha512Digest[SHA512_DIGEST_SIZE] = { 70 0xdd, 0xaf, 0x35, 0xa1, 0x93, 0x61, 0x7a, 0xba, 0xcc, 0x41, 0x73, 0x49, 0xae, 0x20, 0x41, 0x31, 71 0x12, 0xe6, 0xfa, 0x4e, 0x89, 0xa9, 0x7e, 0xa2, 0x0a, 0x9e, 0xee, 0xe6, 0x4b, 0x55, 0xd3, 0x9a, 72 0x21, 0x92, 0x99, 0x2a, 0x27, 0x4f, 0xc1, 0xa8, 0x36, 0xba, 0x3c, 0x23, 0xa3, 0xfe, 0xeb, 0xbd, 73 0x45, 0x4d, 0x44, 0x23, 0x64, 0x3c, 0xe8, 0x0e, 0x2a, 0x9a, 0xc9, 0x4f, 0xa5, 0x4c, 0xa4, 0x9f 55 74 }; 56 75 … … 77 96 78 97 Print (L"- MD4: "); 79 98 80 99 // 81 100 // MD4 Digest Validation … … 235 254 236 255 Print (L"[Pass]\n"); 237 256 257 Print (L"- SHA384: "); 258 259 // 260 // SHA384 Digest Validation 261 // 262 ZeroMem (Digest, MAX_DIGEST_SIZE); 263 CtxSize = Sha384GetContextSize (); 264 HashCtx = AllocatePool (CtxSize); 265 266 Print (L"Init... "); 267 Status = Sha384Init (HashCtx); 268 if (!Status) { 269 Print (L"[Fail]"); 270 return EFI_ABORTED; 271 } 272 273 Print (L"Update... "); 274 Status = Sha384Update (HashCtx, HashData, DataSize); 275 if (!Status) { 276 Print (L"[Fail]"); 277 return EFI_ABORTED; 278 } 279 280 Print (L"Finalize... "); 281 Status = Sha384Final (HashCtx, Digest); 282 if (!Status) { 283 Print (L"[Fail]"); 284 return EFI_ABORTED; 285 } 286 287 FreePool (HashCtx); 288 289 Print (L"Check Value... "); 290 if (CompareMem (Digest, Sha384Digest, SHA384_DIGEST_SIZE) != 0) { 291 Print (L"[Fail]"); 292 return EFI_ABORTED; 293 } 294 295 Print (L"[Pass]\n"); 296 297 Print (L"- SHA512: "); 298 299 // 300 // SHA512 Digest Validation 301 // 302 ZeroMem (Digest, MAX_DIGEST_SIZE); 303 CtxSize = Sha512GetContextSize (); 304 HashCtx = AllocatePool (CtxSize); 305 306 Print (L"Init... "); 307 Status = Sha512Init (HashCtx); 308 if (!Status) { 309 Print (L"[Fail]"); 310 return EFI_ABORTED; 311 } 312 313 Print (L"Update... "); 314 Status = Sha512Update (HashCtx, HashData, DataSize); 315 if (!Status) { 316 Print (L"[Fail]"); 317 return EFI_ABORTED; 318 } 319 320 Print (L"Finalize... "); 321 Status = Sha512Final (HashCtx, Digest); 322 if (!Status) { 323 Print (L"[Fail]"); 324 return EFI_ABORTED; 325 } 326 327 FreePool (HashCtx); 328 329 Print (L"Check Value... "); 330 if (CompareMem (Digest, Sha512Digest, SHA512_DIGEST_SIZE) != 0) { 331 Print (L"[Fail]"); 332 return EFI_ABORTED; 333 } 334 335 Print (L"[Pass]\n"); 336 238 337 return EFI_SUCCESS; 239 338 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/CryptRuntimeDxe/CryptRuntime.c
r48674 r58459 206 206 IN CONST UINT8 *MessageHash, 207 207 IN UINTN HashLength, 208 IN UINT8*Signature,208 IN CONST UINT8 *Signature, 209 209 IN UINTN SigLength 210 210 ) -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/CryptRuntimeDxe/CryptRuntime.h
r48674 r58459 180 180 IN CONST UINT8 *MessageHash, 181 181 IN UINTN HashLength, 182 IN UINT8*Signature,182 IN CONST UINT8 *Signature, 183 183 IN UINTN SigLength 184 184 ); -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxe.inf
r48674 r58459 1 1 ## @file 2 # Component description file for Cryptographic Runtime Driver.2 # This driver installs runtime Crypt protocol to provide SHA256 and RSA service. 3 3 # 4 # Copyright (c) 2010 , Intel Corporation. All rights reserved.<BR>4 # Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 # This program and the accompanying materials 6 6 # are licensed and made available under the terms and conditions of the BSD License … … 16 16 INF_VERSION = 0x00010005 17 17 BASE_NAME = CryptRuntimeDxe 18 MODULE_UNI_FILE = CryptRuntimeDxe.uni 18 19 FILE_GUID = 858031F3-96A2-406E-ABCC-ED264A3A31D6 19 20 MODULE_TYPE = DXE_RUNTIME_DRIVER … … 48 49 [Depex] 49 50 TRUE 51 52 [UserExtensions.TianoCore."ExtraFiles"] 53 CryptRuntimeDxeExtra.uni 54 -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/CryptoPkg.dec
r48674 r58459 2 2 # Package for cryptography modules. 3 3 # 4 # This Package provides cryptographic-related libraries for UEFI 5 # security modules.4 # This Package provides cryptographic-related libraries for UEFI security modules. 5 # It also provides a test application to test libraries. 6 6 # 7 # Copyright (c) 2009 - 201 1, Intel Corporation. All rights reserved.<BR>7 # Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR> 8 8 # This program and the accompanying materials 9 9 # are licensed and made available under the terms and conditions of the BSD License … … 19 19 DEC_SPECIFICATION = 0x00010005 20 20 PACKAGE_NAME = CryptoPkg 21 PACKAGE_UNI_FILE = CryptoPkg.uni 21 22 PACKAGE_GUID = 36470E80-36F2-4ba0-8CC8-937C7D9FF888 22 PACKAGE_VERSION = 0.9 223 PACKAGE_VERSION = 0.96 23 24 24 25 [Includes] … … 33 34 ## Include/Protocol/RuntimeCrypt.h 34 35 gEfiRuntimeCryptProtocolGuid = { 0xe1475e0c, 0x1746, 0x4802, {0x86, 0x2e, 0x1, 0x1c, 0x2c, 0x2d, 0x9d, 0x86 }} 36 37 [UserExtensions.TianoCore."ExtraFiles"] 38 CryptoPkgExtra.uni 39 -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/CryptoPkg.dsc
r48674 r58459 2 2 # Cryptographic Library Package for UEFI Security Implementation. 3 3 # 4 # Copyright (c) 2009 - 201 1, Intel Corporation. All rights reserved.<BR>4 # Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR> 5 5 # This program and the accompanying materials 6 6 # are licensed and made available under the terms and conditions of the BSD License … … 21 21 PLATFORM_NAME = CryptoPkg 22 22 PLATFORM_GUID = E1063286-6C8C-4c25-AEF0-67A9A5B6E6B6 23 PLATFORM_VERSION = 0.9 223 PLATFORM_VERSION = 0.96 24 24 DSC_SPECIFICATION = 0x00010005 25 25 OUTPUT_DIRECTORY = Build/CryptoPkg 26 SUPPORTED_ARCHITECTURES = IA32|X64|IPF|ARM 26 SUPPORTED_ARCHITECTURES = IA32|X64|IPF|ARM|AARCH64 27 27 BUILD_TARGETS = DEBUG|RELEASE 28 28 SKUID_IDENTIFIER = DEFAULT … … 52 52 OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf 53 53 54 [LibraryClasses.ARM ]54 [LibraryClasses.ARM, LibraryClasses.AARCH64] 55 55 # 56 56 # It is not possible to prevent the ARM compiler for generic intrinsic functions. 57 57 # This library provides the instrinsic functions generate by a given compiler. 58 # [LibraryClasses.ARM] and NULL mean link this library into all ARM images. 58 # [LibraryClasses.ARM, LibraryClasses.AARCH64] and NULL mean link this library 59 # into all ARM and AARCH64 images. 59 60 # 60 61 NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf 62 63 # Add support for stack protector 64 NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf 61 65 62 66 [LibraryClasses.common.PEIM] … … 80 84 [LibraryClasses.common.UEFI_APPLICATION] 81 85 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf 86 87 ############################################################################### 88 # 89 # BuildOptions Section - Define the module specific tool chain flags that 90 # should be used as the default flags for a module. 91 # These flags are appended to any standard flags that 92 # are defined by the build process. 93 # 94 # -JCryptoPkg/Include : To disable the use of the system includes provided by 95 # the RVCT toolchain. 96 # --diag_remark=1 : To make the warning "#1-D: last line of file ends 97 # without a newline" just a remark such that the 98 # build doesn't stop as warnings are considered as 99 # errors. 100 # 101 ################################################################################ 102 [BuildOptions] 103 RVCT:*_*_ARM_CC_FLAGS = -JCryptoPkg/Include --diag_remark=1 82 104 83 105 ################################################################################ -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Include/Library/BaseCryptLib.h
r48674 r58459 5 5 functionality enabling. 6 6 7 Copyright (c) 2009 - 201 2, Intel Corporation. All rights reserved.<BR>7 Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR> 8 8 This program and the accompanying materials 9 9 are licensed and made available under the terms and conditions of the BSD License … … 19 19 #define __BASE_CRYPT_LIB_H__ 20 20 21 #include <Uefi/UefiBaseType.h> 22 21 23 /// 22 24 /// MD4 digest size in bytes … … 38 40 /// 39 41 #define SHA256_DIGEST_SIZE 32 42 43 /// 44 /// SHA-384 digest size in bytes 45 /// 46 #define SHA384_DIGEST_SIZE 48 47 48 /// 49 /// SHA-512 digest size in bytes 50 /// 51 #define SHA512_DIGEST_SIZE 64 40 52 41 53 /// … … 70 82 Retrieves the size, in bytes, of the context buffer required for MD4 hash operations. 71 83 84 If this interface is not supported, then return zero. 85 72 86 @return The size, in bytes, of the context buffer required for MD4 hash operations. 87 @retval 0 This interface is not supported. 73 88 74 89 **/ … … 84 99 85 100 If Md4Context is NULL, then return FALSE. 101 If this interface is not supported, then return FALSE. 86 102 87 103 @param[out] Md4Context Pointer to MD4 context being initialized. … … 89 105 @retval TRUE MD4 context initialization succeeded. 90 106 @retval FALSE MD4 context initialization failed. 107 @retval FALSE This interface is not supported. 91 108 92 109 **/ … … 102 119 If Md4Context is NULL, then return FALSE. 103 120 If NewMd4Context is NULL, then return FALSE. 121 If this interface is not supported, then return FALSE. 104 122 105 123 @param[in] Md4Context Pointer to MD4 context being copied. … … 108 126 @retval TRUE MD4 context copy succeeded. 109 127 @retval FALSE MD4 context copy failed. 128 @retval FALSE This interface is not supported. 110 129 111 130 **/ … … 126 145 127 146 If Md4Context is NULL, then return FALSE. 147 If this interface is not supported, then return FALSE. 128 148 129 149 @param[in, out] Md4Context Pointer to the MD4 context. … … 133 153 @retval TRUE MD4 data digest succeeded. 134 154 @retval FALSE MD4 data digest failed. 155 @retval FALSE This interface is not supported. 135 156 136 157 **/ … … 154 175 If Md4Context is NULL, then return FALSE. 155 176 If HashValue is NULL, then return FALSE. 177 If this interface is not supported, then return FALSE. 156 178 157 179 @param[in, out] Md4Context Pointer to the MD4 context. … … 161 183 @retval TRUE MD4 digest computation succeeded. 162 184 @retval FALSE MD4 digest computation failed. 185 @retval FALSE This interface is not supported. 163 186 164 187 **/ … … 173 196 Retrieves the size, in bytes, of the context buffer required for MD5 hash operations. 174 197 198 If this interface is not supported, then return zero. 199 175 200 @return The size, in bytes, of the context buffer required for MD5 hash operations. 201 @retval 0 This interface is not supported. 176 202 177 203 **/ … … 187 213 188 214 If Md5Context is NULL, then return FALSE. 215 If this interface is not supported, then return FALSE. 189 216 190 217 @param[out] Md5Context Pointer to MD5 context being initialized. … … 192 219 @retval TRUE MD5 context initialization succeeded. 193 220 @retval FALSE MD5 context initialization failed. 221 @retval FALSE This interface is not supported. 194 222 195 223 **/ … … 205 233 If Md5Context is NULL, then return FALSE. 206 234 If NewMd5Context is NULL, then return FALSE. 235 If this interface is not supported, then return FALSE. 207 236 208 237 @param[in] Md5Context Pointer to MD5 context being copied. … … 211 240 @retval TRUE MD5 context copy succeeded. 212 241 @retval FALSE MD5 context copy failed. 242 @retval FALSE This interface is not supported. 213 243 214 244 **/ … … 229 259 230 260 If Md5Context is NULL, then return FALSE. 261 If this interface is not supported, then return FALSE. 231 262 232 263 @param[in, out] Md5Context Pointer to the MD5 context. … … 236 267 @retval TRUE MD5 data digest succeeded. 237 268 @retval FALSE MD5 data digest failed. 269 @retval FALSE This interface is not supported. 238 270 239 271 **/ … … 257 289 If Md5Context is NULL, then return FALSE. 258 290 If HashValue is NULL, then return FALSE. 291 If this interface is not supported, then return FALSE. 259 292 260 293 @param[in, out] Md5Context Pointer to the MD5 context. … … 264 297 @retval TRUE MD5 digest computation succeeded. 265 298 @retval FALSE MD5 digest computation failed. 299 @retval FALSE This interface is not supported. 266 300 267 301 **/ … … 276 310 Retrieves the size, in bytes, of the context buffer required for SHA-1 hash operations. 277 311 312 If this interface is not supported, then return zero. 313 278 314 @return The size, in bytes, of the context buffer required for SHA-1 hash operations. 315 @retval 0 This interface is not supported. 279 316 280 317 **/ … … 290 327 291 328 If Sha1Context is NULL, then return FALSE. 329 If this interface is not supported, then return FALSE. 292 330 293 331 @param[out] Sha1Context Pointer to SHA-1 context being initialized. … … 295 333 @retval TRUE SHA-1 context initialization succeeded. 296 334 @retval FALSE SHA-1 context initialization failed. 335 @retval FALSE This interface is not supported. 297 336 298 337 **/ … … 308 347 If Sha1Context is NULL, then return FALSE. 309 348 If NewSha1Context is NULL, then return FALSE. 349 If this interface is not supported, then return FALSE. 310 350 311 351 @param[in] Sha1Context Pointer to SHA-1 context being copied. … … 314 354 @retval TRUE SHA-1 context copy succeeded. 315 355 @retval FALSE SHA-1 context copy failed. 356 @retval FALSE This interface is not supported. 316 357 317 358 **/ … … 332 373 333 374 If Sha1Context is NULL, then return FALSE. 375 If this interface is not supported, then return FALSE. 334 376 335 377 @param[in, out] Sha1Context Pointer to the SHA-1 context. … … 339 381 @retval TRUE SHA-1 data digest succeeded. 340 382 @retval FALSE SHA-1 data digest failed. 383 @retval FALSE This interface is not supported. 341 384 342 385 **/ … … 360 403 If Sha1Context is NULL, then return FALSE. 361 404 If HashValue is NULL, then return FALSE. 405 If this interface is not supported, then return FALSE. 362 406 363 407 @param[in, out] Sha1Context Pointer to the SHA-1 context. … … 367 411 @retval TRUE SHA-1 digest computation succeeded. 368 412 @retval FALSE SHA-1 digest computation failed. 413 @retval FALSE This interface is not supported. 369 414 370 415 **/ … … 411 456 If Sha256Context is NULL, then return FALSE. 412 457 If NewSha256Context is NULL, then return FALSE. 458 If this interface is not supported, then return FALSE. 413 459 414 460 @param[in] Sha256Context Pointer to SHA-256 context being copied. … … 417 463 @retval TRUE SHA-256 context copy succeeded. 418 464 @retval FALSE SHA-256 context copy failed. 465 @retval FALSE This interface is not supported. 419 466 420 467 **/ … … 479 526 ); 480 527 528 /** 529 Retrieves the size, in bytes, of the context buffer required for SHA-384 hash operations. 530 531 @return The size, in bytes, of the context buffer required for SHA-384 hash operations. 532 533 **/ 534 UINTN 535 EFIAPI 536 Sha384GetContextSize ( 537 VOID 538 ); 539 540 /** 541 Initializes user-supplied memory pointed by Sha384Context as SHA-384 hash context for 542 subsequent use. 543 544 If Sha384Context is NULL, then return FALSE. 545 546 @param[out] Sha384Context Pointer to SHA-384 context being initialized. 547 548 @retval TRUE SHA-384 context initialization succeeded. 549 @retval FALSE SHA-384 context initialization failed. 550 551 **/ 552 BOOLEAN 553 EFIAPI 554 Sha384Init ( 555 OUT VOID *Sha384Context 556 ); 557 558 /** 559 Makes a copy of an existing SHA-384 context. 560 561 If Sha384Context is NULL, then return FALSE. 562 If NewSha384Context is NULL, then return FALSE. 563 If this interface is not supported, then return FALSE. 564 565 @param[in] Sha384Context Pointer to SHA-384 context being copied. 566 @param[out] NewSha384Context Pointer to new SHA-384 context. 567 568 @retval TRUE SHA-384 context copy succeeded. 569 @retval FALSE SHA-384 context copy failed. 570 @retval FALSE This interface is not supported. 571 572 **/ 573 BOOLEAN 574 EFIAPI 575 Sha384Duplicate ( 576 IN CONST VOID *Sha384Context, 577 OUT VOID *NewSha384Context 578 ); 579 580 /** 581 Digests the input data and updates SHA-384 context. 582 583 This function performs SHA-384 digest on a data buffer of the specified size. 584 It can be called multiple times to compute the digest of long or discontinuous data streams. 585 SHA-384 context should be already correctly intialized by Sha384Init(), and should not be finalized 586 by Sha384Final(). Behavior with invalid context is undefined. 587 588 If Sha384Context is NULL, then return FALSE. 589 590 @param[in, out] Sha384Context Pointer to the SHA-384 context. 591 @param[in] Data Pointer to the buffer containing the data to be hashed. 592 @param[in] DataSize Size of Data buffer in bytes. 593 594 @retval TRUE SHA-384 data digest succeeded. 595 @retval FALSE SHA-384 data digest failed. 596 597 **/ 598 BOOLEAN 599 EFIAPI 600 Sha384Update ( 601 IN OUT VOID *Sha384Context, 602 IN CONST VOID *Data, 603 IN UINTN DataSize 604 ); 605 606 /** 607 Completes computation of the SHA-384 digest value. 608 609 This function completes SHA-384 hash computation and retrieves the digest value into 610 the specified memory. After this function has been called, the SHA-384 context cannot 611 be used again. 612 SHA-384 context should be already correctly intialized by Sha384Init(), and should not be 613 finalized by Sha384Final(). Behavior with invalid SHA-384 context is undefined. 614 615 If Sha384Context is NULL, then return FALSE. 616 If HashValue is NULL, then return FALSE. 617 618 @param[in, out] Sha384Context Pointer to the SHA-384 context. 619 @param[out] HashValue Pointer to a buffer that receives the SHA-384 digest 620 value (48 bytes). 621 622 @retval TRUE SHA-384 digest computation succeeded. 623 @retval FALSE SHA-384 digest computation failed. 624 625 **/ 626 BOOLEAN 627 EFIAPI 628 Sha384Final ( 629 IN OUT VOID *Sha384Context, 630 OUT UINT8 *HashValue 631 ); 632 633 /** 634 Retrieves the size, in bytes, of the context buffer required for SHA-512 hash operations. 635 636 @return The size, in bytes, of the context buffer required for SHA-512 hash operations. 637 638 **/ 639 UINTN 640 EFIAPI 641 Sha512GetContextSize ( 642 VOID 643 ); 644 645 /** 646 Initializes user-supplied memory pointed by Sha512Context as SHA-512 hash context for 647 subsequent use. 648 649 If Sha512Context is NULL, then return FALSE. 650 651 @param[out] Sha512Context Pointer to SHA-512 context being initialized. 652 653 @retval TRUE SHA-512 context initialization succeeded. 654 @retval FALSE SHA-512 context initialization failed. 655 656 **/ 657 BOOLEAN 658 EFIAPI 659 Sha512Init ( 660 OUT VOID *Sha512Context 661 ); 662 663 /** 664 Makes a copy of an existing SHA-512 context. 665 666 If Sha512Context is NULL, then return FALSE. 667 If NewSha512Context is NULL, then return FALSE. 668 If this interface is not supported, then return FALSE. 669 670 @param[in] Sha512Context Pointer to SHA-512 context being copied. 671 @param[out] NewSha512Context Pointer to new SHA-512 context. 672 673 @retval TRUE SHA-512 context copy succeeded. 674 @retval FALSE SHA-512 context copy failed. 675 @retval FALSE This interface is not supported. 676 677 **/ 678 BOOLEAN 679 EFIAPI 680 Sha512Duplicate ( 681 IN CONST VOID *Sha512Context, 682 OUT VOID *NewSha512Context 683 ); 684 685 /** 686 Digests the input data and updates SHA-512 context. 687 688 This function performs SHA-512 digest on a data buffer of the specified size. 689 It can be called multiple times to compute the digest of long or discontinuous data streams. 690 SHA-512 context should be already correctly intialized by Sha512Init(), and should not be finalized 691 by Sha512Final(). Behavior with invalid context is undefined. 692 693 If Sha512Context is NULL, then return FALSE. 694 695 @param[in, out] Sha512Context Pointer to the SHA-512 context. 696 @param[in] Data Pointer to the buffer containing the data to be hashed. 697 @param[in] DataSize Size of Data buffer in bytes. 698 699 @retval TRUE SHA-512 data digest succeeded. 700 @retval FALSE SHA-512 data digest failed. 701 702 **/ 703 BOOLEAN 704 EFIAPI 705 Sha512Update ( 706 IN OUT VOID *Sha512Context, 707 IN CONST VOID *Data, 708 IN UINTN DataSize 709 ); 710 711 /** 712 Completes computation of the SHA-512 digest value. 713 714 This function completes SHA-512 hash computation and retrieves the digest value into 715 the specified memory. After this function has been called, the SHA-512 context cannot 716 be used again. 717 SHA-512 context should be already correctly intialized by Sha512Init(), and should not be 718 finalized by Sha512Final(). Behavior with invalid SHA-512 context is undefined. 719 720 If Sha512Context is NULL, then return FALSE. 721 If HashValue is NULL, then return FALSE. 722 723 @param[in, out] Sha512Context Pointer to the SHA-512 context. 724 @param[out] HashValue Pointer to a buffer that receives the SHA-512 digest 725 value (64 bytes). 726 727 @retval TRUE SHA-512 digest computation succeeded. 728 @retval FALSE SHA-512 digest computation failed. 729 730 **/ 731 BOOLEAN 732 EFIAPI 733 Sha512Final ( 734 IN OUT VOID *Sha512Context, 735 OUT UINT8 *HashValue 736 ); 481 737 482 738 //===================================================================================== … … 487 743 Retrieves the size, in bytes, of the context buffer required for HMAC-MD5 operations. 488 744 745 If this interface is not supported, then return zero. 746 489 747 @return The size, in bytes, of the context buffer required for HMAC-MD5 operations. 748 @retval 0 This interface is not supported. 490 749 491 750 **/ … … 501 760 502 761 If HmacMd5Context is NULL, then return FALSE. 762 If this interface is not supported, then return FALSE. 503 763 504 764 @param[out] HmacMd5Context Pointer to HMAC-MD5 context being initialized. … … 508 768 @retval TRUE HMAC-MD5 context initialization succeeded. 509 769 @retval FALSE HMAC-MD5 context initialization failed. 770 @retval FALSE This interface is not supported. 510 771 511 772 **/ … … 523 784 If HmacMd5Context is NULL, then return FALSE. 524 785 If NewHmacMd5Context is NULL, then return FALSE. 786 If this interface is not supported, then return FALSE. 525 787 526 788 @param[in] HmacMd5Context Pointer to HMAC-MD5 context being copied. … … 529 791 @retval TRUE HMAC-MD5 context copy succeeded. 530 792 @retval FALSE HMAC-MD5 context copy failed. 793 @retval FALSE This interface is not supported. 531 794 532 795 **/ … … 547 810 548 811 If HmacMd5Context is NULL, then return FALSE. 812 If this interface is not supported, then return FALSE. 549 813 550 814 @param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context. … … 554 818 @retval TRUE HMAC-MD5 data digest succeeded. 555 819 @retval FALSE HMAC-MD5 data digest failed. 820 @retval FALSE This interface is not supported. 556 821 557 822 **/ … … 575 840 If HmacMd5Context is NULL, then return FALSE. 576 841 If HashValue is NULL, then return FALSE. 842 If this interface is not supported, then return FALSE. 577 843 578 844 @param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context. … … 582 848 @retval TRUE HMAC-MD5 digest computation succeeded. 583 849 @retval FALSE HMAC-MD5 digest computation failed. 850 @retval FALSE This interface is not supported. 584 851 585 852 **/ … … 594 861 Retrieves the size, in bytes, of the context buffer required for HMAC-SHA1 operations. 595 862 863 If this interface is not supported, then return zero. 864 596 865 @return The size, in bytes, of the context buffer required for HMAC-SHA1 operations. 866 @retval 0 This interface is not supported. 597 867 598 868 **/ … … 608 878 609 879 If HmacSha1Context is NULL, then return FALSE. 880 If this interface is not supported, then return FALSE. 610 881 611 882 @param[out] HmacSha1Context Pointer to HMAC-SHA1 context being initialized. … … 615 886 @retval TRUE HMAC-SHA1 context initialization succeeded. 616 887 @retval FALSE HMAC-SHA1 context initialization failed. 888 @retval FALSE This interface is not supported. 617 889 618 890 **/ … … 630 902 If HmacSha1Context is NULL, then return FALSE. 631 903 If NewHmacSha1Context is NULL, then return FALSE. 904 If this interface is not supported, then return FALSE. 632 905 633 906 @param[in] HmacSha1Context Pointer to HMAC-SHA1 context being copied. … … 636 909 @retval TRUE HMAC-SHA1 context copy succeeded. 637 910 @retval FALSE HMAC-SHA1 context copy failed. 911 @retval FALSE This interface is not supported. 638 912 639 913 **/ … … 654 928 655 929 If HmacSha1Context is NULL, then return FALSE. 930 If this interface is not supported, then return FALSE. 656 931 657 932 @param[in, out] HmacSha1Context Pointer to the HMAC-SHA1 context. … … 661 936 @retval TRUE HMAC-SHA1 data digest succeeded. 662 937 @retval FALSE HMAC-SHA1 data digest failed. 938 @retval FALSE This interface is not supported. 663 939 664 940 **/ … … 682 958 If HmacSha1Context is NULL, then return FALSE. 683 959 If HashValue is NULL, then return FALSE. 960 If this interface is not supported, then return FALSE. 684 961 685 962 @param[in, out] HmacSha1Context Pointer to the HMAC-SHA1 context. … … 689 966 @retval TRUE HMAC-SHA1 digest computation succeeded. 690 967 @retval FALSE HMAC-SHA1 digest computation failed. 968 @retval FALSE This interface is not supported. 691 969 692 970 **/ … … 698 976 ); 699 977 700 701 978 //===================================================================================== 702 979 // Symmetric Cryptography Primitive … … 706 983 Retrieves the size, in bytes, of the context buffer required for TDES operations. 707 984 985 If this interface is not supported, then return zero. 986 708 987 @return The size, in bytes, of the context buffer required for TDES operations. 988 @retval 0 This interface is not supported. 709 989 710 990 **/ … … 719 999 720 1000 This function initializes user-supplied memory pointed by TdesContext as TDES context. 721 In add tion, it sets up all TDES key materials for subsequent encryption and decryption1001 In addition, it sets up all TDES key materials for subsequent encryption and decryption 722 1002 operations. 723 1003 There are 3 key options as follows: … … 729 1009 If Key is NULL, then return FALSE. 730 1010 If KeyLength is not valid, then return FALSE. 1011 If this interface is not supported, then return FALSE. 731 1012 732 1013 @param[out] TdesContext Pointer to TDES context being initialized. … … 736 1017 @retval TRUE TDES context initialization succeeded. 737 1018 @retval FALSE TDES context initialization failed. 1019 @retval FALSE This interface is not supported. 738 1020 739 1021 **/ … … 760 1042 If InputSize is not multiple of block size (8 bytes), then return FALSE. 761 1043 If Output is NULL, then return FALSE. 1044 If this interface is not supported, then return FALSE. 762 1045 763 1046 @param[in] TdesContext Pointer to the TDES context. … … 768 1051 @retval TRUE TDES encryption succeeded. 769 1052 @retval FALSE TDES encryption failed. 1053 @retval FALSE This interface is not supported. 770 1054 771 1055 **/ … … 793 1077 If InputSize is not multiple of block size (8 bytes), then return FALSE. 794 1078 If Output is NULL, then return FALSE. 1079 If this interface is not supported, then return FALSE. 795 1080 796 1081 @param[in] TdesContext Pointer to the TDES context. … … 801 1086 @retval TRUE TDES decryption succeeded. 802 1087 @retval FALSE TDES decryption failed. 1088 @retval FALSE This interface is not supported. 803 1089 804 1090 **/ … … 828 1114 If Ivec is NULL, then return FALSE. 829 1115 If Output is NULL, then return FALSE. 1116 If this interface is not supported, then return FALSE. 830 1117 831 1118 @param[in] TdesContext Pointer to the TDES context. … … 837 1124 @retval TRUE TDES encryption succeeded. 838 1125 @retval FALSE TDES encryption failed. 1126 @retval FALSE This interface is not supported. 839 1127 840 1128 **/ … … 865 1153 If Ivec is NULL, then return FALSE. 866 1154 If Output is NULL, then return FALSE. 1155 If this interface is not supported, then return FALSE. 867 1156 868 1157 @param[in] TdesContext Pointer to the TDES context. … … 874 1163 @retval TRUE TDES decryption succeeded. 875 1164 @retval FALSE TDES decryption failed. 1165 @retval FALSE This interface is not supported. 876 1166 877 1167 **/ … … 889 1179 Retrieves the size, in bytes, of the context buffer required for AES operations. 890 1180 1181 If this interface is not supported, then return zero. 1182 891 1183 @return The size, in bytes, of the context buffer required for AES operations. 1184 @retval 0 This interface is not supported. 892 1185 893 1186 **/ … … 902 1195 903 1196 This function initializes user-supplied memory pointed by AesContext as AES context. 904 In add tion, it sets up all AES key materials for subsequent encryption and decryption1197 In addition, it sets up all AES key materials for subsequent encryption and decryption 905 1198 operations. 906 1199 There are 3 options for key length, 128 bits, 192 bits, and 256 bits. … … 909 1202 If Key is NULL, then return FALSE. 910 1203 If KeyLength is not valid, then return FALSE. 1204 If this interface is not supported, then return FALSE. 911 1205 912 1206 @param[out] AesContext Pointer to AES context being initialized. … … 916 1210 @retval TRUE AES context initialization succeeded. 917 1211 @retval FALSE AES context initialization failed. 1212 @retval FALSE This interface is not supported. 918 1213 919 1214 **/ … … 940 1235 If InputSize is not multiple of block size (16 bytes), then return FALSE. 941 1236 If Output is NULL, then return FALSE. 1237 If this interface is not supported, then return FALSE. 942 1238 943 1239 @param[in] AesContext Pointer to the AES context. … … 948 1244 @retval TRUE AES encryption succeeded. 949 1245 @retval FALSE AES encryption failed. 1246 @retval FALSE This interface is not supported. 950 1247 951 1248 **/ … … 973 1270 If InputSize is not multiple of block size (16 bytes), then return FALSE. 974 1271 If Output is NULL, then return FALSE. 1272 If this interface is not supported, then return FALSE. 975 1273 976 1274 @param[in] AesContext Pointer to the AES context. … … 981 1279 @retval TRUE AES decryption succeeded. 982 1280 @retval FALSE AES decryption failed. 1281 @retval FALSE This interface is not supported. 983 1282 984 1283 **/ … … 1008 1307 If Ivec is NULL, then return FALSE. 1009 1308 If Output is NULL, then return FALSE. 1309 If this interface is not supported, then return FALSE. 1010 1310 1011 1311 @param[in] AesContext Pointer to the AES context. … … 1017 1317 @retval TRUE AES encryption succeeded. 1018 1318 @retval FALSE AES encryption failed. 1319 @retval FALSE This interface is not supported. 1019 1320 1020 1321 **/ … … 1045 1346 If Ivec is NULL, then return FALSE. 1046 1347 If Output is NULL, then return FALSE. 1348 If this interface is not supported, then return FALSE. 1047 1349 1048 1350 @param[in] AesContext Pointer to the AES context. … … 1054 1356 @retval TRUE AES decryption succeeded. 1055 1357 @retval FALSE AES decryption failed. 1358 @retval FALSE This interface is not supported. 1056 1359 1057 1360 **/ … … 1069 1372 Retrieves the size, in bytes, of the context buffer required for ARC4 operations. 1070 1373 1374 If this interface is not supported, then return zero. 1375 1071 1376 @return The size, in bytes, of the context buffer required for ARC4 operations. 1377 @retval 0 This interface is not supported. 1072 1378 1073 1379 **/ … … 1082 1388 1083 1389 This function initializes user-supplied memory pointed by Arc4Context as ARC4 context. 1084 In add tion, it sets up all ARC4 key materials for subsequent encryption and decryption1390 In addition, it sets up all ARC4 key materials for subsequent encryption and decryption 1085 1391 operations. 1086 1392 … … 1088 1394 If Key is NULL, then return FALSE. 1089 1395 If KeySize does not in the range of [5, 256] bytes, then return FALSE. 1396 If this interface is not supported, then return FALSE. 1090 1397 1091 1398 @param[out] Arc4Context Pointer to ARC4 context being initialized. … … 1095 1402 @retval TRUE ARC4 context initialization succeeded. 1096 1403 @retval FALSE ARC4 context initialization failed. 1404 @retval FALSE This interface is not supported. 1097 1405 1098 1406 **/ … … 1116 1424 If Input is NULL, then return FALSE. 1117 1425 If Output is NULL, then return FALSE. 1426 If this interface is not supported, then return FALSE. 1118 1427 1119 1428 @param[in] Arc4Context Pointer to the ARC4 context. … … 1124 1433 @retval TRUE ARC4 encryption succeeded. 1125 1434 @retval FALSE ARC4 encryption failed. 1435 @retval FALSE This interface is not supported. 1126 1436 1127 1437 **/ … … 1146 1456 If Input is NULL, then return FALSE. 1147 1457 If Output is NULL, then return FALSE. 1458 If this interface is not supported, then return FALSE. 1148 1459 1149 1460 @param[in] Arc4Context Pointer to the ARC4 context. … … 1154 1465 @retval TRUE ARC4 decryption succeeded. 1155 1466 @retval FALSE ARC4 decryption failed. 1467 @retval FALSE This interface is not supported. 1156 1468 1157 1469 **/ … … 1174 1486 1175 1487 If Arc4Context is NULL, then return FALSE. 1488 If this interface is not supported, then return FALSE. 1176 1489 1177 1490 @param[in, out] Arc4Context Pointer to the ARC4 context. … … 1179 1492 @retval TRUE ARC4 reset succeeded. 1180 1493 @retval FALSE ARC4 reset failed. 1494 @retval FALSE This interface is not supported. 1181 1495 1182 1496 **/ … … 1263 1577 If BnSize is NULL, then return FALSE. 1264 1578 If BnSize is large enough but BigNumber is NULL, then return FALSE. 1579 If this interface is not supported, then return FALSE. 1265 1580 1266 1581 @param[in, out] RsaContext Pointer to RSA context being set. … … 1273 1588 @retval FALSE Invalid RSA key component tag. 1274 1589 @retval FALSE BnSize is too small. 1590 @retval FALSE This interface is not supported. 1275 1591 1276 1592 **/ … … 1295 1611 1296 1612 If RsaContext is NULL, then return FALSE. 1613 If this interface is not supported, then return FALSE. 1297 1614 1298 1615 @param[in, out] RsaContext Pointer to RSA context being set. 1299 1616 @param[in] ModulusLength Length of RSA modulus N in bits. 1300 1617 @param[in] PublicExponent Pointer to RSA public exponent. 1301 @param[in] PublicExponentSize Size of RSA public exponent buffer in bytes. 1618 @param[in] PublicExponentSize Size of RSA public exponent buffer in bytes. 1302 1619 1303 1620 @retval TRUE RSA key component was generated successfully. 1304 1621 @retval FALSE Invalid RSA key component tag. 1622 @retval FALSE This interface is not supported. 1305 1623 1306 1624 **/ … … 1316 1634 /** 1317 1635 Validates key components of RSA context. 1636 NOTE: This function performs integrity checks on all the RSA key material, so 1637 the RSA key structure must contain all the private key data. 1318 1638 1319 1639 This function validates key compoents of RSA context in following aspects: … … 1324 1644 1325 1645 If RsaContext is NULL, then return FALSE. 1646 If this interface is not supported, then return FALSE. 1326 1647 1327 1648 @param[in] RsaContext Pointer to RSA context to check. … … 1329 1650 @retval TRUE RSA key components are valid. 1330 1651 @retval FALSE RSA key components are not valid. 1652 @retval FALSE This interface is not supported. 1331 1653 1332 1654 **/ … … 1349 1671 If HashSize is not equal to the size of MD5, SHA-1 or SHA-256 digest, then return FALSE. 1350 1672 If SigSize is large enough but Signature is NULL, then return FALSE. 1673 If this interface is not supported, then return FALSE. 1351 1674 1352 1675 @param[in] RsaContext Pointer to RSA context for signature generation. … … 1360 1683 @retval FALSE Signature generation failed. 1361 1684 @retval FALSE SigSize is too small. 1685 @retval FALSE This interface is not supported. 1362 1686 1363 1687 **/ … … 1397 1721 IN CONST UINT8 *MessageHash, 1398 1722 IN UINTN HashSize, 1399 IN UINT8*Signature,1723 IN CONST UINT8 *Signature, 1400 1724 IN UINTN SigSize 1401 1725 ); … … 1403 1727 /** 1404 1728 Retrieve the RSA Private Key from the password-protected PEM key data. 1729 1730 If PemData is NULL, then return FALSE. 1731 If RsaContext is NULL, then return FALSE. 1732 If this interface is not supported, then return FALSE. 1405 1733 1406 1734 @param[in] PemData Pointer to the PEM-encoded key data to be retrieved. … … 1411 1739 resource. 1412 1740 1413 If PemData is NULL, then return FALSE.1414 If RsaContext is NULL, then return FALSE.1415 1416 1741 @retval TRUE RSA Private Key was retrieved successfully. 1417 1742 @retval FALSE Invalid PEM key data or incorrect password. 1743 @retval FALSE This interface is not supported. 1418 1744 1419 1745 **/ … … 1430 1756 Retrieve the RSA Public Key from one DER-encoded X509 certificate. 1431 1757 1758 If Cert is NULL, then return FALSE. 1759 If RsaContext is NULL, then return FALSE. 1760 If this interface is not supported, then return FALSE. 1761 1432 1762 @param[in] Cert Pointer to the DER-encoded X509 certificate. 1433 1763 @param[in] CertSize Size of the X509 certificate in bytes. … … 1436 1766 resource. 1437 1767 1438 If Cert is NULL, then return FALSE.1439 If RsaContext is NULL, then return FALSE.1440 1441 1768 @retval TRUE RSA Public Key was retrieved successfully. 1442 1769 @retval FALSE Fail to retrieve RSA public key from X509 certificate. 1770 @retval FALSE This interface is not supported. 1443 1771 1444 1772 **/ … … 1453 1781 /** 1454 1782 Retrieve the subject bytes from one X.509 certificate. 1783 1784 If Cert is NULL, then return FALSE. 1785 If SubjectSize is NULL, then return FALSE. 1786 If this interface is not supported, then return FALSE. 1455 1787 1456 1788 @param[in] Cert Pointer to the DER-encoded X509 certificate. … … 1460 1792 and the size of buffer returned CertSubject on output. 1461 1793 1462 If Cert is NULL, then return FALSE.1463 If SubjectSize is NULL, then return FALSE.1464 1465 1794 @retval TRUE The certificate subject retrieved successfully. 1466 1795 @retval FALSE Invalid certificate, or the SubjectSize is too small for the result. 1467 1796 The SubjectSize will be updated with the required size. 1797 @retval FALSE This interface is not supported. 1468 1798 1469 1799 **/ … … 1480 1810 Verify one X509 certificate was issued by the trusted CA. 1481 1811 1812 If Cert is NULL, then return FALSE. 1813 If CACert is NULL, then return FALSE. 1814 If this interface is not supported, then return FALSE. 1815 1482 1816 @param[in] Cert Pointer to the DER-encoded X509 certificate to be verified. 1483 1817 @param[in] CertSize Size of the X509 certificate in bytes. … … 1485 1819 @param[in] CACertSize Size of the CA Certificate in bytes. 1486 1820 1487 If Cert is NULL, then return FALSE.1488 If CACert is NULL, then return FALSE.1489 1490 1821 @retval TRUE The certificate was issued by the trusted CA. 1491 1822 @retval FALSE Invalid certificate or the certificate was not issued by the given 1492 1823 trusted CA. 1824 @retval FALSE This interface is not supported. 1493 1825 1494 1826 **/ … … 1507 1839 If Cert is NULL, then return FALSE. 1508 1840 If SingleX509Cert is NULL, then return FALSE. 1841 If this interface is not supported, then return FALSE. 1509 1842 1510 1843 @param[in] Cert Pointer to the DER-encoded certificate data. … … 1514 1847 @retval TRUE The X509 object generation succeeded. 1515 1848 @retval FALSE The operation failed. 1849 @retval FALSE This interface is not supported. 1516 1850 1517 1851 **/ … … 1528 1862 1529 1863 If X509Stack is NULL, then return FALSE. 1530 1531 @param[in, out] X509Stack On input, pointer to an existing X509 stack object. 1864 If this interface is not supported, then return FALSE. 1865 1866 @param[in, out] X509Stack On input, pointer to an existing or NULL X509 stack object. 1532 1867 On output, pointer to the X509 stack object with new 1533 1868 inserted X509 certificate. … … 1535 1870 by certificate size. A NULL terminates the list. The 1536 1871 pairs are the arguments to X509ConstructCertificate(). 1537 1872 1538 1873 @retval TRUE The X509 stack construction succeeded. 1539 1874 @retval FALSE The construction operation failed. 1875 @retval FALSE This interface is not supported. 1540 1876 1541 1877 **/ … … 1544 1880 X509ConstructCertificateStack ( 1545 1881 IN OUT UINT8 **X509Stack, 1546 ... 1882 ... 1547 1883 ); 1548 1884 … … 1550 1886 Release the specified X509 object. 1551 1887 1552 If X509Cert is NULL, then return FALSE.1888 If the interface is not supported, then ASSERT(). 1553 1889 1554 1890 @param[in] X509Cert Pointer to the X509 object to be released. … … 1564 1900 Release the specified X509 stack object. 1565 1901 1566 If X509Stack is NULL, then return FALSE.1902 If the interface is not supported, then ASSERT(). 1567 1903 1568 1904 @param[in] X509Stack Pointer to the X509 stack object to be released. … … 1573 1909 X509StackFree ( 1574 1910 IN VOID *X509Stack 1911 ); 1912 1913 /** 1914 Retrieve the TBSCertificate from one given X.509 certificate. 1915 1916 @param[in] Cert Pointer to the given DER-encoded X509 certificate. 1917 @param[in] CertSize Size of the X509 certificate in bytes. 1918 @param[out] TBSCert DER-Encoded To-Be-Signed certificate. 1919 @param[out] TBSCertSize Size of the TBS certificate in bytes. 1920 1921 If Cert is NULL, then return FALSE. 1922 If TBSCert is NULL, then return FALSE. 1923 If TBSCertSize is NULL, then return FALSE. 1924 If this interface is not supported, then return FALSE. 1925 1926 @retval TRUE The TBSCertificate was retrieved successfully. 1927 @retval FALSE Invalid X.509 certificate. 1928 1929 **/ 1930 BOOLEAN 1931 EFIAPI 1932 X509GetTBSCert ( 1933 IN CONST UINT8 *Cert, 1934 IN UINTN CertSize, 1935 OUT UINT8 **TBSCert, 1936 OUT UINTN *TBSCertSize 1575 1937 ); 1576 1938 … … 1582 1944 If P7Data, CertStack, StackLength, TrustedCert or CertLength is NULL, then 1583 1945 return FALSE. If P7Length overflow, then return FAlSE. 1946 If this interface is not supported, then return FALSE. 1584 1947 1585 1948 @param[in] P7Data Pointer to the PKCS#7 message to verify. … … 1594 1957 @retval TRUE The operation is finished successfully. 1595 1958 @retval FALSE Error occurs during the operation. 1959 @retval FALSE This interface is not supported. 1596 1960 1597 1961 **/ … … 1610 1974 Wrap function to use free() to free allocated memory for certificates. 1611 1975 1976 If this interface is not supported, then ASSERT(). 1977 1612 1978 @param[in] Certs Pointer to the certificates to be freed. 1613 1979 … … 1623 1989 Syntax Standard, version 1.5". This interface is only intended to be used for 1624 1990 application to perform PKCS#7 functionality validation. 1991 1992 If this interface is not supported, then return FALSE. 1625 1993 1626 1994 @param[in] PrivateKey Pointer to the PEM-formatted private key data for … … 1640 2008 @retval TRUE PKCS#7 data signing succeeded. 1641 2009 @retval FALSE PKCS#7 data signing failed. 2010 @retval FALSE This interface is not supported. 1642 2011 1643 2012 **/ … … 1663 2032 If P7Data, TrustedCert or InData is NULL, then return FALSE. 1664 2033 If P7Length, CertLength or DataLength overflow, then return FAlSE. 2034 If this interface is not supported, then return FALSE. 1665 2035 1666 2036 @param[in] P7Data Pointer to the PKCS#7 message to verify. … … 1674 2044 @retval TRUE The specified PKCS#7 signed data is valid. 1675 2045 @retval FALSE Invalid PKCS#7 signed data. 2046 @retval FALSE This interface is not supported. 1676 2047 1677 2048 **/ … … 1688 2059 1689 2060 /** 2061 Extracts the attached content from a PKCS#7 signed data if existed. The input signed 2062 data could be wrapped in a ContentInfo structure. 2063 2064 If P7Data, Content, or ContentSize is NULL, then return FALSE. If P7Length overflow, 2065 then return FAlSE. If the P7Data is not correctly formatted, then return FALSE. 2066 2067 Caution: This function may receive untrusted input. So this function will do 2068 basic check for PKCS#7 data structure. 2069 2070 @param[in] P7Data Pointer to the PKCS#7 signed data to process. 2071 @param[in] P7Length Length of the PKCS#7 signed data in bytes. 2072 @param[out] Content Pointer to the extracted content from the PKCS#7 signedData. 2073 It's caller's responsiblity to free the buffer. 2074 @param[out] ContentSize The size of the extracted content in bytes. 2075 2076 @retval TRUE The P7Data was correctly formatted for processing. 2077 @retval FALSE The P7Data was not correctly formatted for processing. 2078 2079 */ 2080 BOOLEAN 2081 EFIAPI 2082 Pkcs7GetAttachedContent ( 2083 IN CONST UINT8 *P7Data, 2084 IN UINTN P7Length, 2085 OUT VOID **Content, 2086 OUT UINTN *ContentSize 2087 ); 2088 2089 /** 1690 2090 Verifies the validility of a PE/COFF Authenticode Signature as described in "Windows 1691 2091 Authenticode Portable Executable Signature Format". … … 1693 2093 If AuthData is NULL, then return FALSE. 1694 2094 If ImageHash is NULL, then return FALSE. 2095 If this interface is not supported, then return FALSE. 1695 2096 1696 2097 @param[in] AuthData Pointer to the Authenticode Signature retrieved from signed … … 1707 2108 @retval TRUE The specified Authenticode Signature is valid. 1708 2109 @retval FALSE Invalid Authenticode Signature. 2110 @retval FALSE This interface is not supported. 1709 2111 1710 2112 **/ … … 1720 2122 ); 1721 2123 2124 /** 2125 Verifies the validility of a RFC3161 Timestamp CounterSignature embedded in PE/COFF Authenticode 2126 signature. 2127 2128 If AuthData is NULL, then return FALSE. 2129 If this interface is not supported, then return FALSE. 2130 2131 @param[in] AuthData Pointer to the Authenticode Signature retrieved from signed 2132 PE/COFF image to be verified. 2133 @param[in] DataSize Size of the Authenticode Signature in bytes. 2134 @param[in] TsaCert Pointer to a trusted/root TSA certificate encoded in DER, which 2135 is used for TSA certificate chain verification. 2136 @param[in] CertSize Size of the trusted certificate in bytes. 2137 @param[out] SigningTime Return the time of timestamp generation time if the timestamp 2138 signature is valid. 2139 2140 @retval TRUE The specified Authenticode includes a valid RFC3161 Timestamp CounterSignature. 2141 @retval FALSE No valid RFC3161 Timestamp CounterSignature in the specified Authenticode data. 2142 2143 **/ 2144 BOOLEAN 2145 EFIAPI 2146 ImageTimestampVerify ( 2147 IN CONST UINT8 *AuthData, 2148 IN UINTN DataSize, 2149 IN CONST UINT8 *TsaCert, 2150 IN UINTN CertSize, 2151 OUT EFI_TIME *SigningTime 2152 ); 2153 1722 2154 //===================================================================================== 1723 2155 // DH Key Exchange Primitive … … 1729 2161 @return Pointer to the Diffie-Hellman Context that has been initialized. 1730 2162 If the allocations fails, DhNew() returns NULL. 2163 If the interface is not supported, DhNew() returns NULL. 1731 2164 1732 2165 **/ … … 1740 2173 Release the specified DH context. 1741 2174 1742 If DhContext is NULL, then return FALSE.2175 If the interface is not supported, then ASSERT(). 1743 2176 1744 2177 @param[in] DhContext Pointer to the DH context to be released. … … 1756 2189 Given generator g, and length of prime number p in bits, this function generates p, 1757 2190 and sets DH context according to value of g and p. 1758 2191 1759 2192 Before this function can be invoked, pseudorandom number generator must be correctly 1760 2193 initialized by RandomSeed(). … … 1762 2195 If DhContext is NULL, then return FALSE. 1763 2196 If Prime is NULL, then return FALSE. 2197 If this interface is not supported, then return FALSE. 1764 2198 1765 2199 @param[in, out] DhContext Pointer to the DH context. … … 1771 2205 @retval FALSE Value of Generator is not supported. 1772 2206 @retval FALSE PRNG fails to generate random prime number with PrimeLength. 2207 @retval FALSE This interface is not supported. 1773 2208 1774 2209 **/ … … 1790 2225 If DhContext is NULL, then return FALSE. 1791 2226 If Prime is NULL, then return FALSE. 2227 If this interface is not supported, then return FALSE. 1792 2228 1793 2229 @param[in, out] DhContext Pointer to the DH context. … … 1801 2237 @retval FALSE Value of Prime is not a prime number. 1802 2238 @retval FALSE Value of Prime is not a safe prime number. 2239 @retval FALSE This interface is not supported. 1803 2240 1804 2241 **/ … … 1815 2252 Generates DH public key. 1816 2253 1817 This function generates random secret exponent, and computes the public key, which is 2254 This function generates random secret exponent, and computes the public key, which is 1818 2255 returned via parameter PublicKey and PublicKeySize. DH context is updated accordingly. 1819 2256 If the PublicKey buffer is too small to hold the public key, FALSE is returned and … … 1823 2260 If PublicKeySize is NULL, then return FALSE. 1824 2261 If PublicKeySize is large enough but PublicKey is NULL, then return FALSE. 2262 If this interface is not supported, then return FALSE. 1825 2263 1826 2264 @param[in, out] DhContext Pointer to the DH context. … … 1832 2270 @retval FALSE DH public key generation failed. 1833 2271 @retval FALSE PublicKeySize is not large enough. 2272 @retval FALSE This interface is not supported. 1834 2273 1835 2274 **/ … … 1846 2285 1847 2286 Given peer's public key, this function computes the exchanged common key, based on its own 1848 context including value of prime modulus and random secret exponent. 2287 context including value of prime modulus and random secret exponent. 1849 2288 1850 2289 If DhContext is NULL, then return FALSE. 1851 2290 If PeerPublicKey is NULL, then return FALSE. 1852 2291 If KeySize is NULL, then return FALSE. 1853 If KeySize is large enough but Key is NULL, then return FALSE. 2292 If Key is NULL, then return FALSE. 2293 If KeySize is not large enough, then return FALSE. 2294 If this interface is not supported, then return FALSE. 1854 2295 1855 2296 @param[in, out] DhContext Pointer to the DH context. … … 1863 2304 @retval FALSE DH exchanged key generation failed. 1864 2305 @retval FALSE KeySize is not large enough. 2306 @retval FALSE This interface is not supported. 1865 2307 1866 2308 **/ … … 1885 2327 If Seed is not NULL, then the seed passed in is used. 1886 2328 If Seed is NULL, then default seed is used. 2329 If this interface is not supported, then return FALSE. 1887 2330 1888 2331 @param[in] Seed Pointer to seed value. … … 1893 2336 @retval TRUE Pseudorandom number generator has enough entropy for random generation. 1894 2337 @retval FALSE Pseudorandom number generator does not have enough entropy for random generation. 2338 @retval FALSE This interface is not supported. 1895 2339 1896 2340 **/ … … 1906 2350 1907 2351 If Output is NULL, then return FALSE. 2352 If this interface is not supported, then return FALSE. 1908 2353 1909 2354 @param[out] Output Pointer to buffer to receive random value. … … 1912 2357 @retval TRUE Pseudorandom byte stream generated successfully. 1913 2358 @retval FALSE Pseudorandom number generator fails to generate due to lack of entropy. 2359 @retval FALSE This interface is not supported. 1914 2360 1915 2361 **/ -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Include/OpenSslSupport.h
r48674 r58459 2 2 Root include file to support building OpenSSL Crypto Library. 3 3 4 Copyright (c) 2010 - 201 1, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 73 73 For pre-Standard C compilers, here is a version that usually works 74 74 (but watch out!): */ 75 #define offsetof(type, member) ( (int) & ((type*)0) -> member)75 #define offsetof(type, member) OFFSET_OF (type, member) 76 76 77 77 // … … 109 109 char *tm_zone; /* timezone abbreviation */ 110 110 }; 111 112 struct timeval { 113 long tv_sec; /* time value, in seconds */ 114 long tv_usec; /* time value, in microseconds */ 115 } timeval; 111 116 112 117 struct dirent { … … 241 246 #define localtime(timer) NULL 242 247 #define gmtime_r(timer,result) (result = NULL) 248 #define atoi(nptr) AsciiStrDecimalToUintn(nptr) 243 249 244 250 #endif -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Include/Protocol/RuntimeCrypt.h
r48674 r58459 182 182 IN CONST UINT8 *MessageHash, 183 183 IN UINTN HashLength, 184 IN UINT8*Signature,184 IN CONST UINT8 *Signature, 185 185 IN UINTN SigLength 186 186 ); -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
r48674 r58459 2 2 # Cryptographic Library Instance for DXE_DRIVER. 3 3 # 4 # Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR> 4 # Caution: This module requires additional review when modified. 5 # This library will have external input - signature. 6 # This external input must be validated carefully to avoid security issues such as 7 # buffer overflow or integer overflow. 8 # 9 # Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR> 5 10 # This program and the accompanying materials 6 11 # are licensed and made available under the terms and conditions of the BSD License 7 12 # which accompanies this distribution. The full text of the license may be found at 8 13 # http://opensource.org/licenses/bsd-license.php 9 # 14 # 10 15 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 16 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 # 17 # 13 18 ## 14 19 … … 16 21 INF_VERSION = 0x00010005 17 22 BASE_NAME = BaseCryptLib 23 MODULE_UNI_FILE = BaseCryptLib.uni 18 24 FILE_GUID = be3bb803-91b6-4da0-bd91-a8b21c18ca5d 19 MODULE_TYPE = BASE25 MODULE_TYPE = DXE_DRIVER 20 26 VERSION_STRING = 1.0 21 LIBRARY_CLASS = BaseCryptLib 27 LIBRARY_CLASS = BaseCryptLib|DXE_DRIVER DXE_CORE UEFI_APPLICATION UEFI_DRIVER 22 28 23 29 # 24 30 # The following information is for reference only and not required by the build tools. 25 31 # 26 # VALID_ARCHITECTURES = IA32 X64 IPF ARM 32 # VALID_ARCHITECTURES = IA32 X64 IPF ARM AARCH64 27 33 # 28 34 … … 33 39 Hash/CryptSha1.c 34 40 Hash/CryptSha256.c 41 Hash/CryptSha512.c 35 42 Hmac/CryptHmacMd5.c 36 43 Hmac/CryptHmacSha1.c … … 38 45 Cipher/CryptTdes.c 39 46 Cipher/CryptArc4.c 40 Pk/CryptRsa.c 41 Pk/CryptPkcs7.c 47 Pk/CryptRsaBasic.c 48 Pk/CryptRsaExt.c 49 Pk/CryptPkcs7Sign.c 50 Pk/CryptPkcs7Verify.c 42 51 Pk/CryptDh.c 43 52 Pk/CryptX509.c 44 53 Pk/CryptAuthenticode.c 54 Pk/CryptTs.c 45 55 Pem/CryptPem.c 46 56 … … 50 60 51 61 [Sources.Ia32] 52 SysCall/Ia32/MathMultS64x64.c | MSFT53 SysCall/Ia32/MathDivU64x64.c | MSFT54 SysCall/Ia32/MathReminderU64x64.c | MSFT55 SysCall/Ia32/MathLShiftS64.c | MSFT56 SysCall/Ia32/MathRShiftU64.c | MSFT57 58 SysCall/Ia32/MathMultS64x64.c | INTEL59 SysCall/Ia32/MathDivU64x64.c | INTEL60 SysCall/Ia32/MathReminderU64x64.c | INTEL61 SysCall/Ia32/MathLShiftS64.c | INTEL62 SysCall/Ia32/MathRShiftU64.c | INTEL63 64 SysCall/Ia32/MathMultS64x64.S | GCC65 SysCall/Ia32/MathDivU64x64.S | GCC66 SysCall/Ia32/MathReminderU64x64.S | GCC67 SysCall/Ia32/MathLShiftS64.S | GCC68 SysCall/Ia32/MathRShiftU64.S | GCC69 70 62 Rand/CryptRandTsc.c 71 63 … … 79 71 Rand/CryptRand.c 80 72 73 [Sources.AARCH64] 74 Rand/CryptRand.c 75 81 76 [Packages] 82 77 MdePkg/MdePkg.dec … … 87 82 BaseMemoryLib 88 83 MemoryAllocationLib 84 UefiRuntimeServicesTableLib 89 85 DebugLib 90 86 OpensslLib … … 96 92 # 97 93 [BuildOptions] 94 # suppress the following warnings so we do not break the build with warnings-as-errors: 95 # C4305: truncation from type1 to type2 (Introduced by RFC3161 Timestamp ASN.1 declarations) 96 MSFT:*_*_*_CC_FLAGS = /wd4305 98 97 GCC:*_GCC44_IA32_CC_FLAGS = "-D__cdecl=__attribute__((cdecl))" "-D__declspec(t)=__attribute__((t))" -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Cipher/CryptAes.c
r48674 r58459 39 39 40 40 This function initializes user-supplied memory pointed by AesContext as AES context. 41 In add tion, it sets up all AES key materials for subsequent encryption and decryption41 In addition, it sets up all AES key materials for subsequent encryption and decryption 42 42 operations. 43 43 There are 3 options for key length, 128 bits, 192 bits, and 256 bits. … … 242 242 // Check input parameters. 243 243 // 244 if (AesContext == NULL || Input == NULL || (InputSize % AES_BLOCK_SIZE) != 0 || Ivec == NULL || Output == NULL) { 244 if (AesContext == NULL || Input == NULL || (InputSize % AES_BLOCK_SIZE) != 0) { 245 return FALSE; 246 } 247 248 if (Ivec == NULL || Output == NULL || InputSize > INT_MAX) { 245 249 return FALSE; 246 250 } … … 300 304 // Check input parameters. 301 305 // 302 if (AesContext == NULL || Input == NULL || (InputSize % AES_BLOCK_SIZE) != 0 || Ivec == NULL || Output == NULL) { 306 if (AesContext == NULL || Input == NULL || (InputSize % AES_BLOCK_SIZE) != 0) { 307 return FALSE; 308 } 309 310 if (Ivec == NULL || Output == NULL || InputSize > INT_MAX) { 303 311 return FALSE; 304 312 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Cipher/CryptArc4.c
r48674 r58459 33 33 // the working copy to the initial state. 34 34 // 35 return (UINTN) (2 * sizeof (RC4_KEY));35 return (UINTN) (2 * sizeof (RC4_KEY)); 36 36 } 37 37 … … 40 40 41 41 This function initializes user-supplied memory pointed by Arc4Context as ARC4 context. 42 In add tion, it sets up all ARC4 key materials for subsequent encryption and decryption42 In addition, it sets up all ARC4 key materials for subsequent encryption and decryption 43 43 operations. 44 44 … … 76 76 RC4_set_key (Rc4Key, (UINT32) KeySize, Key); 77 77 78 CopyMem (Rc4Key + 1, Rc4Key, sizeof (RC4_KEY));78 CopyMem (Rc4Key + 1, Rc4Key, sizeof (RC4_KEY)); 79 79 80 80 return TRUE; … … 116 116 // Check input parameters. 117 117 // 118 if (Arc4Context == NULL || Input == NULL || Output == NULL ) {118 if (Arc4Context == NULL || Input == NULL || Output == NULL || InputSize > INT_MAX) { 119 119 return FALSE; 120 120 } … … 162 162 // Check input parameters. 163 163 // 164 if (Arc4Context == NULL || Input == NULL || Output == NULL ) {164 if (Arc4Context == NULL || Input == NULL || Output == NULL || InputSize > INT_MAX) { 165 165 return FALSE; 166 166 } … … 206 206 Rc4Key = (RC4_KEY *) Arc4Context; 207 207 208 CopyMem (Rc4Key, Rc4Key + 1, sizeof (RC4_KEY));209 210 return TRUE; 211 } 208 CopyMem (Rc4Key, Rc4Key + 1, sizeof (RC4_KEY)); 209 210 return TRUE; 211 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Cipher/CryptTdes.c
r48674 r58459 38 38 39 39 This function initializes user-supplied memory pointed by TdesContext as TDES context. 40 In add tion, it sets up all TDES key materials for subsequent encryption and decryption40 In addition, it sets up all TDES key materials for subsequent encryption and decryption 41 41 operations. 42 42 There are 3 key options as follows: … … 77 77 78 78 // 79 // 80 // 81 if (DES_is_weak_key ((const_DES_cblock *) Key) ) {79 // If input Key is a weak key, return error. 80 // 81 if (DES_is_weak_key ((const_DES_cblock *) Key) == 1) { 82 82 return FALSE; 83 83 } … … 91 91 } 92 92 93 if (DES_is_weak_key ((const_DES_cblock *) Key + 8) ) {93 if (DES_is_weak_key ((const_DES_cblock *) Key + 8) == 1) { 94 94 return FALSE; 95 95 } … … 102 102 } 103 103 104 if (DES_is_weak_key ((const_DES_cblock *) Key + 16) ) {104 if (DES_is_weak_key ((const_DES_cblock *) Key + 16) == 1) { 105 105 return FALSE; 106 106 } … … 276 276 // Check input parameters. 277 277 // 278 if (TdesContext == NULL || Input == NULL || (InputSize % TDES_BLOCK_SIZE) != 0 || Ivec == NULL || Output == NULL) { 278 if (TdesContext == NULL || Input == NULL || (InputSize % TDES_BLOCK_SIZE) != 0) { 279 return FALSE; 280 } 281 282 if (Ivec == NULL || Output == NULL || InputSize > INT_MAX) { 279 283 return FALSE; 280 284 } … … 340 344 // Check input parameters. 341 345 // 342 if (TdesContext == NULL || Input == NULL || (InputSize % TDES_BLOCK_SIZE) != 0 || Ivec == NULL || Output == NULL) { 346 if (TdesContext == NULL || Input == NULL || (InputSize % TDES_BLOCK_SIZE) != 0) { 347 return FALSE; 348 } 349 350 if (Ivec == NULL || Output == NULL || InputSize > INT_MAX) { 343 351 return FALSE; 344 352 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Hash/CryptMd4.c
r48674 r58459 31 31 // Retrieves the OpenSSL MD4 Context Size 32 32 // 33 return (UINTN) (sizeof (MD4_CTX));33 return (UINTN) (sizeof (MD4_CTX)); 34 34 } 35 35 … … 62 62 // OpenSSL MD4 Context Initialization 63 63 // 64 return (BOOLEAN) (MD4_Init ((MD4_CTX *) Md4Context));64 return (BOOLEAN) (MD4_Init ((MD4_CTX *) Md4Context)); 65 65 } 66 66 … … 140 140 // OpenSSL MD4 Hash Update 141 141 // 142 return (BOOLEAN) (MD4_Update ((MD4_CTX *) Md4Context, Data, DataSize));142 return (BOOLEAN) (MD4_Update ((MD4_CTX *) Md4Context, Data, DataSize)); 143 143 } 144 144 … … 180 180 // OpenSSL MD4 Hash Finalization 181 181 // 182 return (BOOLEAN) (MD4_Final (HashValue, (MD4_CTX *) Md4Context));182 return (BOOLEAN) (MD4_Final (HashValue, (MD4_CTX *) Md4Context)); 183 183 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Hash/CryptMd5.c
r48674 r58459 32 32 // Retrieves the OpenSSL MD5 Context Size 33 33 // 34 return (UINTN) (sizeof (MD5_CTX));34 return (UINTN) (sizeof (MD5_CTX)); 35 35 } 36 36 … … 57 57 // Check input parameters. 58 58 // 59 if ( (Md5Context == NULL)) {59 if (Md5Context == NULL) { 60 60 return FALSE; 61 61 } … … 64 64 // OpenSSL MD5 Context Initialization 65 65 // 66 return (BOOLEAN) (MD5_Init ((MD5_CTX *) Md5Context));66 return (BOOLEAN) (MD5_Init ((MD5_CTX *) Md5Context)); 67 67 } 68 68 … … 142 142 // OpenSSL MD5 Hash Update 143 143 // 144 return (BOOLEAN) (MD5_Update ((MD5_CTX *) Md5Context, Data, DataSize));144 return (BOOLEAN) (MD5_Update ((MD5_CTX *) Md5Context, Data, DataSize)); 145 145 } 146 146 … … 182 182 // OpenSSL MD5 Hash Finalization 183 183 // 184 return (BOOLEAN) (MD5_Final (HashValue, (MD5_CTX *) Md5Context));184 return (BOOLEAN) (MD5_Final (HashValue, (MD5_CTX *) Md5Context)); 185 185 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha1.c
r48674 r58459 32 32 // Retrieves OpenSSL SHA Context Size 33 33 // 34 return (UINTN) (sizeof (SHA_CTX));34 return (UINTN) (sizeof (SHA_CTX)); 35 35 } 36 36 … … 63 63 // OpenSSL SHA-1 Context Initialization 64 64 // 65 return (BOOLEAN) (SHA1_Init ((SHA_CTX *) Sha1Context));65 return (BOOLEAN) (SHA1_Init ((SHA_CTX *) Sha1Context)); 66 66 } 67 67 … … 141 141 // OpenSSL SHA-1 Hash Update 142 142 // 143 return (BOOLEAN) (SHA1_Update ((SHA_CTX *) Sha1Context, Data, DataSize));143 return (BOOLEAN) (SHA1_Update ((SHA_CTX *) Sha1Context, Data, DataSize)); 144 144 } 145 145 … … 181 181 // OpenSSL SHA-1 Hash Finalization 182 182 // 183 return (BOOLEAN) (SHA1_Final (HashValue, (SHA_CTX *) Sha1Context));183 return (BOOLEAN) (SHA1_Final (HashValue, (SHA_CTX *) Sha1Context)); 184 184 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha256.c
r48674 r58459 31 31 // Retrieves OpenSSL SHA-256 Context Size 32 32 // 33 return (UINTN) (sizeof (SHA256_CTX));33 return (UINTN) (sizeof (SHA256_CTX)); 34 34 } 35 35 … … 62 62 // OpenSSL SHA-256 Context Initialization 63 63 // 64 return (BOOLEAN) (SHA256_Init ((SHA256_CTX *) Sha256Context));64 return (BOOLEAN) (SHA256_Init ((SHA256_CTX *) Sha256Context)); 65 65 } 66 66 … … 140 140 // OpenSSL SHA-256 Hash Update 141 141 // 142 return (BOOLEAN) (SHA256_Update ((SHA256_CTX *) Sha256Context, Data, DataSize));142 return (BOOLEAN) (SHA256_Update ((SHA256_CTX *) Sha256Context, Data, DataSize)); 143 143 } 144 144 … … 180 180 // OpenSSL SHA-256 Hash Finalization 181 181 // 182 return (BOOLEAN) (SHA256_Final (HashValue, (SHA256_CTX *) Sha256Context));182 return (BOOLEAN) (SHA256_Final (HashValue, (SHA256_CTX *) Sha256Context)); 183 183 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacMd5.c
r48674 r58459 31 31 // Retrieves the OpenSSL HMAC-MD5 Context Size 32 32 // 33 return (UINTN) (sizeof (HMAC_CTX));33 return (UINTN) (sizeof (HMAC_CTX)); 34 34 } 35 35 … … 59 59 // Check input parameters. 60 60 // 61 if (HmacMd5Context == NULL ) {61 if (HmacMd5Context == NULL || KeySize > INT_MAX) { 62 62 return FALSE; 63 63 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1.c
r48674 r58459 31 31 // Retrieves the OpenSSL HMAC-SHA1 Context Size 32 32 // 33 return (UINTN) (sizeof (HMAC_CTX));33 return (UINTN) (sizeof (HMAC_CTX)); 34 34 } 35 35 … … 59 59 // Check input parameters. 60 60 // 61 if (HmacSha1Context == NULL ) {61 if (HmacSha1Context == NULL || KeySize > INT_MAX) { 62 62 return FALSE; 63 63 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/InternalCryptLib.h
r48674 r58459 22 22 #include <Library/BaseCryptLib.h> 23 23 24 #include "OpenSslSupport.h" 25 24 26 // 25 27 // Environment Setting for OpenSSL-based UEFI Crypto Library. … … 29 31 #endif 30 32 31 /**32 Pop single certificate from STACK_OF(X509).33 34 If X509Stack, Cert, or CertSize is NULL, then return FALSE.35 36 @param[in] X509Stack Pointer to a X509 stack object.37 @param[out] Cert Pointer to a X509 certificate.38 @param[out] CertSize Length of output X509 certificate in bytes.39 40 @retval TRUE The X509 stack pop succeeded.41 @retval FALSE The pop operation failed.42 43 **/44 BOOLEAN45 X509PopCertificate (46 IN VOID *X509Stack,47 OUT UINT8 **Cert,48 OUT UINTN *CertSize49 );50 51 33 #endif 52 34 -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
r48674 r58459 2 2 # Cryptographic Library Instance for PEIM. 3 3 # 4 # Copyright (c) 2010, Intel Corporation. All rights reserved.<BR> 4 # Caution: This module requires additional review when modified. 5 # This library will have external input - signature. 6 # This external input must be validated carefully to avoid security issues such as 7 # buffer overflow or integer overflow. 8 # 9 # Note: MD4 Digest functions, SHA-384 Digest functions, SHA-512 Digest functions, 10 # HMAC-MD5 functions, HMAC-SHA1 functions, AES/TDES/ARC4 functions, RSA external 11 # functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, X.509 12 # certificate handler functions, authenticode signature verification functions, 13 # PEM handler functions, and pseudorandom number generator functions are not 14 # supported in this instance. 15 # 16 # Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR> 5 17 # This program and the accompanying materials 6 18 # are licensed and made available under the terms and conditions of the BSD License 7 19 # which accompanies this distribution. The full text of the license may be found at 8 20 # http://opensource.org/licenses/bsd-license.php 9 # 21 # 10 22 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 23 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 # 24 # 13 25 ## 14 26 … … 16 28 INF_VERSION = 0x00010005 17 29 BASE_NAME = PeiCryptLib 30 MODULE_UNI_FILE = PeiCryptLib.uni 18 31 FILE_GUID = 9a2a4375-194c-4e97-9f67-547ec98d96ca 19 32 MODULE_TYPE = PEIM 20 33 VERSION_STRING = 1.0 21 LIBRARY_CLASS = BaseCryptLib|PEIM PEI_CORE SEC34 LIBRARY_CLASS = BaseCryptLib|PEIM PEI_CORE 22 35 23 36 # … … 28 41 29 42 [Sources] 43 Hash/CryptMd4Null.c 30 44 Hash/CryptMd5.c 31 45 Hash/CryptSha1.c 32 46 Hash/CryptSha256.c 33 Pk/CryptRsa.c 47 Hash/CryptSha512Null.c 48 Hmac/CryptHmacMd5Null.c 49 Hmac/CryptHmacSha1Null.c 50 Cipher/CryptAesNull.c 51 Cipher/CryptTdesNull.c 52 Cipher/CryptArc4Null.c 53 54 Pk/CryptRsaBasic.c 55 Pk/CryptRsaExtNull.c 56 Pk/CryptPkcs7SignNull.c 57 Pk/CryptPkcs7Verify.c 58 59 Pk/CryptDhNull.c 60 Pk/CryptX509Null.c 61 Pk/CryptAuthenticodeNull.c 62 Pk/CryptTsNull.c 63 Pem/CryptPemNull.c 64 65 Rand/CryptRandNull.c 34 66 35 67 SysCall/CrtWrapper.c 68 SysCall/ConstantTimeClock.c 36 69 SysCall/BaseMemAllocation.c 37 38 [Sources.Ia32]39 SysCall/Ia32/MathMultS64x64.c | MSFT40 SysCall/Ia32/MathDivU64x64.c | MSFT41 SysCall/Ia32/MathReminderU64x64.c | MSFT42 SysCall/Ia32/MathLShiftS64.c | MSFT43 SysCall/Ia32/MathRShiftU64.c | MSFT44 45 SysCall/Ia32/MathMultS64x64.c | INTEL46 SysCall/Ia32/MathDivU64x64.c | INTEL47 SysCall/Ia32/MathReminderU64x64.c | INTEL48 SysCall/Ia32/MathLShiftS64.c | INTEL49 SysCall/Ia32/MathRShiftU64.c | INTEL50 51 SysCall/Ia32/MathMultS64x64.S | GCC52 SysCall/Ia32/MathDivU64x64.S | GCC53 SysCall/Ia32/MathReminderU64x64.S | GCC54 SysCall/Ia32/MathLShiftS64.S | GCC55 SysCall/Ia32/MathRShiftU64.S | GCC56 70 57 71 [Packages] … … 72 86 [BuildOptions] 73 87 GCC:*_GCC44_IA32_CC_FLAGS = "-D__cdecl=__attribute__((cdecl))" "-D__declspec(t)=__attribute__((t))" 74 -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Pem/CryptPem.c
r48674 r58459 2 2 PEM (Privacy Enhanced Mail) Format Handler Wrapper Implementation over OpenSSL. 3 3 4 Copyright (c) 2010 - 201 2, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 37 37 INTN KeyLength; 38 38 39 ZeroMem ((VOID *) Buf, (UINTN)Size);39 ZeroMem ((VOID *) Buf, (UINTN) Size); 40 40 if (Key != NULL) { 41 41 // … … 87 87 } 88 88 89 Status = FALSE;90 PemBio = NULL;91 92 89 // 93 90 // Add possible block-cipher descriptor for PEM data decryption. 94 91 // NOTE: Only support most popular ciphers (3DES, AES) for the encrypted PEM. 95 92 // 96 EVP_add_cipher (EVP_des_ede3_cbc()); 97 EVP_add_cipher (EVP_aes_128_cbc()); 98 EVP_add_cipher (EVP_aes_192_cbc()); 99 EVP_add_cipher (EVP_aes_256_cbc()); 93 if (EVP_add_cipher (EVP_des_ede3_cbc ()) == 0) { 94 return FALSE; 95 } 96 if (EVP_add_cipher (EVP_aes_128_cbc ()) == 0) { 97 return FALSE; 98 } 99 if (EVP_add_cipher (EVP_aes_192_cbc ()) == 0) { 100 return FALSE; 101 } 102 if (EVP_add_cipher (EVP_aes_256_cbc ()) == 0) { 103 return FALSE; 104 } 105 106 Status = FALSE; 100 107 101 108 // … … 103 110 // 104 111 PemBio = BIO_new (BIO_s_mem ()); 105 BIO_write (PemBio, PemData, (int)PemSize);106 112 if (PemBio == NULL) { 113 goto _Exit; 114 } 115 116 if (BIO_write (PemBio, PemData, (int) PemSize) <= 0) { 107 117 goto _Exit; 108 118 } … … 111 121 // Retrieve RSA Private Key from encrypted PEM data. 112 122 // 113 *RsaContext = PEM_read_bio_RSAPrivateKey (PemBio, NULL, (pem_password_cb *) &PasswordCallback, (void *)Password);123 *RsaContext = PEM_read_bio_RSAPrivateKey (PemBio, NULL, (pem_password_cb *) &PasswordCallback, (void *) Password); 114 124 if (*RsaContext != NULL) { 115 125 Status = TRUE; -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Pk/CryptAuthenticode.c
r48674 r58459 2 2 Authenticode Portable Executable Signature Verification over OpenSSL. 3 3 4 Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR> 4 Caution: This module requires additional review when modified. 5 This library will have external input - signature (e.g. PE/COFF Authenticode). 6 This external input must be validated carefully to avoid security issue like 7 buffer overflow, integer overflow. 8 9 AuthenticodeVerify() will get PE/COFF Authenticode and will do basic check for 10 data structure. 11 12 Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR> 5 13 This program and the accompanying materials 6 14 are licensed and made available under the terms and conditions of the BSD License … … 19 27 #include <openssl/pkcs7.h> 20 28 29 // 30 // OID ASN.1 Value for SPC_INDIRECT_DATA_OBJID 31 // 32 UINT8 mSpcIndirectOidValue[] = { 33 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x02, 0x01, 0x04 34 }; 21 35 22 36 /** … … 26 40 If AuthData is NULL, then return FALSE. 27 41 If ImageHash is NULL, then return FALSE. 42 43 Caution: This function may receive untrusted input. 44 PE/COFF Authenticode is external input, so this function will do basic check for 45 Authenticode data structure. 28 46 29 47 @param[in] AuthData Pointer to the Authenticode Signature retrieved from signed … … 55 73 BOOLEAN Status; 56 74 PKCS7 *Pkcs7; 75 CONST UINT8 *Temp; 57 76 CONST UINT8 *OrigAuthData; 58 77 UINT8 *SpcIndirectDataContent; 59 78 UINT8 Asn1Byte; 60 79 UINTN ContentSize; 80 UINT8 *SpcIndirectDataOid; 61 81 62 82 // … … 78 98 // Retrieve & Parse PKCS#7 Data (DER encoding) from Authenticode Signature 79 99 // 80 Pkcs7 = d2i_PKCS7 (NULL, &AuthData, (int)DataSize); 100 Temp = AuthData; 101 Pkcs7 = d2i_PKCS7 (NULL, &Temp, (int)DataSize); 81 102 if (Pkcs7 == NULL) { 82 103 goto _Exit; … … 95 116 // PKCS#7 ContentInfo here. 96 117 // 118 SpcIndirectDataOid = (UINT8 *)(Pkcs7->d.sign->contents->type->data); 119 if (CompareMem ( 120 SpcIndirectDataOid, 121 mSpcIndirectOidValue, 122 sizeof (mSpcIndirectOidValue) 123 ) != 0) { 124 // 125 // Un-matched SPC_INDIRECT_DATA_OBJID. 126 // 127 goto _Exit; 128 } 129 130 97 131 SpcIndirectDataContent = (UINT8 *)(Pkcs7->d.sign->contents->d.other->value.asn1_string->data); 98 132 … … 104 138 if ((Asn1Byte & 0x80) == 0) { 105 139 // 106 // Short Form of Length Encoding 140 // Short Form of Length Encoding (Length < 128) 107 141 // 108 142 ContentSize = (UINTN) (Asn1Byte & 0x7F); … … 111 145 // 112 146 SpcIndirectDataContent += 2; 147 148 } else if ((Asn1Byte & 0x81) == 0x81) { 149 // 150 // Long Form of Length Encoding (128 <= Length < 255, Single Octet) 151 // 152 ContentSize = (UINTN) (*(UINT8 *)(SpcIndirectDataContent + 2)); 153 // 154 // Skip the SEQUENCE Tag; 155 // 156 SpcIndirectDataContent += 3; 157 113 158 } else if ((Asn1Byte & 0x82) == 0x82) { 114 159 // 115 // Long Form of Length Encoding , only support two bytes.160 // Long Form of Length Encoding (Length > 255, Two Octet) 116 161 // 117 ContentSize = (UINTN) (*(SpcIndirectDataContent + 2));118 ContentSize = (ContentSize << 8) + (UINTN)(*( SpcIndirectDataContent + 3));162 ContentSize = (UINTN) (*(UINT8 *)(SpcIndirectDataContent + 2)); 163 ContentSize = (ContentSize << 8) + (UINTN)(*(UINT8 *)(SpcIndirectDataContent + 3)); 119 164 // 120 165 // Skip the SEQUENCE Tag; 121 166 // 122 167 SpcIndirectDataContent += 4; 168 123 169 } else { 124 170 goto _Exit; -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Pk/CryptDh.c
r48674 r58459 33 33 // Allocates & Initializes DH Context by OpenSSL DH_new() 34 34 // 35 return (VOID *) DH_new ();35 return (VOID *) DH_new (); 36 36 } 37 37 … … 53 53 // Free OpenSSL DH Context 54 54 // 55 DH_free ((DH *) DhContext);55 DH_free ((DH *) DhContext); 56 56 } 57 57 … … 92 92 // Check input parameters. 93 93 // 94 if (DhContext == NULL || Prime == NULL ) {94 if (DhContext == NULL || Prime == NULL || PrimeLength > INT_MAX) { 95 95 return FALSE; 96 96 } … … 140 140 ) 141 141 { 142 DH *Dh; 142 DH *Dh; 143 BIGNUM *Bn; 143 144 144 145 // 145 146 // Check input parameters. 146 147 // 147 if (DhContext == NULL || Prime == NULL ) {148 if (DhContext == NULL || Prime == NULL || PrimeLength > INT_MAX) { 148 149 return FALSE; 149 150 } … … 153 154 } 154 155 156 Bn = NULL; 157 155 158 Dh = (DH *) DhContext; 156 Dh->p = BN_new(); 157 Dh->g = BN_new(); 158 159 BN_bin2bn (Prime, (UINT32) (PrimeLength / 8), Dh->p); 160 BN_set_word (Dh->g, (UINT32) Generator); 159 Dh->g = NULL; 160 Dh->p = BN_new (); 161 if (Dh->p == NULL) { 162 goto Error; 163 } 164 165 Dh->g = BN_new (); 166 if (Dh->g == NULL) { 167 goto Error; 168 } 169 170 Bn = BN_bin2bn (Prime, (UINT32) (PrimeLength / 8), Dh->p); 171 if (Bn == NULL) { 172 goto Error; 173 } 174 175 if (BN_set_word (Dh->g, (UINT32) Generator) == 0) { 176 goto Error; 177 } 161 178 162 179 return TRUE; 180 181 Error: 182 183 if (Dh->p != NULL) { 184 BN_free (Dh->p); 185 } 186 187 if (Dh->g != NULL) { 188 BN_free (Dh->g); 189 } 190 191 if (Bn != NULL) { 192 BN_free (Bn); 193 } 194 195 return FALSE; 163 196 } 164 197 … … 195 228 BOOLEAN RetVal; 196 229 DH *Dh; 230 INTN Size; 197 231 198 232 // … … 208 242 209 243 Dh = (DH *) DhContext; 210 *PublicKeySize = 0;211 244 212 245 RetVal = (BOOLEAN) DH_generate_key (DhContext); 213 246 if (RetVal) { 247 Size = BN_num_bytes (Dh->pub_key); 248 if ((Size > 0) && (*PublicKeySize < (UINTN) Size)) { 249 *PublicKeySize = Size; 250 return FALSE; 251 } 252 214 253 BN_bn2bin (Dh->pub_key, PublicKey); 215 *PublicKeySize = BN_num_bytes (Dh->pub_key);254 *PublicKeySize = Size; 216 255 } 217 256 … … 228 267 If PeerPublicKey is NULL, then return FALSE. 229 268 If KeySize is NULL, then return FALSE. 230 If KeySize is large enough but Key is NULL, then return FALSE. 269 If Key is NULL, then return FALSE. 270 If KeySize is not large enough, then return FALSE. 231 271 232 272 @param[in, out] DhContext Pointer to the DH context. … … 253 293 { 254 294 BIGNUM *Bn; 295 INTN Size; 255 296 256 297 // 257 298 // Check input parameters. 258 299 // 259 if (DhContext == NULL || PeerPublicKey == NULL || KeySize == NULL ) {260 return FALSE; 261 } 262 263 if ( Key == NULL && *KeySize != 0) {300 if (DhContext == NULL || PeerPublicKey == NULL || KeySize == NULL || Key == NULL) { 301 return FALSE; 302 } 303 304 if (PeerPublicKeySize > INT_MAX) { 264 305 return FALSE; 265 306 } 266 307 267 308 Bn = BN_bin2bn (PeerPublicKey, (UINT32) PeerPublicKeySize, NULL); 268 269 *KeySize = (BOOLEAN) DH_compute_key (Key, Bn, DhContext); 270 309 if (Bn == NULL) { 310 return FALSE; 311 } 312 313 Size = DH_compute_key (Key, Bn, DhContext); 314 if (Size < 0) { 315 BN_free (Bn); 316 return FALSE; 317 } 318 319 if (*KeySize < (UINTN) Size) { 320 *KeySize = Size; 321 BN_free (Bn); 322 return FALSE; 323 } 324 325 *KeySize = Size; 271 326 BN_free (Bn); 272 273 327 return TRUE; 274 328 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c
r48674 r58459 2 2 X.509 Certificate Handler Wrapper Implementation over OpenSSL. 3 3 4 Copyright (c) 2010 - 201 2, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 39 39 ) 40 40 { 41 BIO *CertBio; 42 X509 *X509Cert; 43 BOOLEAN Status; 41 X509 *X509Cert; 42 CONST UINT8 *Temp; 44 43 45 44 // … … 50 49 } 51 50 52 Status = FALSE;53 54 51 // 55 52 // Read DER-encoded X509 Certificate and Construct X509 object. 56 53 // 57 CertBio = BIO_new (BIO_s_mem ()); 58 BIO_write (CertBio, Cert, (int) CertSize); 59 if (CertBio == NULL) { 60 goto _Exit; 61 } 62 X509Cert = d2i_X509_bio (CertBio, NULL); 54 Temp = Cert; 55 X509Cert = d2i_X509 (NULL, &Temp, (long) CertSize); 63 56 if (X509Cert == NULL) { 64 goto _Exit;57 return FALSE; 65 58 } 66 59 67 60 *SingleX509Cert = (UINT8 *) X509Cert; 68 Status = TRUE; 69 70 _Exit: 71 // 72 // Release Resources. 73 // 74 BIO_free (CertBio); 75 76 return Status; 61 62 return TRUE; 77 63 } 78 64 … … 82 68 If X509Stack is NULL, then return FALSE. 83 69 84 @param[in, out] X509Stack On input, pointer to an existing X509 stack object.70 @param[in, out] X509Stack On input, pointer to an existing or NULL X509 stack object. 85 71 On output, pointer to the X509 stack object with new 86 72 inserted X509 certificate. … … 140 126 141 127 CertSize = VA_ARG (Args, UINTN); 128 if (CertSize == 0) { 129 break; 130 } 142 131 143 132 // 144 133 // Construct X509 Object from the given DER-encoded certificate data. 145 134 // 135 X509Cert = NULL; 146 136 Status = X509ConstructCertificate ( 147 137 (CONST UINT8 *) Cert, … … 150 140 ); 151 141 if (!Status) { 152 X509_free (X509Cert); 142 if (X509Cert != NULL) { 143 X509_free (X509Cert); 144 } 153 145 break; 154 146 } … … 223 215 // 224 216 sk_X509_pop_free ((STACK_OF(X509) *) X509Stack, X509_free); 225 }226 227 /**228 Pop single certificate from STACK_OF(X509).229 230 If X509Stack, Cert, or CertSize is NULL, then return FALSE.231 232 @param[in] X509Stack Pointer to a X509 stack object.233 @param[out] Cert Pointer to a X509 certificate.234 @param[out] CertSize Length of output X509 certificate in bytes.235 236 @retval TRUE The X509 stack pop succeeded.237 @retval FALSE The pop operation failed.238 239 **/240 BOOLEAN241 X509PopCertificate (242 IN VOID *X509Stack,243 OUT UINT8 **Cert,244 OUT UINTN *CertSize245 )246 {247 BIO *CertBio;248 X509 *X509Cert;249 STACK_OF(X509) *CertStack;250 BOOLEAN Status;251 int Result;252 int Length;253 VOID *Buffer;254 255 Status = FALSE;256 257 if ((X509Stack == NULL) || (Cert == NULL) || (CertSize == NULL)) {258 return Status;259 }260 261 CertStack = (STACK_OF(X509) *) X509Stack;262 263 X509Cert = sk_X509_pop (CertStack);264 265 if (X509Cert == NULL) {266 return Status;267 }268 269 Buffer = NULL;270 271 CertBio = BIO_new (BIO_s_mem ());272 if (CertBio == NULL) {273 return Status;274 }275 276 Result = i2d_X509_bio (CertBio, X509Cert);277 if (Result == 0) {278 goto _Exit;279 }280 281 Length = ((BUF_MEM *) CertBio->ptr)->length;282 if (Length <= 0) {283 goto _Exit;284 }285 286 Buffer = malloc (Length);287 if (Buffer == NULL) {288 goto _Exit;289 }290 291 Result = BIO_read (CertBio, Buffer, Length);292 if (Result != Length) {293 goto _Exit;294 }295 296 *Cert = Buffer;297 *CertSize = Length;298 299 Status = TRUE;300 301 _Exit:302 303 BIO_free (CertBio);304 305 if (!Status && (Buffer != NULL)) {306 free (Buffer);307 }308 309 return Status;310 217 } 311 218 … … 347 254 } 348 255 349 Status = FALSE;350 256 X509Cert = NULL; 351 257 … … 355 261 Status = X509ConstructCertificate (Cert, CertSize, (UINT8 **) &X509Cert); 356 262 if ((X509Cert == NULL) || (!Status)) { 357 goto _Exit; 358 } 263 Status = FALSE; 264 goto _Exit; 265 } 266 267 Status = FALSE; 359 268 360 269 // … … 362 271 // 363 272 X509Name = X509_get_subject_name (X509Cert); 273 if (X509Name == NULL) { 274 goto _Exit; 275 } 276 364 277 if (*SubjectSize < (UINTN) X509Name->bytes->length) { 365 278 *SubjectSize = (UINTN) X509Name->bytes->length; … … 368 281 *SubjectSize = (UINTN) X509Name->bytes->length; 369 282 if (CertSubject != NULL) { 370 CopyMem (CertSubject, (UINT8 *) X509Name->bytes->data, *SubjectSize);283 CopyMem (CertSubject, (UINT8 *) X509Name->bytes->data, *SubjectSize); 371 284 Status = TRUE; 372 285 } … … 376 289 // Release Resources. 377 290 // 378 X509_free (X509Cert); 291 if (X509Cert != NULL) { 292 X509_free (X509Cert); 293 } 379 294 380 295 return Status; … … 416 331 } 417 332 418 Status = FALSE;419 333 Pkey = NULL; 420 334 X509Cert = NULL; … … 425 339 Status = X509ConstructCertificate (Cert, CertSize, (UINT8 **) &X509Cert); 426 340 if ((X509Cert == NULL) || (!Status)) { 427 goto _Exit; 428 } 341 Status = FALSE; 342 goto _Exit; 343 } 344 345 Status = FALSE; 429 346 430 347 // … … 447 364 // Release Resources. 448 365 // 449 X509_free (X509Cert); 450 EVP_PKEY_free (Pkey); 366 if (X509Cert != NULL) { 367 X509_free (X509Cert); 368 } 369 370 if (Pkey != NULL) { 371 EVP_PKEY_free (Pkey); 372 } 451 373 452 374 return Status; … … 499 421 // Register & Initialize necessary digest algorithms for certificate verification. 500 422 // 501 EVP_add_digest (EVP_md5()); 502 EVP_add_digest (EVP_sha1()); 503 EVP_add_digest (EVP_sha256()); 423 if (EVP_add_digest (EVP_md5 ()) == 0) { 424 goto _Exit; 425 } 426 if (EVP_add_digest (EVP_sha1 ()) == 0) { 427 goto _Exit; 428 } 429 if (EVP_add_digest (EVP_sha256 ()) == 0) { 430 goto _Exit; 431 } 504 432 505 433 // … … 508 436 Status = X509ConstructCertificate (Cert, CertSize, (UINT8 **) &X509Cert); 509 437 if ((X509Cert == NULL) || (!Status)) { 438 Status = FALSE; 510 439 goto _Exit; 511 440 } … … 516 445 Status = X509ConstructCertificate (CACert, CACertSize, (UINT8 **) &X509CACert); 517 446 if ((X509CACert == NULL) || (!Status)) { 518 goto _Exit; 519 } 447 Status = FALSE; 448 goto _Exit; 449 } 450 451 Status = FALSE; 520 452 521 453 // … … 547 479 // Release Resources. 548 480 // 549 X509_free (X509Cert); 550 X509_free (X509CACert); 551 X509_STORE_free (CertStore); 552 481 if (X509Cert != NULL) { 482 X509_free (X509Cert); 483 } 484 485 if (X509CACert != NULL) { 486 X509_free (X509CACert); 487 } 488 489 if (CertStore != NULL) { 490 X509_STORE_free (CertStore); 491 } 492 553 493 return Status; 554 494 } 495 496 /** 497 Retrieve the TBSCertificate from one given X.509 certificate. 498 499 @param[in] Cert Pointer to the given DER-encoded X509 certificate. 500 @param[in] CertSize Size of the X509 certificate in bytes. 501 @param[out] TBSCert DER-Encoded To-Be-Signed certificate. 502 @param[out] TBSCertSize Size of the TBS certificate in bytes. 503 504 If Cert is NULL, then return FALSE. 505 If TBSCert is NULL, then return FALSE. 506 If TBSCertSize is NULL, then return FALSE. 507 508 @retval TRUE The TBSCertificate was retrieved successfully. 509 @retval FALSE Invalid X.509 certificate. 510 511 **/ 512 BOOLEAN 513 EFIAPI 514 X509GetTBSCert ( 515 IN CONST UINT8 *Cert, 516 IN UINTN CertSize, 517 OUT UINT8 **TBSCert, 518 OUT UINTN *TBSCertSize 519 ) 520 { 521 CONST UINT8 *Temp; 522 INTN Asn1Tag; 523 INTN ObjClass; 524 UINTN Length; 525 526 // 527 // Check input parameters. 528 // 529 if ((Cert == NULL) || (TBSCert == NULL) || 530 (TBSCertSize == NULL) || (CertSize > INT_MAX)) { 531 return FALSE; 532 } 533 534 // 535 // An X.509 Certificate is: (defined in RFC3280) 536 // Certificate ::= SEQUENCE { 537 // tbsCertificate TBSCertificate, 538 // signatureAlgorithm AlgorithmIdentifier, 539 // signature BIT STRING } 540 // 541 // and 542 // 543 // TBSCertificate ::= SEQUENCE { 544 // version [0] Version DEFAULT v1, 545 // ... 546 // } 547 // 548 // So we can just ASN1-parse the x.509 DER-encoded data. If we strip 549 // the first SEQUENCE, the second SEQUENCE is the TBSCertificate. 550 // 551 Temp = Cert; 552 ASN1_get_object (&Temp, (long *)&Length, (int *)&Asn1Tag, (int *)&ObjClass, (long)CertSize); 553 554 if (Asn1Tag != V_ASN1_SEQUENCE) { 555 return FALSE; 556 } 557 558 *TBSCert = (UINT8 *)Temp; 559 560 ASN1_get_object (&Temp, (long *)&Length, (int *)&Asn1Tag, (int *)&ObjClass, (long)Length); 561 // 562 // Verify the parsed TBSCertificate is one correct SEQUENCE data. 563 // 564 if (Asn1Tag != V_ASN1_SEQUENCE) { 565 return FALSE; 566 } 567 568 *TBSCertSize = Length + (Temp - *TBSCert); 569 570 return TRUE; 571 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Rand/CryptRand.c
r48674 r58459 2 2 Pseudorandom Number Generator Wrapper Implementation over OpenSSL. 3 3 4 Copyright (c) 2010 - 201 2, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 15 15 #include "InternalCryptLib.h" 16 16 #include <openssl/rand.h> 17 #include <openssl/evp.h> 17 18 18 19 // … … 44 45 ) 45 46 { 47 if (SeedSize > INT_MAX) { 48 return FALSE; 49 } 50 51 // 52 // The software PRNG implementation built in OpenSSL depends on message digest algorithm. 53 // Make sure SHA-1 digest algorithm is available here. 54 // 55 if (EVP_add_digest (EVP_sha1 ()) == 0) { 56 return FALSE; 57 } 58 46 59 // 47 60 // Seed the pseudorandom number generator with user-supplied value. … … 54 67 } 55 68 56 return TRUE; 69 if (RAND_status () == 1) { 70 return TRUE; 71 } 72 73 return FALSE; 57 74 } 58 75 … … 79 96 // Check input parameters. 80 97 // 81 if (Output == NULL ) {98 if (Output == NULL || Size > INT_MAX) { 82 99 return FALSE; 83 100 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Rand/CryptRandItc.c
r48674 r58459 2 2 Pseudorandom Number Generator Wrapper Implementation over OpenSSL. 3 3 4 Copyright (c) 2012 , Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2012 - 2013, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 15 15 #include "InternalCryptLib.h" 16 16 #include <openssl/rand.h> 17 #include <openssl/evp.h> 17 18 #include <Library/PrintLib.h> 18 19 … … 42 43 CHAR8 DefaultSeed[128]; 43 44 45 if (SeedSize > INT_MAX) { 46 return FALSE; 47 } 48 49 // 50 // The software PRNG implementation built in OpenSSL depends on message digest algorithm. 51 // Make sure SHA-1 digest algorithm is available here. 52 // 53 if (EVP_add_digest (EVP_sha1 ()) == 0) { 54 return FALSE; 55 } 56 44 57 // 45 58 // Seed the pseudorandom number generator with user-supplied value. … … 62 75 } 63 76 64 return TRUE; 77 if (RAND_status () == 1) { 78 return TRUE; 79 } 80 81 return FALSE; 65 82 } 66 83 … … 87 104 // Check input parameters. 88 105 // 89 if (Output == NULL ) {106 if (Output == NULL || Size > INT_MAX) { 90 107 return FALSE; 91 108 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Rand/CryptRandTsc.c
r48674 r58459 2 2 Pseudorandom Number Generator Wrapper Implementation over OpenSSL. 3 3 4 Copyright (c) 2012 , Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2012 - 2013, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 15 15 #include "InternalCryptLib.h" 16 16 #include <openssl/rand.h> 17 #include <openssl/evp.h> 17 18 #include <Library/PrintLib.h> 18 19 … … 42 43 CHAR8 DefaultSeed[128]; 43 44 45 if (SeedSize > INT_MAX) { 46 return FALSE; 47 } 48 49 // 50 // The software PRNG implementation built in OpenSSL depends on message digest algorithm. 51 // Make sure SHA-1 digest algorithm is available here. 52 // 53 if (EVP_add_digest (EVP_sha1 ()) == 0) { 54 return FALSE; 55 } 56 44 57 // 45 58 // Seed the pseudorandom number generator with user-supplied value. … … 62 75 } 63 76 64 return TRUE; 77 if (RAND_status () == 1) { 78 return TRUE; 79 } 80 81 return FALSE; 65 82 } 66 83 … … 87 104 // Check input parameters. 88 105 // 89 if (Output == NULL ) {106 if (Output == NULL || Size > INT_MAX) { 90 107 return FALSE; 91 108 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
r48674 r58459 1 1 ## @file 2 # Cryptographic Library Instance for DXE_RUNTIME_DRIVER 2 # Cryptographic Library Instance for DXE_RUNTIME_DRIVER. 3 3 # 4 # Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR> 4 # Caution: This module requires additional review when modified. 5 # This library will have external input - signature. 6 # This external input must be validated carefully to avoid security issues such as 7 # buffer overflow or integer overflow. 8 # 9 # Note: MD4 Digest functions, SHA-384 Digest functions, SHA-512 Digest functions, 10 # HMAC-MD5 functions, HMAC-SHA1 functions, AES/TDES/ARC4 functions, RSA external 11 # functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and 12 # authenticode signature verification functions are not supported in this instance. 13 # 14 # Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR> 5 15 # This program and the accompanying materials 6 16 # are licensed and made available under the terms and conditions of the BSD License 7 17 # which accompanies this distribution. The full text of the license may be found at 8 18 # http://opensource.org/licenses/bsd-license.php 9 # 19 # 10 20 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 21 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 # 22 # 13 23 ## 14 24 … … 16 26 INF_VERSION = 0x00010005 17 27 BASE_NAME = RuntimeCryptLib 28 MODULE_UNI_FILE = RuntimeCryptLib.uni 18 29 FILE_GUID = 78189cc0-727d-46a4-84ea-f7dd860de64a 19 30 MODULE_TYPE = DXE_RUNTIME_DRIVER 20 31 VERSION_STRING = 1.0 21 LIBRARY_CLASS = BaseCryptLib 32 LIBRARY_CLASS = BaseCryptLib|DXE_RUNTIME_DRIVER 22 33 CONSTRUCTOR = RuntimeCryptLibConstructor 23 34 … … 25 36 # The following information is for reference only and not required by the build tools. 26 37 # 27 # VALID_ARCHITECTURES = IA32 X64 IPF ARM 38 # VALID_ARCHITECTURES = IA32 X64 IPF ARM AARCH64 28 39 # 29 40 30 41 [Sources] 42 Hash/CryptMd4Null.c 31 43 Hash/CryptMd5.c 32 44 Hash/CryptSha1.c 33 45 Hash/CryptSha256.c 34 Pk/CryptRsa.c 35 Pk/CryptPkcs7.c 46 Hash/CryptSha512Null.c 47 Hmac/CryptHmacMd5Null.c 48 Hmac/CryptHmacSha1Null.c 49 Cipher/CryptAesNull.c 50 Cipher/CryptTdesNull.c 51 Cipher/CryptArc4Null.c 52 Pk/CryptRsaBasic.c 53 Pk/CryptRsaExtNull.c 54 Pk/CryptPkcs7SignNull.c 55 Pk/CryptPkcs7Verify.c 56 Pk/CryptDhNull.c 36 57 Pk/CryptX509.c 58 Pk/CryptAuthenticodeNull.c 59 Pk/CryptTsNull.c 37 60 Pem/CryptPem.c 38 61 … … 42 65 43 66 [Sources.Ia32] 44 SysCall/Ia32/MathMultS64x64.c | MSFT45 SysCall/Ia32/MathDivU64x64.c | MSFT46 SysCall/Ia32/MathReminderU64x64.c | MSFT47 SysCall/Ia32/MathLShiftS64.c | MSFT48 SysCall/Ia32/MathRShiftU64.c | MSFT49 50 SysCall/Ia32/MathMultS64x64.c | INTEL51 SysCall/Ia32/MathDivU64x64.c | INTEL52 SysCall/Ia32/MathReminderU64x64.c | INTEL53 SysCall/Ia32/MathLShiftS64.c | INTEL54 SysCall/Ia32/MathRShiftU64.c | INTEL55 56 SysCall/Ia32/MathMultS64x64.S | GCC57 SysCall/Ia32/MathDivU64x64.S | GCC58 SysCall/Ia32/MathReminderU64x64.S | GCC59 SysCall/Ia32/MathLShiftS64.S | GCC60 SysCall/Ia32/MathRShiftU64.S | GCC61 62 67 Rand/CryptRandTsc.c 63 68 … … 69 74 70 75 [Sources.ARM] 76 Rand/CryptRand.c 77 78 [Sources.AARCH64] 71 79 Rand/CryptRand.c 72 80 … … 91 99 [BuildOptions] 92 100 GCC:*_GCC44_IA32_CC_FLAGS = "-D__cdecl=__attribute__((cdecl))" "-D__declspec(t)=__attribute__((t))" 93 -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
r48674 r58459 2 2 # Cryptographic Library Instance for SMM driver. 3 3 # 4 # Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR> 4 # Caution: This module requires additional review when modified. 5 # This library will have external input - signature. 6 # This external input must be validated carefully to avoid security issues such as 7 # buffer overflow or integer overflow. 8 # 9 # Note: MD4 Digest functions, SHA-384 Digest functions, SHA-512 Digest functions, 10 # HMAC-MD5 functions, HMAC-SHA1 functions, AES/TDES/ARC4 functions, RSA external 11 # functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and 12 # authenticode signature verification functions are not supported in this instance. 13 # 14 # Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR> 5 15 # This program and the accompanying materials 6 16 # are licensed and made available under the terms and conditions of the BSD License 7 17 # which accompanies this distribution. The full text of the license may be found at 8 18 # http://opensource.org/licenses/bsd-license.php 9 # 19 # 10 20 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 21 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 # 22 # 13 23 ## 14 24 … … 16 26 INF_VERSION = 0x00010005 17 27 BASE_NAME = SmmCryptLib 28 MODULE_UNI_FILE = SmmCryptLib.uni 18 29 FILE_GUID = 028080a3-8958-4a62-a1a8-0fa1da162007 19 30 MODULE_TYPE = DXE_SMM_DRIVER … … 25 36 # The following information is for reference only and not required by the build tools. 26 37 # 27 # VALID_ARCHITECTURES = IA32 X64 38 # VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 28 39 # 29 40 30 41 [Sources] 42 Hash/CryptMd4Null.c 31 43 Hash/CryptMd5.c 32 44 Hash/CryptSha1.c 33 45 Hash/CryptSha256.c 34 Pk/CryptRsa.c 35 Pk/CryptPkcs7.c 46 Hash/CryptSha512Null.c 47 Hmac/CryptHmacMd5Null.c 48 Hmac/CryptHmacSha1Null.c 49 Cipher/CryptAesNull.c 50 Cipher/CryptTdesNull.c 51 Cipher/CryptArc4Null.c 52 Pk/CryptRsaBasic.c 53 Pk/CryptRsaExtNull.c 54 Pk/CryptPkcs7SignNull.c 55 Pk/CryptPkcs7Verify.c 56 Pk/CryptDhNull.c 36 57 Pk/CryptX509.c 58 Pk/CryptAuthenticodeNull.c 59 Pk/CryptTsNull.c 37 60 Pem/CryptPem.c 38 61 39 62 SysCall/CrtWrapper.c 40 SysCall/ RealTimeClock.c63 SysCall/ConstantTimeClock.c 41 64 SysCall/BaseMemAllocation.c 42 65 43 66 [Sources.Ia32] 44 SysCall/Ia32/MathMultS64x64.c | MSFT45 SysCall/Ia32/MathDivU64x64.c | MSFT46 SysCall/Ia32/MathReminderU64x64.c | MSFT47 SysCall/Ia32/MathLShiftS64.c | MSFT48 SysCall/Ia32/MathRShiftU64.c | MSFT49 50 SysCall/Ia32/MathMultS64x64.c | INTEL51 SysCall/Ia32/MathDivU64x64.c | INTEL52 SysCall/Ia32/MathReminderU64x64.c | INTEL53 SysCall/Ia32/MathLShiftS64.c | INTEL54 SysCall/Ia32/MathRShiftU64.c | INTEL55 56 SysCall/Ia32/MathMultS64x64.S | GCC57 SysCall/Ia32/MathDivU64x64.S | GCC58 SysCall/Ia32/MathReminderU64x64.S | GCC59 SysCall/Ia32/MathLShiftS64.S | GCC60 SysCall/Ia32/MathRShiftU64.S | GCC61 62 67 Rand/CryptRandTsc.c 63 68 … … 69 74 70 75 [Sources.ARM] 76 Rand/CryptRand.c 77 78 [Sources.AARCH64] 71 79 Rand/CryptRand.c 72 80 … … 89 97 [BuildOptions] 90 98 GCC:*_GCC44_IA32_CC_FLAGS = "-D__cdecl=__attribute__((cdecl))" "-D__declspec(t)=__attribute__((t))" 91 99 XCODE:*_*_*_CC_FLAGS = -mmmx -msse -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/SysCall/BaseMemAllocation.c
r48674 r58459 3 3 during PEI & DXE phases. 4 4 5 Copyright (c) 2009 - 201 0, Intel Corporation. All rights reserved.<BR>5 Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR> 6 6 This program and the accompanying materials 7 7 are licensed and made available under the terms and conditions of the BSD License … … 23 23 void *malloc (size_t size) 24 24 { 25 return AllocatePool ((UINTN) size);25 return AllocatePool ((UINTN) size); 26 26 } 27 27 … … 33 33 // memory size of original pointer ptr. 34 34 // 35 return ReallocatePool ((UINTN) size, (UINTN)size, ptr);35 return ReallocatePool ((UINTN) size, (UINTN) size, ptr); 36 36 } 37 37 -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c
r48674 r58459 3 3 Library at Runtime Phase. 4 4 5 Copyright (c) 2009 - 201 1, Intel Corporation. All rights reserved.<BR>5 Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR> 6 6 This program and the accompanying materials 7 7 are licensed and made available under the terms and conditions of the BSD License … … 386 386 void *malloc (size_t size) 387 387 { 388 return RuntimeAllocateMem ((UINTN) size);388 return RuntimeAllocateMem ((UINTN) size); 389 389 } 390 390 -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c
r48674 r58459 149 149 150 150 for (MonthNo = 12; MonthNo > 1; MonthNo--) { 151 if (DayNo > CumulativeDays[IsLeap(Year)][MonthNo]) {151 if (DayNo >= CumulativeDays[IsLeap(Year)][MonthNo]) { 152 152 DayNo = (UINT16) (DayNo - (UINT16) (CumulativeDays[IsLeap(Year)][MonthNo])); 153 153 break; … … 155 155 } 156 156 157 GmTime->tm_mon = (int) MonthNo ;158 GmTime->tm_mday = (int) DayNo ;157 GmTime->tm_mon = (int) MonthNo - 1; 158 GmTime->tm_mday = (int) DayNo + 1; 159 159 160 160 GmTime->tm_isdst = 0; -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/BaseCryptLibRuntimeCryptProtocol.inf
r48674 r58459 3 3 # This instance will be only used by the Authenticated Variable driver for IPF. 4 4 # 5 # Copyright (c) 2010, Intel Corporation. All rights reserved.<BR> 5 # Note: MD4/MD5/SHA1 Digest functions, HMAC-MD5 functions, HMAC-SHA1 functions, 6 # AES/TDES/ARC4 functions, RSA external functions, PKCS#7 SignedData sign/verify 7 # functions, Diffie-Hellman functions, X.509 certificate handler functions, 8 # authenticode signature verification functions, PEM handler functions, 9 # pseudorandom number generator functions, and Sha256Duplicate() are not supported 10 # in this instance. 11 # 12 # Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR> 6 13 # This program and the accompanying materials 7 14 # are licensed and made available under the terms and conditions of the BSD License … … 17 24 INF_VERSION = 0x00010005 18 25 BASE_NAME = BaseCryptLibRuntimeCryptProtocol 26 MODULE_UNI_FILE = BaseCryptLibRuntimeCryptProtocol.uni 19 27 FILE_GUID = BBB31581-855A-44D7-A550-8A585D9B2DE9 20 28 MODULE_TYPE = DXE_RUNTIME_DRIVER … … 31 39 [Sources] 32 40 RuntimeDxeIpfCryptLib.c 41 InternalCryptLib.h 42 Hash/CryptMd4Null.c 43 Hash/CryptMd5Null.c 44 Hash/CryptSha1Null.c 45 Hmac/CryptHmacMd5Null.c 46 Hmac/CryptHmacSha1Null.c 47 Cipher/CryptAesNull.c 48 Cipher/CryptTdesNull.c 49 Cipher/CryptArc4Null.c 50 Pk/CryptRsaExtNull.c 51 Pk/CryptPkcs7SignNull.c 52 Pk/CryptPkcs7VerifyNull.c 53 Pk/CryptDhNull.c 54 Pk/CryptX509Null.c 55 Pk/CryptAuthenticodeNull.c 56 Pem/CryptPemNull.c 57 Rand/CryptRandNull.c 33 58 34 59 [Packages] … … 39 64 BaseLib 40 65 DebugLib 66 UefiBootServicesTableLib 67 UefiRuntimeLib 41 68 42 69 [Guids] -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/RuntimeDxeIpfCryptLib.c
r48674 r58459 219 219 220 220 /** 221 Makes a copy of an existing SHA-256 context. 222 223 Return FALSE to indicate this interface is not supported. 224 225 @param[in] Sha256Context Pointer to SHA-256 context being copied. 226 @param[out] NewSha256Context Pointer to new SHA-256 context. 227 228 @retval FALSE This interface is not supported. 229 230 **/ 231 BOOLEAN 232 EFIAPI 233 Sha256Duplicate ( 234 IN CONST VOID *Sha256Context, 235 OUT VOID *NewSha256Context 236 ) 237 { 238 ASSERT (FALSE); 239 return FALSE; 240 } 241 242 243 /** 221 244 Performs SHA-256 digest on a data buffer of the specified length. This function can 222 245 be called multiple times to compute the digest of long or discontinuous data streams. … … 278 301 279 302 /** 280 Allocates and Initializes one RSA Context for subsequent use.281 282 @return Pointer to the RSA Context that has been initialized.303 Allocates and initializes one RSA context for subsequent use. 304 305 @return Pointer to the RSA context that has been initialized. 283 306 If the allocations fails, RsaNew() returns NULL. 284 307 … … 298 321 299 322 /** 300 Release the specified RSA Context.323 Release the specified RSA context. 301 324 302 325 @param[in] RsaContext Pointer to the RSA context to be released. … … 317 340 318 341 /** 319 Sets the tag-designated RSA key component into the established RSA context from 320 the user-specified nonnegative integer (octet string format represented in RSA 321 PKCS#1). 342 Sets the tag-designated key component into the established RSA context. 343 344 This function sets the tag-designated RSA key component into the established 345 RSA context from the user-specified non-negative integer (octet string format 346 represented in RSA PKCS#1). 347 If BigNumber is NULL, then the specified key componenet in RSA context is cleared. 322 348 323 349 If RsaContext is NULL, then return FALSE. … … 326 352 @param[in] KeyTag Tag of RSA key component being set. 327 353 @param[in] BigNumber Pointer to octet integer buffer. 328 @param[in] BnLength Length of big number buffer in bytes. 329 330 @return TRUE RSA key component was set successfully. 331 @return FALSE Invalid RSA key component tag. 354 If NULL, then the specified key componenet in RSA 355 context is cleared. 356 @param[in] BnSize Size of big number buffer in bytes. 357 If BigNumber is NULL, then it is ignored. 358 359 @retval TRUE RSA key component was set successfully. 360 @retval FALSE Invalid RSA key component tag. 332 361 333 362 **/ … … 335 364 EFIAPI 336 365 RsaSetKey ( 337 IN OUT VOID *RsaContext,338 IN RSA_KEY_TAG KeyTag,339 IN CONST UINT8 *BigNumber,340 IN UINTN BnLength341 ) 342 { 343 if (!InternalIsCryptServiveAvailable ()) { 344 return FALSE; 345 } 346 347 return mCryptProtocol->RsaSetKey (RsaContext, KeyTag, BigNumber, Bn Length);366 IN OUT VOID *RsaContext, 367 IN RSA_KEY_TAG KeyTag, 368 IN CONST UINT8 *BigNumber, 369 IN UINTN BnSize 370 ) 371 { 372 if (!InternalIsCryptServiveAvailable ()) { 373 return FALSE; 374 } 375 376 return mCryptProtocol->RsaSetKey (RsaContext, KeyTag, BigNumber, BnSize); 348 377 } 349 378 … … 355 384 If MessageHash is NULL, then return FALSE. 356 385 If Signature is NULL, then return FALSE. 357 If Hash Lengthis not equal to the size of MD5, SHA-1 or SHA-256 digest, then return FALSE.386 If HashSize is not equal to the size of MD5, SHA-1 or SHA-256 digest, then return FALSE. 358 387 359 388 @param[in] RsaContext Pointer to RSA context for signature verification. 360 389 @param[in] MessageHash Pointer to octet message hash to be checked. 361 @param[in] Hash Length Lengthof the message hash in bytes.390 @param[in] HashSize Size of the message hash in bytes. 362 391 @param[in] Signature Pointer to RSA PKCS1-v1_5 signature to be verified. 363 @param[in] Sig Length Lengthof signature in bytes.364 365 @ret urnTRUE Valid signature encoded in PKCS1-v1_5.366 @ret urnFALSE Invalid signature or invalid RSA context.392 @param[in] SigSize Size of signature in bytes. 393 394 @retval TRUE Valid signature encoded in PKCS1-v1_5. 395 @retval FALSE Invalid signature or invalid RSA context. 367 396 368 397 **/ … … 372 401 IN VOID *RsaContext, 373 402 IN CONST UINT8 *MessageHash, 374 IN UINTN Hash Length,375 IN UINT8*Signature,376 IN UINTN Sig Length403 IN UINTN HashSize, 404 IN CONST UINT8 *Signature, 405 IN UINTN SigSize 377 406 ) 378 407 { … … 384 413 RsaContext, 385 414 MessageHash, 386 Hash Length,415 HashSize, 387 416 Signature, 388 Sig Length417 SigSize 389 418 ); 390 419 } -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
r48674 r58459 2 2 # Intrinsic Routines Wrapper Library Instance. 3 3 # 4 # Copyright (c) 2010 - 201 1, Intel Corporation. All rights reserved.<BR>4 # Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 # This program and the accompanying materials 6 6 # are licensed and made available under the terms and conditions of the BSD License 7 7 # which accompanies this distribution. The full text of the license may be found at 8 8 # http://opensource.org/licenses/bsd-license.php 9 # 9 # 10 10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 # 12 # 13 13 ## 14 14 … … 16 16 INF_VERSION = 0x00010005 17 17 BASE_NAME = BaseIntrinsicLib 18 MODULE_UNI_FILE = BaseIntrinsicLib.uni 18 19 FILE_GUID = 63850097-3E97-4c4f-A52D-C811A0106105 19 20 MODULE_TYPE = BASE … … 32 33 [Sources.IA32] 33 34 CopyMem.c 35 36 Ia32/MathLShiftS64.c | MSFT 37 Ia32/MathRShiftU64.c | MSFT 38 39 Ia32/MathLShiftS64.c | INTEL 40 Ia32/MathRShiftU64.c | INTEL 41 42 Ia32/MathLShiftS64.S | GCC 43 Ia32/MathRShiftU64.S | GCC 34 44 35 45 [Sources.X64] -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c
r48674 r58459 3 3 Cryptographic Library. 4 4 5 Copyright (c) 2010 , Intel Corporation. All rights reserved.<BR>5 Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR> 6 6 This program and the accompanying materials 7 7 are licensed and made available under the terms and conditions of the BSD License … … 25 25 { 26 26 // 27 // NOTE: Here we use one base implementation for memset, instead of the direct 28 // optimized SetMem() wrapper. Because the IntrinsicLib has to be built 29 // without whole program optimization option, and there will be some 30 // potential register usage errors when calling other optimized codes. 31 // 32 33 // 27 34 // Declare the local variables that actually move the data elements as 28 35 // volatile to prevent the optimizer from replacing this function with -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/Install.cmd
r48674 r58459 1 cd openssl-0.9.8w 2 copy e_os2.h ..\..\..\Include\openssl 3 copy crypto\crypto.h ..\..\..\Include\openssl 4 copy crypto\tmdiff.h ..\..\..\Include\openssl 5 copy crypto\opensslv.h ..\..\..\Include\openssl 6 copy crypto\opensslconf.h ..\..\..\Include\openssl 7 copy crypto\ebcdic.h ..\..\..\Include\openssl 8 copy crypto\symhacks.h ..\..\..\Include\openssl 9 copy crypto\ossl_typ.h ..\..\..\Include\openssl 10 copy crypto\md2\md2.h ..\..\..\Include\openssl 11 copy crypto\md4\md4.h ..\..\..\Include\openssl 12 copy crypto\md5\md5.h ..\..\..\Include\openssl 13 copy crypto\sha\sha.h ..\..\..\Include\openssl 14 copy crypto\hmac\hmac.h ..\..\..\Include\openssl 15 copy crypto\ripemd\ripemd.h ..\..\..\Include\openssl 16 copy crypto\des\des.h ..\..\..\Include\openssl 17 copy crypto\des\des_old.h ..\..\..\Include\openssl 18 copy crypto\rc2\rc2.h ..\..\..\Include\openssl 19 copy crypto\rc4\rc4.h ..\..\..\Include\openssl 20 copy crypto\idea\idea.h ..\..\..\Include\openssl 21 copy crypto\bf\blowfish.h ..\..\..\Include\openssl 22 copy crypto\cast\cast.h ..\..\..\Include\openssl 23 copy crypto\aes\aes.h ..\..\..\Include\openssl 24 copy crypto\bn\bn.h ..\..\..\Include\openssl 25 copy crypto\rsa\rsa.h ..\..\..\Include\openssl 26 copy crypto\dsa\dsa.h ..\..\..\Include\openssl 27 copy crypto\dso\dso.h ..\..\..\Include\openssl 28 copy crypto\dh\dh.h ..\..\..\Include\openssl 29 copy crypto\ec\ec.h ..\..\..\Include\openssl 30 copy crypto\ecdh\ecdh.h ..\..\..\Include\openssl 31 copy crypto\ecdsa\ecdsa.h ..\..\..\Include\openssl 32 copy crypto\buffer\buffer.h ..\..\..\Include\openssl 33 copy crypto\bio\bio.h ..\..\..\Include\openssl 34 copy crypto\stack\stack.h ..\..\..\Include\openssl 35 copy crypto\stack\safestack.h ..\..\..\Include\openssl 36 copy crypto\lhash\lhash.h ..\..\..\Include\openssl 37 copy crypto\rand\rand.h ..\..\..\Include\openssl 38 copy crypto\err\err.h ..\..\..\Include\openssl 39 copy crypto\objects\objects.h ..\..\..\Include\openssl 40 copy crypto\objects\obj_mac.h ..\..\..\Include\openssl 41 copy crypto\evp\evp.h ..\..\..\Include\openssl 42 copy crypto\asn1\asn1.h ..\..\..\Include\openssl 43 copy crypto\asn1\asn1_mac.h ..\..\..\Include\openssl 44 copy crypto\asn1\asn1t.h ..\..\..\Include\openssl 45 copy crypto\pem\pem.h ..\..\..\Include\openssl 46 copy crypto\pem\pem2.h ..\..\..\Include\openssl 47 copy crypto\x509\x509.h ..\..\..\Include\openssl 48 copy crypto\x509\x509_vfy.h ..\..\..\Include\openssl 49 copy crypto\x509v3\x509v3.h ..\..\..\Include\openssl 50 copy crypto\conf\conf.h ..\..\..\Include\openssl 51 copy crypto\conf\conf_api.h ..\..\..\Include\openssl 52 copy crypto\txt_db\txt_db.h ..\..\..\Include\openssl 53 copy crypto\pkcs7\pkcs7.h ..\..\..\Include\openssl 54 copy crypto\pkcs12\pkcs12.h ..\..\..\Include\openssl 55 copy crypto\comp\comp.h ..\..\..\Include\openssl 56 copy crypto\engine\engine.h ..\..\..\Include\openssl 57 copy crypto\ocsp\ocsp.h ..\..\..\Include\openssl 58 copy crypto\ui\ui.h ..\..\..\Include\openssl 59 copy crypto\ui\ui_compat.h ..\..\..\Include\openssl 60 copy crypto\krb5\krb5_asn.h ..\..\..\Include\openssl 61 copy crypto\store\store.h ..\..\..\Include\openssl 62 copy crypto\pqueue\pqueue.h ..\..\..\Include\openssl 63 copy crypto\pqueue\pq_compat.h ..\..\..\Include\openssl 64 copy ssl\ssl.h ..\..\..\Include\openssl 65 copy ssl\ssl2.h ..\..\..\Include\openssl 66 copy ssl\ssl3.h ..\..\..\Include\openssl 67 copy ssl\ssl23.h ..\..\..\Include\openssl 68 copy ssl\tls1.h ..\..\..\Include\openssl 69 copy ssl\dtls1.h ..\..\..\Include\openssl 70 copy ssl\kssl.h ..\..\..\Include\openssl 1 cd openssl-1.0.2d 2 copy e_os2.h ..\..\..\Include\openssl 3 copy crypto\crypto.h ..\..\..\Include\openssl 4 copy crypto\opensslv.h ..\..\..\Include\openssl 5 copy crypto\opensslconf.h ..\..\..\Include\openssl 6 copy crypto\ebcdic.h ..\..\..\Include\openssl 7 copy crypto\symhacks.h ..\..\..\Include\openssl 8 copy crypto\ossl_typ.h ..\..\..\Include\openssl 9 copy crypto\objects\objects.h ..\..\..\Include\openssl 10 copy crypto\objects\obj_mac.h ..\..\..\Include\openssl 11 copy crypto\md4\md4.h ..\..\..\Include\openssl 12 copy crypto\md5\md5.h ..\..\..\Include\openssl 13 copy crypto\sha\sha.h ..\..\..\Include\openssl 14 copy crypto\mdc2\mdc2.h ..\..\..\Include\openssl 15 copy crypto\hmac\hmac.h ..\..\..\Include\openssl 16 copy crypto\ripemd\ripemd.h ..\..\..\Include\openssl 17 copy crypto\whrlpool\whrlpool.h ..\..\..\Include\openssl 18 copy crypto\des\des.h ..\..\..\Include\openssl 19 copy crypto\des\des_old.h ..\..\..\Include\openssl 20 copy crypto\aes\aes.h ..\..\..\Include\openssl 21 copy crypto\rc2\rc2.h ..\..\..\Include\openssl 22 copy crypto\rc4\rc4.h ..\..\..\Include\openssl 23 copy crypto\idea\idea.h ..\..\..\Include\openssl 24 copy crypto\bf\blowfish.h ..\..\..\Include\openssl 25 copy crypto\cast\cast.h ..\..\..\Include\openssl 26 copy crypto\camellia\camellia.h ..\..\..\Include\openssl 27 copy crypto\seed\seed.h ..\..\..\Include\openssl 28 copy crypto\modes\modes.h ..\..\..\Include\openssl 29 copy crypto\bn\bn.h ..\..\..\Include\openssl 30 copy crypto\ec\ec.h ..\..\..\Include\openssl 31 copy crypto\rsa\rsa.h ..\..\..\Include\openssl 32 copy crypto\dsa\dsa.h ..\..\..\Include\openssl 33 copy crypto\ecdsa\ecdsa.h ..\..\..\Include\openssl 34 copy crypto\dh\dh.h ..\..\..\Include\openssl 35 copy crypto\ecdh\ecdh.h ..\..\..\Include\openssl 36 copy crypto\dso\dso.h ..\..\..\Include\openssl 37 copy crypto\engine\engine.h ..\..\..\Include\openssl 38 copy crypto\buffer\buffer.h ..\..\..\Include\openssl 39 copy crypto\bio\bio.h ..\..\..\Include\openssl 40 copy crypto\stack\stack.h ..\..\..\Include\openssl 41 copy crypto\stack\safestack.h ..\..\..\Include\openssl 42 copy crypto\lhash\lhash.h ..\..\..\Include\openssl 43 copy crypto\rand\rand.h ..\..\..\Include\openssl 44 copy crypto\err\err.h ..\..\..\Include\openssl 45 copy crypto\evp\evp.h ..\..\..\Include\openssl 46 copy crypto\asn1\asn1.h ..\..\..\Include\openssl 47 copy crypto\asn1\asn1_mac.h ..\..\..\Include\openssl 48 copy crypto\asn1\asn1t.h ..\..\..\Include\openssl 49 copy crypto\pem\pem.h ..\..\..\Include\openssl 50 copy crypto\pem\pem2.h ..\..\..\Include\openssl 51 copy crypto\x509\x509.h ..\..\..\Include\openssl 52 copy crypto\x509\x509_vfy.h ..\..\..\Include\openssl 53 copy crypto\x509v3\x509v3.h ..\..\..\Include\openssl 54 copy crypto\conf\conf.h ..\..\..\Include\openssl 55 copy crypto\conf\conf_api.h ..\..\..\Include\openssl 56 copy crypto\txt_db\txt_db.h ..\..\..\Include\openssl 57 copy crypto\pkcs7\pkcs7.h ..\..\..\Include\openssl 58 copy crypto\pkcs12\pkcs12.h ..\..\..\Include\openssl 59 copy crypto\comp\comp.h ..\..\..\Include\openssl 60 copy crypto\ocsp\ocsp.h ..\..\..\Include\openssl 61 copy crypto\ui\ui.h ..\..\..\Include\openssl 62 copy crypto\ui\ui_compat.h ..\..\..\Include\openssl 63 copy crypto\krb5\krb5_asn.h ..\..\..\Include\openssl 64 copy crypto\cms\cms.h ..\..\..\Include\openssl 65 copy crypto\pqueue\pqueue.h ..\..\..\Include\openssl 66 copy crypto\ts\ts.h ..\..\..\Include\openssl 67 copy crypto\srp\srp.h ..\..\..\Include\openssl 68 copy crypto\cmac\cmac.h ..\..\..\Include\openssl 69 copy ssl\ssl.h ..\..\..\Include\openssl 70 copy ssl\ssl2.h ..\..\..\Include\openssl 71 copy ssl\ssl3.h ..\..\..\Include\openssl 72 copy ssl\ssl23.h ..\..\..\Include\openssl 73 copy ssl\tls1.h ..\..\..\Include\openssl 74 copy ssl\dtls1.h ..\..\..\Include\openssl 75 copy ssl\kssl.h ..\..\..\Include\openssl 76 copy ssl\srtp.h ..\..\..\Include\openssl 71 77 cd .. -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/Install.sh
r48674 r58459 1 1 #!/bin/sh 2 2 3 cd openssl-0.9.8w 4 cp e_os2.h ../../../Include/openssl 5 cp crypto/crypto.h ../../../Include/openssl 6 cp crypto/tmdiff.h ../../../Include/openssl 7 cp crypto/opensslv.h ../../../Include/openssl 8 cp crypto/opensslconf.h ../../../Include/openssl 9 cp crypto/ebcdic.h ../../../Include/openssl 10 cp crypto/symhacks.h ../../../Include/openssl 11 cp crypto/ossl_typ.h ../../../Include/openssl 12 cp crypto/md2/md2.h ../../../Include/openssl 13 cp crypto/md4/md4.h ../../../Include/openssl 14 cp crypto/md5/md5.h ../../../Include/openssl 15 cp crypto/sha/sha.h ../../../Include/openssl 16 cp crypto/hmac/hmac.h ../../../Include/openssl 17 cp crypto/ripemd/ripemd.h ../../../Include/openssl 18 cp crypto/des/des.h ../../../Include/openssl 19 cp crypto/des/des_old.h ../../../Include/openssl 20 cp crypto/rc2/rc2.h ../../../Include/openssl 21 cp crypto/rc4/rc4.h ../../../Include/openssl 22 cp crypto/idea/idea.h ../../../Include/openssl 23 cp crypto/bf/blowfish.h ../../../Include/openssl 24 cp crypto/cast/cast.h ../../../Include/openssl 25 cp crypto/aes/aes.h ../../../Include/openssl 26 cp crypto/bn/bn.h ../../../Include/openssl 27 cp crypto/rsa/rsa.h ../../../Include/openssl 28 cp crypto/dsa/dsa.h ../../../Include/openssl 29 cp crypto/dso/dso.h ../../../Include/openssl 30 cp crypto/dh/dh.h ../../../Include/openssl 31 cp crypto/ec/ec.h ../../../Include/openssl 32 cp crypto/ecdh/ecdh.h ../../../Include/openssl 33 cp crypto/ecdsa/ecdsa.h ../../../Include/openssl 34 cp crypto/buffer/buffer.h ../../../Include/openssl 35 cp crypto/bio/bio.h ../../../Include/openssl 36 cp crypto/stack/stack.h ../../../Include/openssl 37 cp crypto/stack/safestack.h ../../../Include/openssl 38 cp crypto/lhash/lhash.h ../../../Include/openssl 39 cp crypto/rand/rand.h ../../../Include/openssl 40 cp crypto/err/err.h ../../../Include/openssl 41 cp crypto/objects/objects.h ../../../Include/openssl 42 cp crypto/objects/obj_mac.h ../../../Include/openssl 43 cp crypto/evp/evp.h ../../../Include/openssl 44 cp crypto/asn1/asn1.h ../../../Include/openssl 45 cp crypto/asn1/asn1_mac.h ../../../Include/openssl 46 cp crypto/asn1/asn1t.h ../../../Include/openssl 47 cp crypto/pem/pem.h ../../../Include/openssl 48 cp crypto/pem/pem2.h ../../../Include/openssl 49 cp crypto/x509/x509.h ../../../Include/openssl 50 cp crypto/x509/x509_vfy.h ../../../Include/openssl 51 cp crypto/x509v3/x509v3.h ../../../Include/openssl 52 cp crypto/conf/conf.h ../../../Include/openssl 53 cp crypto/conf/conf_api.h ../../../Include/openssl 54 cp crypto/txt_db/txt_db.h ../../../Include/openssl 55 cp crypto/pkcs7/pkcs7.h ../../../Include/openssl 56 cp crypto/pkcs12/pkcs12.h ../../../Include/openssl 57 cp crypto/comp/comp.h ../../../Include/openssl 58 cp crypto/engine/engine.h ../../../Include/openssl 59 cp crypto/ocsp/ocsp.h ../../../Include/openssl 60 cp crypto/ui/ui.h ../../../Include/openssl 61 cp crypto/ui/ui_compat.h ../../../Include/openssl 62 cp crypto/krb5/krb5_asn.h ../../../Include/openssl 63 cp crypto/store/store.h ../../../Include/openssl 64 cp crypto/pqueue/pqueue.h ../../../Include/openssl 65 cp crypto/pqueue/pq_compat.h ../../../Include/openssl 66 cp ssl/ssl.h ../../../Include/openssl 67 cp ssl/ssl2.h ../../../Include/openssl 68 cp ssl/ssl3.h ../../../Include/openssl 69 cp ssl/ssl23.h ../../../Include/openssl 70 cp ssl/tls1.h ../../../Include/openssl 71 cp ssl/dtls1.h ../../../Include/openssl 72 cp ssl/kssl.h ../../../Include/openssl 3 cd openssl-1.0.2d 4 cp e_os2.h ../../../Include/openssl 5 cp crypto/crypto.h ../../../Include/openssl 6 cp crypto/opensslv.h ../../../Include/openssl 7 cp crypto/opensslconf.h ../../../Include/openssl 8 cp crypto/ebcdic.h ../../../Include/openssl 9 cp crypto/symhacks.h ../../../Include/openssl 10 cp crypto/ossl_typ.h ../../../Include/openssl 11 cp crypto/objects/objects.h ../../../Include/openssl 12 cp crypto/objects/obj_mac.h ../../../Include/openssl 13 cp crypto/md4/md4.h ../../../Include/openssl 14 cp crypto/md5/md5.h ../../../Include/openssl 15 cp crypto/sha/sha.h ../../../Include/openssl 16 cp crypto/mdc2/mdc2.h ../../../Include/openssl 17 cp crypto/hmac/hmac.h ../../../Include/openssl 18 cp crypto/ripemd/ripemd.h ../../../Include/openssl 19 cp crypto/whrlpool/whrlpool.h ../../../Include/openssl 20 cp crypto/des/des.h ../../../Include/openssl 21 cp crypto/des/des_old.h ../../../Include/openssl 22 cp crypto/aes/aes.h ../../../Include/openssl 23 cp crypto/rc2/rc2.h ../../../Include/openssl 24 cp crypto/rc4/rc4.h ../../../Include/openssl 25 cp crypto/idea/idea.h ../../../Include/openssl 26 cp crypto/bf/blowfish.h ../../../Include/openssl 27 cp crypto/cast/cast.h ../../../Include/openssl 28 cp crypto/camellia/camellia.h ../../../Include/openssl 29 cp crypto/seed/seed.h ../../../Include/openssl 30 cp crypto/modes/modes.h ../../../Include/openssl 31 cp crypto/bn/bn.h ../../../Include/openssl 32 cp crypto/ec/ec.h ../../../Include/openssl 33 cp crypto/rsa/rsa.h ../../../Include/openssl 34 cp crypto/dsa/dsa.h ../../../Include/openssl 35 cp crypto/ecdsa/ecdsa.h ../../../Include/openssl 36 cp crypto/dh/dh.h ../../../Include/openssl 37 cp crypto/ecdh/ecdh.h ../../../Include/openssl 38 cp crypto/dso/dso.h ../../../Include/openssl 39 cp crypto/engine/engine.h ../../../Include/openssl 40 cp crypto/buffer/buffer.h ../../../Include/openssl 41 cp crypto/bio/bio.h ../../../Include/openssl 42 cp crypto/stack/stack.h ../../../Include/openssl 43 cp crypto/stack/safestack.h ../../../Include/openssl 44 cp crypto/lhash/lhash.h ../../../Include/openssl 45 cp crypto/rand/rand.h ../../../Include/openssl 46 cp crypto/err/err.h ../../../Include/openssl 47 cp crypto/evp/evp.h ../../../Include/openssl 48 cp crypto/asn1/asn1.h ../../../Include/openssl 49 cp crypto/asn1/asn1_mac.h ../../../Include/openssl 50 cp crypto/asn1/asn1t.h ../../../Include/openssl 51 cp crypto/pem/pem.h ../../../Include/openssl 52 cp crypto/pem/pem2.h ../../../Include/openssl 53 cp crypto/x509/x509.h ../../../Include/openssl 54 cp crypto/x509/x509_vfy.h ../../../Include/openssl 55 cp crypto/x509v3/x509v3.h ../../../Include/openssl 56 cp crypto/conf/conf.h ../../../Include/openssl 57 cp crypto/conf/conf_api.h ../../../Include/openssl 58 cp crypto/txt_db/txt_db.h ../../../Include/openssl 59 cp crypto/pkcs7/pkcs7.h ../../../Include/openssl 60 cp crypto/pkcs12/pkcs12.h ../../../Include/openssl 61 cp crypto/comp/comp.h ../../../Include/openssl 62 cp crypto/ocsp/ocsp.h ../../../Include/openssl 63 cp crypto/ui/ui.h ../../../Include/openssl 64 cp crypto/ui/ui_compat.h ../../../Include/openssl 65 cp crypto/krb5/krb5_asn.h ../../../Include/openssl 66 cp crypto/cms/cms.h ../../../Include/openssl 67 cp crypto/pqueue/pqueue.h ../../../Include/openssl 68 cp crypto/ts/ts.h ../../../Include/openssl 69 cp crypto/srp/srp.h ../../../Include/openssl 70 cp crypto/cmac/cmac.h ../../../Include/openssl 71 cp ssl/ssl.h ../../../Include/openssl 72 cp ssl/ssl2.h ../../../Include/openssl 73 cp ssl/ssl3.h ../../../Include/openssl 74 cp ssl/ssl23.h ../../../Include/openssl 75 cp ssl/tls1.h ../../../Include/openssl 76 cp ssl/dtls1.h ../../../Include/openssl 77 cp ssl/kssl.h ../../../Include/openssl 78 cp ssl/srtp.h ../../../Include/openssl 73 79 cd .. -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLib.inf
r48674 r58459 1 1 ## @file 2 # OpenSSL Library implementation.3 # 4 # Copyright (c) 2010 - 201 2, Intel Corporation. All rights reserved.<BR>2 # This module provides openSSL Library implementation. 3 # 4 # Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR> 5 5 # This program and the accompanying materials 6 6 # are licensed and made available under the terms and conditions of the BSD License 7 7 # which accompanies this distribution. The full text of the license may be found at 8 8 # http://opensource.org/licenses/bsd-license.php 9 # 9 # 10 10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 # 12 # 13 13 ## 14 14 … … 16 16 INF_VERSION = 0x00010005 17 17 BASE_NAME = OpensslLib 18 MODULE_UNI_FILE = OpensslLib.uni 18 19 FILE_GUID = C873A7D0-9824-409f-9B42-2C158B992E69 19 20 MODULE_TYPE = BASE 20 21 VERSION_STRING = 1.0 21 22 LIBRARY_CLASS = OpensslLib 22 DEFINE OPENSSL_PATH = openssl- 0.9.8w23 DEFINE OPENSSL_FLAGS = -DOPENSSL_SYSNAME_UWIN -DOPENSSL_SYS_UEFI -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_SEED -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_SOCK -DOPENSSL_NO_CMS -DOPENSSL_NO_JPAKE -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_ERR -DOPENSSL_NO_KRB5 -DOPENSSL_NO_DYNAMIC_ENGINE -DGETPID_IS_MEANINGLESS -DOPENSSL_NO_STDIO -DOPENSSL_NO_ FP_API -DOPENSSL_NO_DGRAM -DOPENSSL_NO_ASM24 DEFINE OPENSSL_EXFLAGS = -DOPENSSL_SMALL_FOOTPRINT -DOPENSSL_NO_SHA0 -DOPENSSL_NO_ SHA512 -DOPENSSL_NO_LHASH -DOPENSSL_NO_HW -DOPENSSL_NO_OCSP -DOPENSSL_NO_LOCKING -DOPENSSL_NO_DEPRECATED25 23 DEFINE OPENSSL_PATH = openssl-1.0.2d 24 DEFINE OPENSSL_FLAGS = -DOPENSSL_SYSNAME_UWIN -DOPENSSL_SYS_UEFI -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_SEED -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_SOCK -DOPENSSL_NO_CMS -DOPENSSL_NO_JPAKE -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_ERR -DOPENSSL_NO_KRB5 -DOPENSSL_NO_DYNAMIC_ENGINE -DGETPID_IS_MEANINGLESS -DOPENSSL_NO_STDIO -DOPENSSL_NO_POSIX_IO -DOPENSSL_NO_FP_API -DOPENSSL_NO_DGRAM -DOPENSSL_NO_ASM 25 DEFINE OPENSSL_EXFLAGS = -DOPENSSL_SMALL_FOOTPRINT -DOPENSSL_NO_SHA0 -DOPENSSL_NO_LHASH -DOPENSSL_NO_HW -DOPENSSL_NO_OCSP -DOPENSSL_NO_LOCKING -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_RIPEMD -DOPENSSL_NO_RC2 -DOPENSSL_NO_IDEA -DOPENSSL_NO_BF -DOPENSSL_NO_CAST -DOPENSSL_NO_WHIRLPOOL -DOPENSSL_NO_DSA -DOPENSSL_NO_EC -DOPENSSL_NO_ECDH -DOPENSSL_NO_ECDSA -DOPENSSL_NO_SRP -DOPENSSL_NO_ENGINE 26 26 27 # 27 # OPENSSL_FLAGS is set to define the following flags to be compatible with 28 # EDK II build system and UEFI executiuon environment 28 # OPENSSL_FLAGS is set to define the following flags to be compatible with 29 # EDK II build system and UEFI executiuon environment 29 30 # 30 31 # OPENSSL_SYSNAME_UWIN 31 # OPENSSL_SYS_UEFI 32 # L_ENDIAN 33 # _CRT_SECURE_NO_DEPRECATE 34 # _CRT_NONSTDC_NO_DEPRECATE 35 # OPENSSL_NO_CAMELLIA 36 # OPENSSL_NO_SEED 37 # OPENSSL_NO_RC5 38 # OPENSSL_NO_MDC2 39 # OPENSSL_NO_SOCK 40 # OPENSSL_NO_CMS 41 # OPENSSL_NO_JPAKE 42 # OPENSSL_NO_CAPIENG 43 # OPENSSL_NO_ERR 44 # OPENSSL_NO_KRB5 45 # OPENSSL_NO_DYNAMIC_ENGINE 46 # GETPID_IS_MEANINGLESS 47 # OPENSSL_NO_STDIO 48 # OPENSSL_NO_FP_API 49 # OPENSSL_NO_DGRAM 32 # OPENSSL_SYS_UEFI 33 # L_ENDIAN 34 # _CRT_SECURE_NO_DEPRECATE 35 # _CRT_NONSTDC_NO_DEPRECATE 36 # OPENSSL_NO_CAMELLIA 37 # OPENSSL_NO_SEED 38 # OPENSSL_NO_RC5 39 # OPENSSL_NO_MDC2 40 # OPENSSL_NO_SOCK 41 # OPENSSL_NO_CMS 42 # OPENSSL_NO_JPAKE 43 # OPENSSL_NO_CAPIENG 44 # OPENSSL_NO_ERR 45 # OPENSSL_NO_KRB5 46 # OPENSSL_NO_DYNAMIC_ENGINE 47 # GETPID_IS_MEANINGLESS 48 # OPENSSL_NO_STDIO 49 # OPENSSL_NO_POSIX_IO 50 # OPENSSL_NO_FP_API 51 # OPENSSL_NO_DGRAM 50 52 # OPENSSL_NO_ASM 51 53 # 52 54 53 55 # 54 # VALID_ARCHITECTURES = IA32 X64 IPF ARM 56 # VALID_ARCHITECTURES = IA32 X64 IPF ARM AARCH64 55 57 # 56 58 … … 58 60 $(OPENSSL_PATH)/e_os.h 59 61 $(OPENSSL_PATH)/crypto/cryptlib.c 60 $(OPENSSL_PATH)/crypto/dyn_lck.c61 62 $(OPENSSL_PATH)/crypto/mem.c 62 63 $(OPENSSL_PATH)/crypto/mem_clr.c … … 64 65 $(OPENSSL_PATH)/crypto/cversion.c 65 66 $(OPENSSL_PATH)/crypto/ex_data.c 66 67 #68 # Not required for UEFI.69 #70 # $(OPENSSL_PATH)/crypto/tmdiff.c71 72 67 $(OPENSSL_PATH)/crypto/cpt_err.c 73 68 $(OPENSSL_PATH)/crypto/ebcdic.c … … 76 71 $(OPENSSL_PATH)/crypto/o_str.c 77 72 $(OPENSSL_PATH)/crypto/o_dir.c 73 $(OPENSSL_PATH)/crypto/o_fips.c 78 74 $(OPENSSL_PATH)/crypto/o_init.c 79 $(OPENSSL_PATH)/crypto/fips_err.c 80 $(OPENSSL_PATH)/crypto/md2/md2_dgst.c 81 $(OPENSSL_PATH)/crypto/md2/md2_one.c 75 $(OPENSSL_PATH)/crypto/fips_ers.c 76 77 # 78 # OBJECTS 79 # 80 $(OPENSSL_PATH)/crypto/objects/o_names.c 81 $(OPENSSL_PATH)/crypto/objects/obj_dat.c 82 $(OPENSSL_PATH)/crypto/objects/obj_lib.c 83 $(OPENSSL_PATH)/crypto/objects/obj_err.c 84 $(OPENSSL_PATH)/crypto/objects/obj_xref.c 85 86 # 87 # MD4 88 # 82 89 $(OPENSSL_PATH)/crypto/md4/md4_dgst.c 83 90 $(OPENSSL_PATH)/crypto/md4/md4_one.c 91 92 # 93 # MD5 94 # 84 95 $(OPENSSL_PATH)/crypto/md5/md5_dgst.c 85 96 $(OPENSSL_PATH)/crypto/md5/md5_one.c 97 98 # 99 # SHA 100 # 86 101 $(OPENSSL_PATH)/crypto/sha/sha_dgst.c 87 102 $(OPENSSL_PATH)/crypto/sha/sha1dgst.c … … 90 105 $(OPENSSL_PATH)/crypto/sha/sha256.c 91 106 $(OPENSSL_PATH)/crypto/sha/sha512.c 107 108 # 109 # MDC2 - Disabled by OPENSSL_NO_MDC2 110 # 111 # $(OPENSSL_PATH)/crypto/mdc2/mdc2dgst.c 112 # $(OPENSSL_PATH)/crypto/mdc2/mdc2_one.c 113 114 # 115 # HMAC 116 # 92 117 $(OPENSSL_PATH)/crypto/hmac/hmac.c 93 $(OPENSSL_PATH)/crypto/ripemd/rmd_dgst.c 94 $(OPENSSL_PATH)/crypto/ripemd/rmd_one.c 95 $(OPENSSL_PATH)/crypto/des/des_lib.c 96 $(OPENSSL_PATH)/crypto/des/set_key.c 118 $(OPENSSL_PATH)/crypto/hmac/hm_ameth.c 119 $(OPENSSL_PATH)/crypto/hmac/hm_pmeth.c 120 121 # 122 # RIPEMD - Disabled by OPENSSL_NO_RIPEMD 123 # 124 # $(OPENSSL_PATH)/crypto/ripemd/rmd_dgst.c 125 # $(OPENSSL_PATH)/crypto/ripemd/rmd_one.c 126 127 # 128 # WHIRLPOOL - Disabled by OPENSSL_NO_WHIRLPOOL 129 # 130 # $(OPENSSL_PATH)/crypto/whrlpool/wp_dgst.c 131 # $(OPENSSL_PATH)/crypto/whrlpool/wp_block.c 132 133 # 134 # DES 135 # 136 $(OPENSSL_PATH)/crypto/des/cbc_cksm.c 137 $(OPENSSL_PATH)/crypto/des/cbc_enc.c 138 $(OPENSSL_PATH)/crypto/des/cfb64enc.c 139 $(OPENSSL_PATH)/crypto/des/cfb_enc.c 140 $(OPENSSL_PATH)/crypto/des/ecb3_enc.c 97 141 $(OPENSSL_PATH)/crypto/des/ecb_enc.c 98 $(OPENSSL_PATH)/crypto/des/cbc_enc.c99 $(OPENSSL_PATH)/crypto/des/ecb3_enc.c100 $(OPENSSL_PATH)/crypto/des/cfb64enc.c101 $(OPENSSL_PATH)/crypto/des/cfb64ede.c102 $(OPENSSL_PATH)/crypto/des/cfb_enc.c103 $(OPENSSL_PATH)/crypto/des/ofb64ede.c104 142 $(OPENSSL_PATH)/crypto/des/enc_read.c 105 143 $(OPENSSL_PATH)/crypto/des/enc_writ.c 144 $(OPENSSL_PATH)/crypto/des/fcrypt.c 106 145 $(OPENSSL_PATH)/crypto/des/ofb64enc.c 107 146 $(OPENSSL_PATH)/crypto/des/ofb_enc.c 108 $(OPENSSL_PATH)/crypto/des/str2key.c109 147 $(OPENSSL_PATH)/crypto/des/pcbc_enc.c 110 148 $(OPENSSL_PATH)/crypto/des/qud_cksm.c 111 149 $(OPENSSL_PATH)/crypto/des/rand_key.c 150 $(OPENSSL_PATH)/crypto/des/rpc_enc.c 151 $(OPENSSL_PATH)/crypto/des/set_key.c 112 152 $(OPENSSL_PATH)/crypto/des/des_enc.c 113 153 $(OPENSSL_PATH)/crypto/des/fcrypt_b.c 114 $(OPENSSL_PATH)/crypto/des/fcrypt.c115 154 $(OPENSSL_PATH)/crypto/des/xcbc_enc.c 116 $(OPENSSL_PATH)/crypto/des/rpc_enc.c 117 $(OPENSSL_PATH)/crypto/des/cbc_cksm.c 155 $(OPENSSL_PATH)/crypto/des/str2key.c 156 $(OPENSSL_PATH)/crypto/des/cfb64ede.c 157 $(OPENSSL_PATH)/crypto/des/ofb64ede.c 118 158 $(OPENSSL_PATH)/crypto/des/ede_cbcm_enc.c 119 159 $(OPENSSL_PATH)/crypto/des/des_old.c 120 160 $(OPENSSL_PATH)/crypto/des/des_old2.c 121 161 $(OPENSSL_PATH)/crypto/des/read2pwd.c 122 $(OPENSSL_PATH)/crypto/rc2/rc2_ecb.c 123 $(OPENSSL_PATH)/crypto/rc2/rc2_skey.c 124 $(OPENSSL_PATH)/crypto/rc2/rc2_cbc.c 125 $(OPENSSL_PATH)/crypto/rc2/rc2cfb64.c 126 $(OPENSSL_PATH)/crypto/rc2/rc2ofb64.c 127 $(OPENSSL_PATH)/crypto/rc4/rc4_enc.c 128 $(OPENSSL_PATH)/crypto/rc4/rc4_skey.c 129 $(OPENSSL_PATH)/crypto/rc4/rc4_fblk.c 130 $(OPENSSL_PATH)/crypto/idea/i_cbc.c 131 $(OPENSSL_PATH)/crypto/idea/i_cfb64.c 132 $(OPENSSL_PATH)/crypto/idea/i_ofb64.c 133 $(OPENSSL_PATH)/crypto/idea/i_ecb.c 134 $(OPENSSL_PATH)/crypto/idea/i_skey.c 135 $(OPENSSL_PATH)/crypto/bf/bf_skey.c 136 $(OPENSSL_PATH)/crypto/bf/bf_ecb.c 137 $(OPENSSL_PATH)/crypto/bf/bf_enc.c 138 $(OPENSSL_PATH)/crypto/bf/bf_cfb64.c 139 $(OPENSSL_PATH)/crypto/bf/bf_ofb64.c 140 $(OPENSSL_PATH)/crypto/cast/c_skey.c 141 $(OPENSSL_PATH)/crypto/cast/c_ecb.c 142 $(OPENSSL_PATH)/crypto/cast/c_enc.c 143 $(OPENSSL_PATH)/crypto/cast/c_cfb64.c 144 $(OPENSSL_PATH)/crypto/cast/c_ofb64.c 162 163 # 164 # AES 165 # 166 $(OPENSSL_PATH)/crypto/aes/aes_core.c 145 167 $(OPENSSL_PATH)/crypto/aes/aes_misc.c 146 168 $(OPENSSL_PATH)/crypto/aes/aes_ecb.c 169 $(OPENSSL_PATH)/crypto/aes/aes_cbc.c 147 170 $(OPENSSL_PATH)/crypto/aes/aes_cfb.c 148 171 $(OPENSSL_PATH)/crypto/aes/aes_ofb.c … … 150 173 $(OPENSSL_PATH)/crypto/aes/aes_ige.c 151 174 $(OPENSSL_PATH)/crypto/aes/aes_wrap.c 152 $(OPENSSL_PATH)/crypto/aes/aes_core.c 153 $(OPENSSL_PATH)/crypto/aes/aes_cbc.c 175 176 # 177 # RC2 - Disabled by OPENSSL_NO_RC2 178 # 179 # $(OPENSSL_PATH)/crypto/rc2/rc2_ecb.c 180 # $(OPENSSL_PATH)/crypto/rc2/rc2_skey.c 181 # $(OPENSSL_PATH)/crypto/rc2/rc2_cbc.c 182 # $(OPENSSL_PATH)/crypto/rc2/rc2cfb64.c 183 # $(OPENSSL_PATH)/crypto/rc2/rc2ofb64.c 184 185 # 186 # RC4 187 # 188 $(OPENSSL_PATH)/crypto/rc4/rc4_skey.c 189 $(OPENSSL_PATH)/crypto/rc4/rc4_enc.c 190 $(OPENSSL_PATH)/crypto/rc4/rc4_utl.c 191 192 # 193 # RC5 - Disabled by OPENSSL_NO_RC5 194 # 195 # $(OPENSSL_PATH)/crypto/rc5/rc5_skey.c 196 # $(OPENSSL_PATH)/crypto/rc5/rc5_ecb.c 197 # $(OPENSSL_PATH)/crypto/rc5/rc5_enc.c 198 # $(OPENSSL_PATH)/crypto/rc5/rc5cfb64.c 199 # $(OPENSSL_PATH)/crypto/rc5/rc5ofb64.c 200 201 # 202 # IDEA - Disabled by OPENSSL_NO_IDEA 203 # 204 # $(OPENSSL_PATH)/crypto/idea/i_cbc.c 205 # $(OPENSSL_PATH)/crypto/idea/i_cfb64.c 206 # $(OPENSSL_PATH)/crypto/idea/i_ofb64.c 207 # $(OPENSSL_PATH)/crypto/idea/i_ecb.c 208 # $(OPENSSL_PATH)/crypto/idea/i_skey.c 209 210 # 211 # BLOWFISH - Disabled by OPENSSL_NO_BF 212 # 213 # $(OPENSSL_PATH)/crypto/bf/bf_skey.c 214 # $(OPENSSL_PATH)/crypto/bf/bf_ecb.c 215 # $(OPENSSL_PATH)/crypto/bf/bf_enc.c 216 # $(OPENSSL_PATH)/crypto/bf/bf_cfb64.c 217 # $(OPENSSL_PATH)/crypto/bf/bf_ofb64.c 218 219 # 220 # CAST - Disabled by OPENSSL_NO_CAST 221 # 222 # $(OPENSSL_PATH)/crypto/cast/c_skey.c 223 # $(OPENSSL_PATH)/crypto/cast/c_ecb.c 224 # $(OPENSSL_PATH)/crypto/cast/c_enc.c 225 # $(OPENSSL_PATH)/crypto/cast/c_cfb64.c 226 # $(OPENSSL_PATH)/crypto/cast/c_ofb64.c 227 228 # 229 # CAMELLIA - Disabled by OPENSSL_NO_CAMELLIA 230 # 231 # $(OPENSSL_PATH)/crypto/camellia/camellia.c 232 # $(OPENSSL_PATH)/crypto/camellia/cmll_misc.c 233 # $(OPENSSL_PATH)/crypto/camellia/cmll_ecb.c 234 # $(OPENSSL_PATH)/crypto/camellia/cmll_cbc.c 235 # $(OPENSSL_PATH)/crypto/camellia/cmll_ofb.c 236 # $(OPENSSL_PATH)/crypto/camellia/cmll_cfb.c 237 # $(OPENSSL_PATH)/crypto/camellia/cmll_ctr.c 238 # $(OPENSSL_PATH)/crypto/camellia/cmll_utl.c 239 240 # 241 # SEED - Disabled by OPENSSL_NO_SEED 242 # 243 # $(OPENSSL_PATH)/crypto/seed/seed.c 244 # $(OPENSSL_PATH)/crypto/seed/seed_ecb.c 245 # $(OPENSSL_PATH)/crypto/seed/seed_cbc.c 246 # $(OPENSSL_PATH)/crypto/seed/seed_cfb.c 247 # $(OPENSSL_PATH)/crypto/seed/seed_ofb.c 248 249 # 250 # MODES 251 # 252 $(OPENSSL_PATH)/crypto/modes/cbc128.c 253 $(OPENSSL_PATH)/crypto/modes/ctr128.c 254 $(OPENSSL_PATH)/crypto/modes/cts128.c 255 $(OPENSSL_PATH)/crypto/modes/cfb128.c 256 $(OPENSSL_PATH)/crypto/modes/ofb128.c 257 $(OPENSSL_PATH)/crypto/modes/gcm128.c 258 $(OPENSSL_PATH)/crypto/modes/ccm128.c 259 $(OPENSSL_PATH)/crypto/modes/xts128.c 260 $(OPENSSL_PATH)/crypto/modes/wrap128.c 261 262 # 263 # BIGNUM 264 # 154 265 $(OPENSSL_PATH)/crypto/bn/bn_add.c 155 266 $(OPENSSL_PATH)/crypto/bn/bn_div.c … … 178 289 $(OPENSSL_PATH)/crypto/bn/bn_nist.c 179 290 $(OPENSSL_PATH)/crypto/bn/bn_depr.c 291 $(OPENSSL_PATH)/crypto/bn/bn_const.c 180 292 $(OPENSSL_PATH)/crypto/bn/bn_x931p.c 181 $(OPENSSL_PATH)/crypto/bn/bn_const.c 182 $(OPENSSL_PATH)/crypto/bn/bn_opt.c 293 294 # 295 # ELLIPTIC CURVE - Disabled by OPENSSL_NO_EC 296 # 297 # $(OPENSSL_PATH)/crypto/ec/ec_lib.c 298 # $(OPENSSL_PATH)/crypto/ec/ecp_smpl.c 299 # $(OPENSSL_PATH)/crypto/ec/ecp_mont.c 300 # $(OPENSSL_PATH)/crypto/ec/ecp_nist.c 301 # $(OPENSSL_PATH)/crypto/ec/ec_cvt.c 302 # $(OPENSSL_PATH)/crypto/ec/ec_mult.c 303 # $(OPENSSL_PATH)/crypto/ec/ec_err.c 304 # $(OPENSSL_PATH)/crypto/ec/ec_curve.c 305 # $(OPENSSL_PATH)/crypto/ec/ec_check.c 306 # $(OPENSSL_PATH)/crypto/ec/ec_print.c 307 # $(OPENSSL_PATH)/crypto/ec/ec_asn1.c 308 # $(OPENSSL_PATH)/crypto/ec/ec_key.c 309 # $(OPENSSL_PATH)/crypto/ec/ec2_smpl.c 310 # $(OPENSSL_PATH)/crypto/ec/ec2_mult.c 311 # $(OPENSSL_PATH)/crypto/ec/ec_ameth.c 312 # $(OPENSSL_PATH)/crypto/ec/ec_pmeth.c 313 # $(OPENSSL_PATH)/crypto/ec/eck_prn.c 314 # $(OPENSSL_PATH)/crypto/ec/ecp_nistp224.c 315 # $(OPENSSL_PATH)/crypto/ec/ecp_nistp256.c 316 # $(OPENSSL_PATH)/crypto/ec/ecp_nistp521.c 317 # $(OPENSSL_PATH)/crypto/ec/ecp_nistputil.c 318 # $(OPENSSL_PATH)/crypto/ec/ecp_oct.c 319 # $(OPENSSL_PATH)/crypto/ec/ec2_oct.c 320 # $(OPENSSL_PATH)/crypto/ec/ec_oct.c 321 322 # 323 # RSA 324 # 183 325 $(OPENSSL_PATH)/crypto/rsa/rsa_eay.c 184 326 $(OPENSSL_PATH)/crypto/rsa/rsa_gen.c … … 195 337 $(OPENSSL_PATH)/crypto/rsa/rsa_pss.c 196 338 $(OPENSSL_PATH)/crypto/rsa/rsa_x931.c 197 $(OPENSSL_PATH)/crypto/rsa/rsa_x931g.c198 339 $(OPENSSL_PATH)/crypto/rsa/rsa_asn1.c 199 340 $(OPENSSL_PATH)/crypto/rsa/rsa_depr.c 200 $(OPENSSL_PATH)/crypto/rsa/rsa_eng.c 201 $(OPENSSL_PATH)/crypto/dsa/dsa_gen.c 202 $(OPENSSL_PATH)/crypto/dsa/dsa_key.c 203 $(OPENSSL_PATH)/crypto/dsa/dsa_lib.c 204 $(OPENSSL_PATH)/crypto/dsa/dsa_asn1.c 205 $(OPENSSL_PATH)/crypto/dsa/dsa_vrf.c 206 $(OPENSSL_PATH)/crypto/dsa/dsa_sign.c 207 $(OPENSSL_PATH)/crypto/dsa/dsa_err.c 208 $(OPENSSL_PATH)/crypto/dsa/dsa_ossl.c 209 $(OPENSSL_PATH)/crypto/dsa/dsa_depr.c 210 $(OPENSSL_PATH)/crypto/dsa/dsa_utl.c 341 $(OPENSSL_PATH)/crypto/rsa/rsa_ameth.c 342 $(OPENSSL_PATH)/crypto/rsa/rsa_prn.c 343 $(OPENSSL_PATH)/crypto/rsa/rsa_pmeth.c 344 $(OPENSSL_PATH)/crypto/rsa/rsa_crpt.c 345 346 # 347 # DSA - Disabled by OPENSSL_NO_DSA 348 # 349 # $(OPENSSL_PATH)/crypto/dsa/dsa_gen.c 350 # $(OPENSSL_PATH)/crypto/dsa/dsa_key.c 351 # $(OPENSSL_PATH)/crypto/dsa/dsa_lib.c 352 # $(OPENSSL_PATH)/crypto/dsa/dsa_asn1.c 353 # $(OPENSSL_PATH)/crypto/dsa/dsa_vrf.c 354 # $(OPENSSL_PATH)/crypto/dsa/dsa_sign.c 355 # $(OPENSSL_PATH)/crypto/dsa/dsa_err.c 356 # $(OPENSSL_PATH)/crypto/dsa/dsa_ossl.c 357 # $(OPENSSL_PATH)/crypto/dsa/dsa_depr.c 358 # $(OPENSSL_PATH)/crypto/dsa/dsa_ameth.c 359 # $(OPENSSL_PATH)/crypto/dsa/dsa_pmeth.c 360 # $(OPENSSL_PATH)/crypto/dsa/dsa_prn.c 361 362 # 363 # ECDSA - Disabled by OPENSSL_NO_ECDSA 364 # 365 # $(OPENSSL_PATH)/crypto/ecdsa/ecs_lib.c 366 # $(OPENSSL_PATH)/crypto/ecdsa/ecs_asn1.c 367 # $(OPENSSL_PATH)/crypto/ecdsa/ecs_ossl.c 368 # $(OPENSSL_PATH)/crypto/ecdsa/ecs_sign.c 369 # $(OPENSSL_PATH)/crypto/ecdsa/ecs_vrf.c 370 # $(OPENSSL_PATH)/crypto/ecdsa/ecs_err.c 371 372 # 373 # DIFFIE-HELLMAN 374 # 375 $(OPENSSL_PATH)/crypto/dh/dh_asn1.c 376 $(OPENSSL_PATH)/crypto/dh/dh_gen.c 377 $(OPENSSL_PATH)/crypto/dh/dh_key.c 378 $(OPENSSL_PATH)/crypto/dh/dh_lib.c 379 $(OPENSSL_PATH)/crypto/dh/dh_check.c 380 $(OPENSSL_PATH)/crypto/dh/dh_err.c 381 $(OPENSSL_PATH)/crypto/dh/dh_depr.c 382 $(OPENSSL_PATH)/crypto/dh/dh_ameth.c 383 $(OPENSSL_PATH)/crypto/dh/dh_pmeth.c 384 $(OPENSSL_PATH)/crypto/dh/dh_prn.c 385 $(OPENSSL_PATH)/crypto/dh/dh_rfc5114.c 386 # $(OPENSSL_PATH)/crypto/dh/dh_kdf.c 387 388 # 389 # ECDH - Disabled by OPENSSL_NO_ECDH 390 # 391 # $(OPENSSL_PATH)/crypto/ecdh/ech_lib.c 392 # $(OPENSSL_PATH)/crypto/ecdh/ech_ossl.c 393 # $(OPENSSL_PATH)/crypto/ecdh/ech_key.c 394 # $(OPENSSL_PATH)/crypto/ecdh/ech_err.c 395 # $(OPENSSL_PATH)/crypto/ecdh/ech_kdf.c 396 397 # 398 # DSO 399 # 211 400 $(OPENSSL_PATH)/crypto/dso/dso_dl.c 212 401 $(OPENSSL_PATH)/crypto/dso/dso_dlfcn.c … … 217 406 $(OPENSSL_PATH)/crypto/dso/dso_win32.c 218 407 $(OPENSSL_PATH)/crypto/dso/dso_vms.c 219 $(OPENSSL_PATH)/crypto/dh/dh_asn1.c 220 $(OPENSSL_PATH)/crypto/dh/dh_gen.c 221 $(OPENSSL_PATH)/crypto/dh/dh_key.c 222 $(OPENSSL_PATH)/crypto/dh/dh_lib.c 223 $(OPENSSL_PATH)/crypto/dh/dh_check.c 224 $(OPENSSL_PATH)/crypto/dh/dh_err.c 225 $(OPENSSL_PATH)/crypto/dh/dh_depr.c 226 $(OPENSSL_PATH)/crypto/ec/ec_lib.c 227 $(OPENSSL_PATH)/crypto/ec/ecp_smpl.c 228 $(OPENSSL_PATH)/crypto/ec/ecp_mont.c 229 $(OPENSSL_PATH)/crypto/ec/ecp_nist.c 230 $(OPENSSL_PATH)/crypto/ec/ec_cvt.c 231 $(OPENSSL_PATH)/crypto/ec/ec_mult.c 232 $(OPENSSL_PATH)/crypto/ec/ec_err.c 233 $(OPENSSL_PATH)/crypto/ec/ec_curve.c 234 $(OPENSSL_PATH)/crypto/ec/ec_check.c 235 $(OPENSSL_PATH)/crypto/ec/ec_print.c 236 $(OPENSSL_PATH)/crypto/ec/ec_asn1.c 237 $(OPENSSL_PATH)/crypto/ec/ec_key.c 238 $(OPENSSL_PATH)/crypto/ec/ec2_smpl.c 239 $(OPENSSL_PATH)/crypto/ec/ec2_mult.c 240 $(OPENSSL_PATH)/crypto/ecdh/ech_lib.c 241 $(OPENSSL_PATH)/crypto/ecdh/ech_ossl.c 242 $(OPENSSL_PATH)/crypto/ecdh/ech_key.c 243 $(OPENSSL_PATH)/crypto/ecdh/ech_err.c 244 $(OPENSSL_PATH)/crypto/ecdsa/ecs_lib.c 245 $(OPENSSL_PATH)/crypto/ecdsa/ecs_asn1.c 246 $(OPENSSL_PATH)/crypto/ecdsa/ecs_ossl.c 247 $(OPENSSL_PATH)/crypto/ecdsa/ecs_sign.c 248 $(OPENSSL_PATH)/crypto/ecdsa/ecs_vrf.c 249 $(OPENSSL_PATH)/crypto/ecdsa/ecs_err.c 408 $(OPENSSL_PATH)/crypto/dso/dso_beos.c 409 410 # 411 # ENGINE - Disabled by OPENSSL_NO_ENGINE 412 # 413 # $(OPENSSL_PATH)/crypto/engine/eng_err.c 414 # $(OPENSSL_PATH)/crypto/engine/eng_lib.c 415 # $(OPENSSL_PATH)/crypto/engine/eng_list.c 416 # $(OPENSSL_PATH)/crypto/engine/eng_init.c 417 # $(OPENSSL_PATH)/crypto/engine/eng_ctrl.c 418 # $(OPENSSL_PATH)/crypto/engine/eng_table.c 419 # $(OPENSSL_PATH)/crypto/engine/eng_pkey.c 420 # $(OPENSSL_PATH)/crypto/engine/eng_fat.c 421 # $(OPENSSL_PATH)/crypto/engine/eng_all.c 422 # $(OPENSSL_PATH)/crypto/engine/tb_rsa.c 423 # $(OPENSSL_PATH)/crypto/engine/tb_dsa.c 424 # $(OPENSSL_PATH)/crypto/engine/tb_ecdsa.c 425 # $(OPENSSL_PATH)/crypto/engine/tb_dh.c 426 # $(OPENSSL_PATH)/crypto/engine/tb_ecdh.c 427 # $(OPENSSL_PATH)/crypto/engine/tb_rand.c 428 # $(OPENSSL_PATH)/crypto/engine/tb_store.c 429 # $(OPENSSL_PATH)/crypto/engine/tb_cipher.c 430 # $(OPENSSL_PATH)/crypto/engine/tb_digest.c 431 # $(OPENSSL_PATH)/crypto/engine/tb_pkmeth.c 432 # $(OPENSSL_PATH)/crypto/engine/tb_asnmth.c 433 # $(OPENSSL_PATH)/crypto/engine/eng_openssl.c 434 # $(OPENSSL_PATH)/crypto/engine/eng_cnf.c 435 # $(OPENSSL_PATH)/crypto/engine/eng_dyn.c 436 # $(OPENSSL_PATH)/crypto/engine/eng_cryptodev.c 437 # $(OPENSSL_PATH)/crypto/engine/eng_rdrand.c 438 439 # 440 # BUFFER 441 # 250 442 $(OPENSSL_PATH)/crypto/buffer/buffer.c 251 443 $(OPENSSL_PATH)/crypto/buffer/buf_str.c 252 444 $(OPENSSL_PATH)/crypto/buffer/buf_err.c 445 446 # 447 # BIO 448 # 253 449 $(OPENSSL_PATH)/crypto/bio/bio_lib.c 254 450 $(OPENSSL_PATH)/crypto/bio/bio_cb.c … … 258 454 $(OPENSSL_PATH)/crypto/bio/bss_fd.c 259 455 $(OPENSSL_PATH)/crypto/bio/bss_file.c 456 $(OPENSSL_PATH)/crypto/bio/bss_sock.c 457 $(OPENSSL_PATH)/crypto/bio/bss_conn.c 260 458 $(OPENSSL_PATH)/crypto/bio/bf_null.c 261 459 $(OPENSSL_PATH)/crypto/bio/bf_buff.c 262 263 # 264 # Not required for UEFI. 460 # 461 # Not Required by UEFI. 265 462 # 266 463 # $(OPENSSL_PATH)/crypto/bio/b_print.c 267 268 464 $(OPENSSL_PATH)/crypto/bio/b_dump.c 465 $(OPENSSL_PATH)/crypto/bio/b_sock.c 466 $(OPENSSL_PATH)/crypto/bio/bss_acpt.c 269 467 $(OPENSSL_PATH)/crypto/bio/bf_nbio.c 270 468 $(OPENSSL_PATH)/crypto/bio/bss_log.c 271 469 $(OPENSSL_PATH)/crypto/bio/bss_bio.c 272 470 $(OPENSSL_PATH)/crypto/bio/bss_dgram.c 471 472 # 473 # STACK 474 # 273 475 $(OPENSSL_PATH)/crypto/stack/stack.c 476 477 # 478 # LHASH 479 # 274 480 $(OPENSSL_PATH)/crypto/lhash/lhash.c 275 481 $(OPENSSL_PATH)/crypto/lhash/lh_stats.c 482 483 # 484 # RAND 485 # 276 486 $(OPENSSL_PATH)/crypto/rand/md_rand.c 277 487 $(OPENSSL_PATH)/crypto/rand/randfile.c 278 488 $(OPENSSL_PATH)/crypto/rand/rand_lib.c 279 $(OPENSSL_PATH)/crypto/rand/rand_eng.c280 489 $(OPENSSL_PATH)/crypto/rand/rand_err.c 281 $(OPENSSL_PATH)/crypto/rand/rand_egd.c282 $(OPENSSL_PATH)/crypto/rand/rand_win.c490 # $(OPENSSL_PATH)/crypto/rand/rand_egd.c 491 # $(OPENSSL_PATH)/crypto/rand/rand_win.c 283 492 $(OPENSSL_PATH)/crypto/rand/rand_unix.c 284 $(OPENSSL_PATH)/crypto/rand/rand_os2.c 285 $(OPENSSL_PATH)/crypto/rand/rand_nw.c 493 # $(OPENSSL_PATH)/crypto/rand/rand_os2.c 494 # $(OPENSSL_PATH)/crypto/rand/rand_nw.c 495 496 # 497 # ERR 498 # 286 499 $(OPENSSL_PATH)/crypto/err/err.c 287 $(OPENSSL_PATH)/crypto/err/err_def.c288 500 $(OPENSSL_PATH)/crypto/err/err_all.c 289 501 $(OPENSSL_PATH)/crypto/err/err_prn.c 290 $(OPENSSL_PATH)/crypto/err/err_str.c 291 $(OPENSSL_PATH)/crypto/err/err_bio.c 292 $(OPENSSL_PATH)/crypto/objects/o_names.c 293 $(OPENSSL_PATH)/crypto/objects/obj_dat.c 294 $(OPENSSL_PATH)/crypto/objects/obj_lib.c 295 $(OPENSSL_PATH)/crypto/objects/obj_err.c 502 503 # 504 # EVP 505 # 296 506 $(OPENSSL_PATH)/crypto/evp/encode.c 297 507 $(OPENSSL_PATH)/crypto/evp/digest.c 298 $(OPENSSL_PATH)/crypto/evp/dig_eng.c299 508 $(OPENSSL_PATH)/crypto/evp/evp_enc.c 300 509 $(OPENSSL_PATH)/crypto/evp/evp_key.c … … 305 514 $(OPENSSL_PATH)/crypto/evp/e_idea.c 306 515 $(OPENSSL_PATH)/crypto/evp/e_des3.c 516 $(OPENSSL_PATH)/crypto/evp/e_camellia.c 307 517 $(OPENSSL_PATH)/crypto/evp/e_rc4.c 308 518 $(OPENSSL_PATH)/crypto/evp/e_aes.c 309 519 $(OPENSSL_PATH)/crypto/evp/names.c 520 $(OPENSSL_PATH)/crypto/evp/e_seed.c 310 521 $(OPENSSL_PATH)/crypto/evp/e_xcbc_d.c 311 522 $(OPENSSL_PATH)/crypto/evp/e_rc2.c 312 523 $(OPENSSL_PATH)/crypto/evp/e_cast.c 313 524 $(OPENSSL_PATH)/crypto/evp/e_rc5.c 314 $(OPENSSL_PATH)/crypto/evp/enc_min.c315 525 $(OPENSSL_PATH)/crypto/evp/m_null.c 316 526 $(OPENSSL_PATH)/crypto/evp/m_md2.c … … 319 529 $(OPENSSL_PATH)/crypto/evp/m_sha.c 320 530 $(OPENSSL_PATH)/crypto/evp/m_sha1.c 531 $(OPENSSL_PATH)/crypto/evp/m_wp.c 321 532 $(OPENSSL_PATH)/crypto/evp/m_dss.c 322 533 $(OPENSSL_PATH)/crypto/evp/m_dss1.c 534 $(OPENSSL_PATH)/crypto/evp/m_mdc2.c 323 535 $(OPENSSL_PATH)/crypto/evp/m_ripemd.c 324 536 $(OPENSSL_PATH)/crypto/evp/m_ecdsa.c … … 345 557 $(OPENSSL_PATH)/crypto/evp/p5_crpt2.c 346 558 $(OPENSSL_PATH)/crypto/evp/e_old.c 559 $(OPENSSL_PATH)/crypto/evp/pmeth_lib.c 560 $(OPENSSL_PATH)/crypto/evp/pmeth_fn.c 561 $(OPENSSL_PATH)/crypto/evp/pmeth_gn.c 562 $(OPENSSL_PATH)/crypto/evp/m_sigver.c 563 $(OPENSSL_PATH)/crypto/evp/e_aes_cbc_hmac_sha1.c 564 $(OPENSSL_PATH)/crypto/evp/e_aes_cbc_hmac_sha256.c 565 $(OPENSSL_PATH)/crypto/evp/e_rc4_hmac_md5.c 566 567 # 568 # ASN1 569 # 347 570 $(OPENSSL_PATH)/crypto/asn1/a_object.c 348 571 $(OPENSSL_PATH)/crypto/asn1/a_bitstr.c … … 380 603 $(OPENSSL_PATH)/crypto/asn1/x_spki.c 381 604 $(OPENSSL_PATH)/crypto/asn1/nsseq.c 605 $(OPENSSL_PATH)/crypto/asn1/x_nx509.c 382 606 $(OPENSSL_PATH)/crypto/asn1/d2i_pu.c 383 607 $(OPENSSL_PATH)/crypto/asn1/d2i_pr.c … … 397 621 $(OPENSSL_PATH)/crypto/asn1/tasn_utl.c 398 622 $(OPENSSL_PATH)/crypto/asn1/tasn_typ.c 623 $(OPENSSL_PATH)/crypto/asn1/tasn_prn.c 624 $(OPENSSL_PATH)/crypto/asn1/ameth_lib.c 399 625 $(OPENSSL_PATH)/crypto/asn1/f_int.c 400 626 $(OPENSSL_PATH)/crypto/asn1/f_string.c 401 627 $(OPENSSL_PATH)/crypto/asn1/n_pkey.c 402 628 $(OPENSSL_PATH)/crypto/asn1/f_enum.c 403 $(OPENSSL_PATH)/crypto/asn1/a_hdr.c404 629 $(OPENSSL_PATH)/crypto/asn1/x_pkey.c 405 630 $(OPENSSL_PATH)/crypto/asn1/a_bool.c 406 631 $(OPENSSL_PATH)/crypto/asn1/x_exten.c 632 $(OPENSSL_PATH)/crypto/asn1/bio_asn1.c 633 $(OPENSSL_PATH)/crypto/asn1/bio_ndef.c 407 634 $(OPENSSL_PATH)/crypto/asn1/asn_mime.c 408 635 $(OPENSSL_PATH)/crypto/asn1/asn1_gen.c … … 410 637 $(OPENSSL_PATH)/crypto/asn1/asn1_lib.c 411 638 $(OPENSSL_PATH)/crypto/asn1/asn1_err.c 412 $(OPENSSL_PATH)/crypto/asn1/a_meth.c413 639 $(OPENSSL_PATH)/crypto/asn1/a_bytes.c 414 640 $(OPENSSL_PATH)/crypto/asn1/a_strnid.c … … 419 645 $(OPENSSL_PATH)/crypto/asn1/p8_pkey.c 420 646 $(OPENSSL_PATH)/crypto/asn1/asn_moid.c 647 648 # 649 # PEM 650 # 421 651 $(OPENSSL_PATH)/crypto/pem/pem_sign.c 422 652 $(OPENSSL_PATH)/crypto/pem/pem_seal.c … … 430 660 $(OPENSSL_PATH)/crypto/pem/pem_pk8.c 431 661 $(OPENSSL_PATH)/crypto/pem/pem_pkey.c 662 $(OPENSSL_PATH)/crypto/pem/pvkfmt.c 663 664 # 665 # X509 666 # 432 667 $(OPENSSL_PATH)/crypto/x509/x509_def.c 433 668 $(OPENSSL_PATH)/crypto/x509/x509_d2.c … … 451 686 $(OPENSSL_PATH)/crypto/x509/x509_txt.c 452 687 $(OPENSSL_PATH)/crypto/x509/x509_trs.c 453 $(OPENSSL_PATH)/crypto/x509/by_file.c 454 $(OPENSSL_PATH)/crypto/x509/by_dir.c 688 # 689 # Not Required by UEFI. 690 # 691 # $(OPENSSL_PATH)/crypto/x509/by_file.c 692 # $(OPENSSL_PATH)/crypto/x509/by_dir.c 455 693 $(OPENSSL_PATH)/crypto/x509/x509_vpm.c 694 695 # 696 # X509v3 697 # 456 698 $(OPENSSL_PATH)/crypto/x509v3/v3_bcons.c 457 699 $(OPENSSL_PATH)/crypto/x509v3/v3_bitst.c … … 490 732 $(OPENSSL_PATH)/crypto/x509v3/v3_asid.c 491 733 $(OPENSSL_PATH)/crypto/x509v3/v3_addr.c 734 # 735 # Not Required by UEFI. 736 # 737 # $(OPENSSL_PATH)/crypto/x509v3/v3_scts.c 738 739 # 740 # CONF 741 # 492 742 $(OPENSSL_PATH)/crypto/conf/conf_err.c 493 743 $(OPENSSL_PATH)/crypto/conf/conf_lib.c … … 497 747 $(OPENSSL_PATH)/crypto/conf/conf_mall.c 498 748 $(OPENSSL_PATH)/crypto/conf/conf_sap.c 749 750 # 751 # TXT_DB 752 # 499 753 $(OPENSSL_PATH)/crypto/txt_db/txt_db.c 754 755 # 756 # PKCS7 757 # 500 758 $(OPENSSL_PATH)/crypto/pkcs7/pk7_asn1.c 501 759 $(OPENSSL_PATH)/crypto/pkcs7/pk7_lib.c … … 505 763 $(OPENSSL_PATH)/crypto/pkcs7/pk7_attr.c 506 764 $(OPENSSL_PATH)/crypto/pkcs7/pk7_mime.c 765 $(OPENSSL_PATH)/crypto/pkcs7/bio_pk7.c 766 767 # 768 # PKCS12 769 # 507 770 $(OPENSSL_PATH)/crypto/pkcs12/p12_add.c 508 771 $(OPENSSL_PATH)/crypto/pkcs12/p12_asn.c … … 520 783 $(OPENSSL_PATH)/crypto/pkcs12/p12_p8d.c 521 784 $(OPENSSL_PATH)/crypto/pkcs12/p12_p8e.c 785 786 # 787 # COMP 788 # 522 789 $(OPENSSL_PATH)/crypto/comp/comp_lib.c 523 790 $(OPENSSL_PATH)/crypto/comp/comp_err.c 524 791 $(OPENSSL_PATH)/crypto/comp/c_rle.c 525 792 $(OPENSSL_PATH)/crypto/comp/c_zlib.c 526 $(OPENSSL_PATH)/crypto/engine/eng_err.c 527 $(OPENSSL_PATH)/crypto/engine/eng_lib.c 528 $(OPENSSL_PATH)/crypto/engine/eng_list.c 529 $(OPENSSL_PATH)/crypto/engine/eng_init.c 530 $(OPENSSL_PATH)/crypto/engine/eng_ctrl.c 531 $(OPENSSL_PATH)/crypto/engine/eng_table.c 532 $(OPENSSL_PATH)/crypto/engine/eng_pkey.c 533 $(OPENSSL_PATH)/crypto/engine/eng_fat.c 534 $(OPENSSL_PATH)/crypto/engine/eng_all.c 535 $(OPENSSL_PATH)/crypto/engine/tb_rsa.c 536 $(OPENSSL_PATH)/crypto/engine/tb_dsa.c 537 $(OPENSSL_PATH)/crypto/engine/tb_ecdsa.c 538 $(OPENSSL_PATH)/crypto/engine/tb_dh.c 539 $(OPENSSL_PATH)/crypto/engine/tb_ecdh.c 540 $(OPENSSL_PATH)/crypto/engine/tb_rand.c 541 $(OPENSSL_PATH)/crypto/engine/tb_store.c 542 $(OPENSSL_PATH)/crypto/engine/tb_cipher.c 543 $(OPENSSL_PATH)/crypto/engine/tb_digest.c 544 $(OPENSSL_PATH)/crypto/engine/eng_openssl.c 545 $(OPENSSL_PATH)/crypto/engine/eng_cnf.c 546 $(OPENSSL_PATH)/crypto/engine/eng_dyn.c 547 $(OPENSSL_PATH)/crypto/engine/eng_cryptodev.c 548 $(OPENSSL_PATH)/crypto/engine/eng_padlock.c 793 794 # 795 # OCSP - Disabled by OPENSSL_NO_OCSP 796 # 549 797 $(OPENSSL_PATH)/crypto/ocsp/ocsp_asn.c 550 798 $(OPENSSL_PATH)/crypto/ocsp/ocsp_ext.c … … 556 804 $(OPENSSL_PATH)/crypto/ocsp/ocsp_vfy.c 557 805 $(OPENSSL_PATH)/crypto/ocsp/ocsp_err.c 558 $(OPENSSL_PATH)/crypto/ui/ui_err.c 806 807 # 808 # UI 809 # 559 810 $(OPENSSL_PATH)/crypto/ui/ui_lib.c 560 561 # 562 # Not required when OPENSSL_NO_STDIO is set, which is is for UEFI.563 # 811 # 812 # Not Required by UEFI. 813 # 814 # $(OPENSSL_PATH)/crypto/ui/ui_err.c 564 815 # $(OPENSSL_PATH)/crypto/ui/ui_openssl.c 565 566 816 $(OPENSSL_PATH)/crypto/ui/ui_util.c 567 817 $(OPENSSL_PATH)/crypto/ui/ui_compat.c 818 819 # 820 # KRB5 821 # 568 822 $(OPENSSL_PATH)/crypto/krb5/krb5_asn.c 569 $(OPENSSL_PATH)/crypto/store/str_err.c 570 $(OPENSSL_PATH)/crypto/store/str_lib.c 571 $(OPENSSL_PATH)/crypto/store/str_meth.c 572 $(OPENSSL_PATH)/crypto/store/str_mem.c 823 824 # 825 # CMS - Disabled by OPENSSL_NO_CMS 826 # 827 # $(OPENSSL_PATH)/crypto/cms/cms_lib.c 828 # $(OPENSSL_PATH)/crypto/cms/cms_asn1.c 829 # $(OPENSSL_PATH)/crypto/cms/cms_att.c 830 # $(OPENSSL_PATH)/crypto/cms/cms_io.c 831 # $(OPENSSL_PATH)/crypto/cms/cms_smime.c 832 # $(OPENSSL_PATH)/crypto/cms/cms_err.c 833 # $(OPENSSL_PATH)/crypto/cms/cms_sd.c 834 # $(OPENSSL_PATH)/crypto/cms/cms_dd.c 835 # $(OPENSSL_PATH)/crypto/cms/cms_cd.c 836 # $(OPENSSL_PATH)/crypto/cms/cms_env.c 837 # $(OPENSSL_PATH)/crypto/cms/cms_enc.c 838 # $(OPENSSL_PATH)/crypto/cms/cms_ess.c 839 # $(OPENSSL_PATH)/crypto/cms/cms_pwri.c 840 # $(OPENSSL_PATH)/crypto/cms/cms_kari.c 841 842 # 843 # PQUEUE 844 # 573 845 $(OPENSSL_PATH)/crypto/pqueue/pqueue.c 846 847 # 848 # TS 849 # 850 $(OPENSSL_PATH)/crypto/ts/ts_err.c 851 $(OPENSSL_PATH)/crypto/ts/ts_req_utils.c 852 $(OPENSSL_PATH)/crypto/ts/ts_req_print.c 853 $(OPENSSL_PATH)/crypto/ts/ts_rsp_utils.c 854 $(OPENSSL_PATH)/crypto/ts/ts_rsp_print.c 855 $(OPENSSL_PATH)/crypto/ts/ts_rsp_sign.c 856 $(OPENSSL_PATH)/crypto/ts/ts_rsp_verify.c 857 $(OPENSSL_PATH)/crypto/ts/ts_verify_ctx.c 858 $(OPENSSL_PATH)/crypto/ts/ts_lib.c 859 $(OPENSSL_PATH)/crypto/ts/ts_conf.c 860 $(OPENSSL_PATH)/crypto/ts/ts_asn1.c 861 862 # 863 # SRP - Disabled by OPENSSL_NO_SRP 864 # 865 # $(OPENSSL_PATH)/crypto/srp/srp_lib.c 866 # $(OPENSSL_PATH)/crypto/srp/srp_vfy.c 867 868 # 869 # CMAS 870 # 871 $(OPENSSL_PATH)/crypto/cmac/cmac.c 872 $(OPENSSL_PATH)/crypto/cmac/cm_ameth.c 873 $(OPENSSL_PATH)/crypto/cmac/cm_pmeth.c 574 874 575 875 [Packages] … … 581 881 582 882 [BuildOptions] 583 # 584 # Override MSFT build option to remove /W4 (to silence warning messages when building OpenSSL). 585 # 586 MSFT:DEBUG_VS2003_IA32_CC_FLAGS == /nologo /c /WX /Gs32768 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /GX- /Zi /Gm -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DTHIRTY_TWO_BIT 587 MSFT:RELEASE_VS2003_IA32_CC_FLAGS == /nologo /c /WX /Gs32768 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /GX- -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DTHIRTY_TWO_BIT 588 MSFT:DEBUG_VS2003xASL_IA32_CC_FLAGS == /nologo /c /WX /Gs32768 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /GX- /Zi /Gm -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DTHIRTY_TWO_BIT 589 MSFT:RELEASE_VS2003xASL_IA32_CC_FLAGS == /nologo /c /WX /Gs32768 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /GX- -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DTHIRTY_TWO_BIT 590 MSFT:DEBUG_DDK3790_IA32_CC_FLAGS == /nologo /c /WX /Gy /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DTHIRTY_TWO_BIT 591 MSFT:RELEASE_DDK3790_IA32_CC_FLAGS == /nologo /c /WX /Gy /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DTHIRTY_TWO_BIT 592 MSFT:DEBUG_DDK3790xASL_IA32_CC_FLAGS == /nologo /c /WX /Gy /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DTHIRTY_TWO_BIT 593 MSFT:RELEASE_DDK3790xASL_IA32_CC_FLAGS == /nologo /c /WX /Gy /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DTHIRTY_TWO_BIT 594 MSFT:DEBUG_*_IA32_CC_FLAGS == /nologo /c /WX /GS- /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DTHIRTY_TWO_BIT 595 MSFT:RELEASE_*_IA32_CC_FLAGS == /nologo /c /WX /GS- /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DTHIRTY_TWO_BIT 596 MSFT:NOOPT_*_IA32_CC_FLAGS == /nologo /c /WX /GS- /Gs32768 /D UNICODE /Od /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DTHIRTY_TWO_BIT 597 MSFT:DEBUG_*_X64_CC_FLAGS == /nologo /c /WX /GS- /X /Gs32768 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DSIXTY_FOUR_BIT 598 MSFT:RELEASE_*_X64_CC_FLAGS == /nologo /c /WX /GS- /X /Gs32768 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DSIXTY_FOUR_BIT 599 MSFT:NOOPT_*_X64_CC_FLAGS == /nologo /c /WX /GS- /X /Gs32768 /D UNICODE /Od /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DSIXTY_FOUR_BIT 600 MSFT:DEBUG_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /X /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32 /Zi -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DSIXTY_FOUR_BIT 601 MSFT:RELEASE_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /X /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32 -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DSIXTY_FOUR_BIT 602 MSFT:NOOPT_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /X /EHs-c- /GR- /Gy /Od /FIAutoGen.h /QIPF_fr32 /Zi -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DSIXTY_FOUR_BIT 603 INTEL:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DTHIRTY_TWO_BIT 604 INTEL:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DSIXTY_FOUR_BIT 605 INTEL:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DSIXTY_FOUR_BIT 606 GCC:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -w -DTHIRTY_TWO_BIT 607 GCC:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -w -DSIXTY_FOUR_BIT 608 GCC:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -w -DSIXTY_FOUR_BIT 609 RVCT:*_*_IA32_CC_FLAGS = $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) --library_interface=aeabi_clib99 --fpu=vfpv3 -DTHIRTY_TWO_BIT 610 RVCT:*_*_X64_CC_FLAGS = $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) --library_interface=aeabi_clib99 --fpu=vfpv3 -DSIXTY_FOUR_BIT 611 RVCT:*_*_IPF_CC_FLAGS = $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) --library_interface=aeabi_clib99 --fpu=vfpv3 -DSIXTY_FOUR_BIT 883 # 884 # Disables the following Visual Studio compiler warnings brought by openssl source, so we do not break the build with /WX option: 885 # C4244: conversion from type1 to type2, possible loss of data 886 # C4702: unreachable code 887 # C4706: assignment within conditional expression 888 # C4133: incompatible types - from type1 to type2 889 # C4245: conversion from type1 to type2, signed/unsigned mismatch 890 # C4267: conversion from size_t to type, possible loss of data 891 # C4305: truncation from type1 to type2 of smaller size 892 # C4306: conversion from type1 to type2 of greater size 893 # C4702: Potentially uninitialized local variable name used 894 # 895 MSFT:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -DTHIRTY_TWO_BIT /wd4244 /wd4701 /wd4702 /wd4706 896 MSFT:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -DSIXTY_FOUR_BIT /wd4133 /wd4244 /wd4245 /wd4267 /wd4701 /wd4305 /wd4306 /wd4702 /wd4706 897 MSFT:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -DSIXTY_FOUR_BIT /wd4133 /wd4244 /wd4245 /wd4267 /wd4701 /wd4305 /wd4306 /wd4702 /wd4706 898 899 INTEL:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DTHIRTY_TWO_BIT 900 INTEL:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DSIXTY_FOUR_BIT 901 INTEL:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w -DSIXTY_FOUR_BIT 902 903 GCC:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -w -DTHIRTY_TWO_BIT 904 GCC:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -w -DSIXTY_FOUR_BIT_LONG 905 GCC:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -w -DSIXTY_FOUR_BIT_LONG 906 GCC:*_*_ARM_CC_FLAGS = $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -w -DTHIRTY_TWO_BIT 907 GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -w -DSIXTY_FOUR_BIT_LONG 908 909 # suppress the following warnings in openssl so we don't break the build with warnings-as-errors: 910 # 1295: Deprecated declaration <entity> - give arg types 911 # 550: <entity> was set but never used 912 # 1293: assignment in condition 913 # 111: statement is unreachable (invariably "break;" after "return X;" in case statement) 914 # 68: integer conversion resulted in a change of sign ("if (Status == -1)") 915 # 177: <entity> was declared but never referenced 916 # 223: function <entity> declared implicitly 917 # 144: a value of type <type> cannot be used to initialize an entity of type <type> 918 # 513: a value of type <type> cannot be assigned to an entity of type <type> 919 # 188: enumerated type mixed with another type (i.e. passing an integer as an enum without a cast) 920 # 1296: Extended constant initialiser used 921 RVCT:*_*_ARM_CC_FLAGS = $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) --library_interface=aeabi_clib99 --fpu=vfpv3 -DTHIRTY_TWO_BIT --diag_suppress=1296,1295,550,1293,111,68,177,223,144,513,188 922 XCODE:*_*_IA32_CC_FLAGS = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -w -DTHIRTY_TWO_BIT 923 XCODE:*_*_X64_CC_FLAGS = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -w -DSIXTY_FOUR_BIT_LONG -
trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/Patch-HOWTO.txt
r48674 r58459 5 5 OpenSSL is a well-known open source implementation of SSL and TLS protocols. 6 6 The core library implements the basic cryptographic functions and provides various 7 utility functions. The OpenSSL library is widely used in variety of security 8 products development as base crypto provider. (See http://www.openssl.org for more 7 utility functions. The OpenSSL library is widely used in variety of security 8 products development as base crypto provider. (See http://www.openssl.org for more 9 9 information for OpenSSL). 10 UEFI (Unified Extensible Firmware Interface) is a specification detailing the 11 interfaces between OS and platform firmware. Several security features were 12 introduced (e.g. Authenticated Variable Service, Driver Signing, etc) from UEFI 13 2.2 (http://www.uefi.org). These security features highly depends on the 10 UEFI (Unified Extensible Firmware Interface) is a specification detailing the 11 interfaces between OS and platform firmware. Several security features were 12 introduced (e.g. Authenticated Variable Service, Driver Signing, etc) from UEFI 13 2.2 (http://www.uefi.org). These security features highly depends on the 14 14 cryptography. This patch will enable openssl building under UEFI environment. 15 15 … … 18 18 OpenSSL-Version 19 19 ================================================================================ 20 Current supported OpenSSL version for UEFI Crypto Library is 0.9.8w.21 http://www.openssl.org/source/openssl- 0.9.8w.tar.gz20 Current supported OpenSSL version for UEFI Crypto Library is 1.0.2d. 21 http://www.openssl.org/source/openssl-1.0.2d.tar.gz 22 22 23 23 … … 25 25 HOW to Install Openssl for UEFI Building 26 26 ================================================================================ 27 1. Download OpenSSL 0.9.8wfrom official website:28 http://www.openssl.org/source/openssl-0.9.8w.tar.gz27 1. Download OpenSSL 1.0.2d from official website: 28 http://www.openssl.org/source/openssl-1.0.2d.tar.gz 29 29 30 NOTE: Some web browsers may rename the downloaded TAR file to openssl- 0.9.8w.tar.tar.31 When you do the download, rename the "openssl- 0.9.8w.tar.tar" to32 "openssl- 0.9.8w.tar.gz" or rename the local downloaded file with ".tar.tar"30 NOTE: Some web browsers may rename the downloaded TAR file to openssl-1.0.2d.tar.tar. 31 When you do the download, rename the "openssl-1.0.2d.tar.tar" to 32 "openssl-1.0.2d.tar.gz" or rename the local downloaded file with ".tar.tar" 33 33 extension to ".tar.gz". 34 34 35 2. Extract TAR into CryptoPkg/Library/OpenSslLib/openssl- 0.9.8w35 2. Extract TAR into CryptoPkg/Library/OpenSslLib/openssl-1.0.2d 36 36 37 NOTE: If you use WinZip to unpack the openssl source in Windows, please 38 uncheck the WinZip smart CR/LF conversion option (WINZIP: Options --> 37 NOTE: If you use WinZip to unpack the openssl source in Windows, please 38 uncheck the WinZip smart CR/LF conversion option (WINZIP: Options --> 39 39 Configuration --> Miscellaneous --> "TAR file smart CR/LF conversion"). 40 41 3. Apply this patch: EDKII_openssl- 0.9.8w.patch, and make installation40 41 3. Apply this patch: EDKII_openssl-1.0.2d.patch, and make installation 42 42 43 43 For Windows Environment: 44 44 ------------------------ 45 45 1) Make sure the patch utility has been installed in your machine. 46 Install Cygwin or get the patch utility binary from 46 Install Cygwin or get the patch utility binary from 47 47 http://gnuwin32.sourceforge.net/packages/patch.htm 48 2) cd $(WORKSPACE)\CryptoPkg\Library\OpensslLib\openssl- 0.9.8w49 3) patch -p0 -i ..\EDKII_openssl- 0.9.8w.patch48 2) cd $(WORKSPACE)\CryptoPkg\Library\OpensslLib\openssl-1.0.2d 49 3) patch -p0 -i ..\EDKII_openssl-1.0.2d.patch 50 50 4) cd .. 51 51 5) Install.cmd … … 55 55 1) Make sure the patch utility has been installed in your machine. 56 56 Patch utility is available from http://directory.fsf.org/project/patch/ 57 2) cd $(WORKSPACE)/CryptoPkg/Library/OpensslLib/openssl- 0.9.8w58 3) patch -p0 -i ../EDKII_openssl- 0.9.8w.patch57 2) cd $(WORKSPACE)/CryptoPkg/Library/OpensslLib/openssl-1.0.2d 58 3) patch -p0 -i ../EDKII_openssl-1.0.2d.patch 59 59 4) cd .. 60 60 5) ./Install.sh
Note:
See TracChangeset
for help on using the changeset viewer.