+++ /dev/null
-/** @file\r
- Runtime Cryptographic Driver Implementation, which produce one crypto\r
- protocol.\r
-\r
-Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "CryptRuntime.h"\r
-\r
-//\r
-// The handle onto which the Runtime Crypt Protocol instance is installed\r
-//\r
-EFI_HANDLE mRuntimeCryptHandle = NULL;\r
-\r
-//\r
-// The Runtime Crypt Protocol instance produced by this driver\r
-//\r
-EFI_RUNTIME_CRYPT_PROTOCOL mRuntimeCryptProtocol = {\r
- RuntimeCryptSha256GetContextSize,\r
- RuntimeCryptSha256Init,\r
- RuntimeCryptSha256Update,\r
- RuntimeCryptSha256Final,\r
- RuntimeCryptRsaNew,\r
- RuntimeCryptRsaFree,\r
- RuntimeCryptRsaSetKey,\r
- RuntimeCryptRsaPkcs1Verify\r
-};\r
-\r
-/**\r
- Retrieves the size, in bytes, of the context buffer required for SHA-256 operations.\r
-\r
- @return The size, in bytes, of the context buffer required for SHA-256 operations.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-RuntimeCryptSha256GetContextSize (\r
- VOID\r
- )\r
-{\r
- return Sha256GetContextSize ();\r
-}\r
-\r
-/**\r
- Initializes user-supplied memory pointed by Sha256Context as SHA-256 hash context for\r
- subsequent use.\r
-\r
- If Sha256Context is NULL, then return FALSE.\r
-\r
- @param[in, out] Sha256Context Pointer to SHA-256 Context being initialized.\r
-\r
- @retval TRUE SHA-256 context initialization succeeded.\r
- @retval FALSE SHA-256 context initialization failed.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RuntimeCryptSha256Init (\r
- IN OUT VOID *Sha256Context\r
- )\r
-{\r
- return Sha256Init (Sha256Context);\r
-}\r
-\r
-/**\r
- Performs SHA-256 digest on a data buffer of the specified length. This function can\r
- be called multiple times to compute the digest of long or discontinuous data streams.\r
-\r
- If Sha256Context is NULL, then return FALSE.\r
-\r
- @param[in, out] Sha256Context Pointer to the SHA-256 context.\r
- @param[in] Data Pointer to the buffer containing the data to be hashed.\r
- @param[in] DataLength Length of Data buffer in bytes.\r
-\r
- @retval TRUE SHA-256 data digest succeeded.\r
- @retval FALSE Invalid SHA-256 context. After Sha256Final function has been called, the\r
- SHA-256 context cannot be reused.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RuntimeCryptSha256Update (\r
- IN OUT VOID *Sha256Context,\r
- IN CONST VOID *Data,\r
- IN UINTN DataLength\r
- )\r
-{\r
- return Sha256Update (Sha256Context, Data, DataLength);\r
-}\r
-\r
-/**\r
- Completes SHA-256 hash computation and retrieves the digest value into the specified\r
- memory. After this function has been called, the SHA-256 context cannot be used again.\r
-\r
- If Sha256Context is NULL, then return FALSE.\r
- If HashValue is NULL, then return FALSE.\r
-\r
- @param[in, out] Sha256Context Pointer to SHA-256 context\r
- @param[out] HashValue Pointer to a buffer that receives the SHA-256 digest\r
- value (32 bytes).\r
-\r
- @retval TRUE SHA-256 digest computation succeeded.\r
- @retval FALSE SHA-256 digest computation failed.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RuntimeCryptSha256Final (\r
- IN OUT VOID *Sha256Context,\r
- OUT UINT8 *HashValue\r
- )\r
-{\r
- return Sha256Final (Sha256Context, HashValue);\r
-}\r
-\r
-/**\r
- Allocates and Initializes one RSA Context for subsequent use.\r
-\r
- @return Pointer to the RSA Context that has been initialized.\r
- If the allocations fails, RsaNew() returns NULL.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-RuntimeCryptRsaNew (\r
- VOID\r
- )\r
-{\r
- return RsaNew ();\r
-}\r
-\r
-/**\r
- Release the specified RSA Context.\r
-\r
- @param[in] RsaContext Pointer to the RSA context to be released.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-RuntimeCryptRsaFree (\r
- IN VOID *RsaContext\r
- )\r
-{\r
- RsaFree (RsaContext);\r
-}\r
-\r
-/**\r
- Sets the tag-designated RSA key component into the established RSA context from\r
- the user-specified nonnegative integer (octet string format represented in RSA\r
- PKCS#1).\r
-\r
- If RsaContext is NULL, then return FALSE.\r
-\r
- @param[in, out] RsaContext Pointer to RSA context being set.\r
- @param[in] KeyTag Tag of RSA key component being set.\r
- @param[in] BigNumber Pointer to octet integer buffer.\r
- @param[in] BnLength Length of big number buffer in bytes.\r
-\r
- @return TRUE RSA key component was set successfully.\r
- @return FALSE Invalid RSA key component tag.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RuntimeCryptRsaSetKey (\r
- IN OUT VOID *RsaContext,\r
- IN RSA_KEY_TAG KeyTag,\r
- IN CONST UINT8 *BigNumber,\r
- IN UINTN BnLength\r
- )\r
-{\r
- return RsaSetKey (RsaContext, KeyTag, BigNumber, BnLength);\r
-}\r
-\r
-/**\r
- Verifies the RSA-SSA signature with EMSA-PKCS1-v1_5 encoding scheme defined in\r
- RSA PKCS#1.\r
-\r
- If RsaContext is NULL, then return FALSE.\r
- If MessageHash is NULL, then return FALSE.\r
- If Signature is NULL, then return FALSE.\r
- If HashLength is not equal to the size of MD5, SHA-1 or SHA-256 digest, return FALSE.\r
-\r
- @param[in] RsaContext Pointer to RSA context for signature verification.\r
- @param[in] MessageHash Pointer to octet message hash to be checked.\r
- @param[in] HashLength Length of the message hash in bytes.\r
- @param[in] Signature Pointer to RSA PKCS1-v1_5 signature to be verified.\r
- @param[in] SigLength Length of signature in bytes.\r
-\r
- @return TRUE Valid signature encoded in PKCS1-v1_5.\r
- @return FALSE Invalid signature or invalid RSA context.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RuntimeCryptRsaPkcs1Verify (\r
- IN VOID *RsaContext,\r
- IN CONST UINT8 *MessageHash,\r
- IN UINTN HashLength,\r
- IN CONST UINT8 *Signature,\r
- IN UINTN SigLength\r
- )\r
-{\r
- return RsaPkcs1Verify (RsaContext, MessageHash, HashLength, Signature, SigLength);\r
-}\r
-\r
-/**\r
- Entry Point for Runtime Cryptographic Driver.\r
-\r
- This function installs Runtime Crypt Protocol.\r
-\r
- @param ImageHandle Image handle of this driver.\r
- @param SystemTable a Pointer to the EFI System Table.\r
-\r
- @retval EFI_SUCEESS Runtime Crypt Protocol is successfully installed\r
- @return Others Some error occurs when installing Runtime Crypt Protocol.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-CryptRuntimeDriverInitialize (\r
- IN EFI_HANDLE ImageHandle,\r
- IN EFI_SYSTEM_TABLE *SystemTable\r
- )\r
-{\r
- EFI_STATUS Status;\r
-\r
- //\r
- // Install the Runtime Crypt Protocol onto a new handle\r
- //\r
- Status = gBS->InstallMultipleProtocolInterfaces (\r
- &mRuntimeCryptHandle,\r
- &gEfiRuntimeCryptProtocolGuid,\r
- &mRuntimeCryptProtocol,\r
- NULL\r
- );\r
- ASSERT_EFI_ERROR (Status);\r
-\r
- return Status;\r
-}\r
+++ /dev/null
-/** @file\r
- Header file of Runtime Cryptographic Driver.\r
-\r
-Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#ifndef _CRYPT_RUNTIME_H_\r
-#define _CRYPT_RUNTIME_H_\r
-\r
-#include <Uefi.h>\r
-\r
-#include <Protocol/RuntimeCrypt.h>\r
-\r
-#include <Library/DebugLib.h>\r
-#include <Library/UefiDriverEntryPoint.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/BaseCryptLib.h>\r
-\r
-/**\r
- Retrieves the size, in bytes, of the context buffer required for SHA-256 operations.\r
-\r
- @return The size, in bytes, of the context buffer required for SHA-256 operations.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-RuntimeCryptSha256GetContextSize (\r
- VOID\r
- );\r
-\r
-\r
-/**\r
- Initializes user-supplied memory pointed by Sha256Context as SHA-256 hash context for\r
- subsequent use.\r
-\r
- If Sha256Context is NULL, then return FALSE.\r
-\r
- @param[in, out] Sha256Context Pointer to SHA-256 Context being initialized.\r
-\r
- @retval TRUE SHA-256 context initialization succeeded.\r
- @retval FALSE SHA-256 context initialization failed.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RuntimeCryptSha256Init (\r
- IN OUT VOID *Sha256Context\r
- );\r
-\r
-\r
-/**\r
- Performs SHA-256 digest on a data buffer of the specified length. This function can\r
- be called multiple times to compute the digest of long or discontinuous data streams.\r
-\r
- If Sha256Context is NULL, then return FALSE.\r
-\r
- @param[in, out] Sha256Context Pointer to the SHA-256 context.\r
- @param[in] Data Pointer to the buffer containing the data to be hashed.\r
- @param[in] DataLength Length of Data buffer in bytes.\r
-\r
- @retval TRUE SHA-256 data digest succeeded.\r
- @retval FALSE Invalid SHA-256 context. After Sha256Final function has been called, the\r
- SHA-256 context cannot be reused.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RuntimeCryptSha256Update (\r
- IN OUT VOID *Sha256Context,\r
- IN CONST VOID *Data,\r
- IN UINTN DataLength\r
- );\r
-\r
-\r
-/**\r
- Completes SHA-256 hash computation and retrieves the digest value into the specified\r
- memory. After this function has been called, the SHA-256 context cannot be used again.\r
-\r
- If Sha256Context is NULL, then return FALSE.\r
- If HashValue is NULL, then return FALSE.\r
-\r
- @param[in, out] Sha256Context Pointer to SHA-256 context\r
- @param[out] HashValue Pointer to a buffer that receives the SHA-256 digest\r
- value (32 bytes).\r
-\r
- @retval TRUE SHA-256 digest computation succeeded.\r
- @retval FALSE SHA-256 digest computation failed.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RuntimeCryptSha256Final (\r
- IN OUT VOID *Sha256Context,\r
- OUT UINT8 *HashValue\r
- );\r
-\r
-/**\r
- Allocates and Initializes one RSA Context for subsequent use.\r
-\r
- @return Pointer to the RSA Context that has been initialized.\r
- If the allocations fails, RsaNew() returns NULL.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-RuntimeCryptRsaNew (\r
- VOID\r
- );\r
-\r
-\r
-/**\r
- Release the specified RSA Context.\r
-\r
- @param[in] RsaContext Pointer to the RSA context to be released.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-RuntimeCryptRsaFree (\r
- IN VOID *RsaContext\r
- );\r
-\r
-/**\r
- Sets the tag-designated RSA key component into the established RSA context from\r
- the user-specified nonnegative integer (octet string format represented in RSA\r
- PKCS#1).\r
-\r
- If RsaContext is NULL, then return FALSE.\r
-\r
- @param[in, out] RsaContext Pointer to RSA context being set.\r
- @param[in] KeyTag Tag of RSA key component being set.\r
- @param[in] BigNumber Pointer to octet integer buffer.\r
- @param[in] BnLength Length of big number buffer in bytes.\r
-\r
- @return TRUE RSA key component was set successfully.\r
- @return FALSE Invalid RSA key component tag.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RuntimeCryptRsaSetKey (\r
- IN OUT VOID *RsaContext,\r
- IN RSA_KEY_TAG KeyTag,\r
- IN CONST UINT8 *BigNumber,\r
- IN UINTN BnLength\r
- );\r
-\r
-\r
-/**\r
- Verifies the RSA-SSA signature with EMSA-PKCS1-v1_5 encoding scheme defined in\r
- RSA PKCS#1.\r
-\r
- If RsaContext is NULL, then return FALSE.\r
- If MessageHash is NULL, then return FALSE.\r
- If Signature is NULL, then return FALSE.\r
- If HashLength is not equal to the size of MD5, SHA-1 or SHA-256 digest, return FALSE.\r
-\r
- @param[in] RsaContext Pointer to RSA context for signature verification.\r
- @param[in] MessageHash Pointer to octet message hash to be checked.\r
- @param[in] HashLength Length of the message hash in bytes.\r
- @param[in] Signature Pointer to RSA PKCS1-v1_5 signature to be verified.\r
- @param[in] SigLength Length of signature in bytes.\r
-\r
- @return TRUE Valid signature encoded in PKCS1-v1_5.\r
- @return FALSE Invalid signature or invalid RSA context.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RuntimeCryptRsaPkcs1Verify (\r
- IN VOID *RsaContext,\r
- IN CONST UINT8 *MessageHash,\r
- IN UINTN HashLength,\r
- IN CONST UINT8 *Signature,\r
- IN UINTN SigLength\r
- );\r
-\r
-#endif\r
+++ /dev/null
-## @file\r
-# This driver installs runtime Crypt protocol to provide SHA256 and RSA service.\r
-#\r
-# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-##\r
-\r
-[Defines]\r
- INF_VERSION = 0x00010005\r
- BASE_NAME = CryptRuntimeDxe\r
- MODULE_UNI_FILE = CryptRuntimeDxe.uni\r
- FILE_GUID = 858031F3-96A2-406E-ABCC-ED264A3A31D6\r
- MODULE_TYPE = DXE_RUNTIME_DRIVER\r
- VERSION_STRING = 1.0\r
-\r
- ENTRY_POINT = CryptRuntimeDriverInitialize\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-# VALID_ARCHITECTURES = IA32 X64 IPF\r
-#\r
-\r
-[Sources]\r
- CryptRuntime.h\r
- CryptRuntime.c\r
-\r
-[Packages]\r
- MdePkg/MdePkg.dec\r
- CryptoPkg/CryptoPkg.dec\r
-\r
-[LibraryClasses]\r
- UefiDriverEntryPoint\r
- UefiBootServicesTableLib\r
- DebugLib\r
- UefiRuntimeLib\r
- BaseCryptLib\r
-\r
-[Protocols]\r
- gEfiRuntimeCryptProtocolGuid ## PRODUCES\r
-\r
-[Depex]\r
- TRUE\r
-\r
-[UserExtensions.TianoCore."ExtraFiles"]\r
- CryptRuntimeDxeExtra.uni\r
-\r
+++ /dev/null
-// /** @file\r
-// This driver installs runtime Crypt protocol to provide SHA256 and RSA service.\r
-//\r
-// This driver installs runtime Crypt protocol to provide SHA256 and RSA service.\r
-//\r
-// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
-//\r
-// This program and the accompanying materials\r
-// are licensed and made available under the terms and conditions of the BSD License\r
-// which accompanies this distribution. The full text of the license may be found at\r
-// http://opensource.org/licenses/bsd-license.php\r
-//\r
-// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-//\r
-// **/\r
-\r
-\r
-#string STR_MODULE_ABSTRACT #language en-US "Installs runtime Crypt protocol to provide SHA256 and RSA service"\r
-\r
-#string STR_MODULE_DESCRIPTION #language en-US "This driver installs runtime Crypt protocol to provide SHA256 and RSA service."\r
-\r
+++ /dev/null
-// /** @file\r
-// CryptRuntimeDxe Localized Strings and Content\r
-//\r
-// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
-//\r
-// This program and the accompanying materials\r
-// are licensed and made available under the terms and conditions of the BSD License\r
-// which accompanies this distribution. The full text of the license may be found at\r
-// http://opensource.org/licenses/bsd-license.php\r
-//\r
-// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-//\r
-// **/\r
-\r
-#string STR_PROPERTIES_MODULE_NAME\r
-#language en-US\r
-"CryptRuntimeDxe module"\r
-\r
-\r
##\r
TlsLib|Include/Library/TlsLib.h\r
\r
-[Protocols]\r
- ## Include/Protocol/RuntimeCrypt.h\r
- gEfiRuntimeCryptProtocolGuid = { 0xe1475e0c, 0x1746, 0x4802, {0x86, 0x2e, 0x1, 0x1c, 0x2c, 0x2d, 0x9d, 0x86 }}\r
-\r
[UserExtensions.TianoCore."ExtraFiles"]\r
CryptoPkgExtra.uni\r
PLATFORM_VERSION = 0.98\r
DSC_SPECIFICATION = 0x00010005\r
OUTPUT_DIRECTORY = Build/CryptoPkg\r
- SUPPORTED_ARCHITECTURES = IA32|X64|IPF|ARM|AARCH64\r
+ SUPPORTED_ARCHITECTURES = IA32|X64|ARM|AARCH64\r
BUILD_TARGETS = DEBUG|RELEASE|NOOPT\r
SKUID_IDENTIFIER = DEFAULT\r
\r
[LibraryClasses.common.DXE_SMM_DRIVER]\r
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf\r
\r
-[LibraryClasses.common.DXE_SAL_DRIVER]\r
- BaseCryptLib|CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/BaseCryptLibRuntimeCryptProtocol.inf\r
-\r
[LibraryClasses.common.UEFI_DRIVER]\r
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
\r
CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf\r
CryptoPkg/Library/TlsLib/TlsLib.inf\r
\r
- CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxe.inf\r
-\r
[Components.IA32, Components.X64]\r
CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf\r
\r
-[Components.IPF]\r
- CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/BaseCryptLibRuntimeCryptProtocol.inf\r
-\r
[BuildOptions]\r
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES\r
+++ /dev/null
-/** @file\r
- The runtime cryptographic protocol.\r
- Only limited crypto primitives (SHA-256 and RSA) are provided for runtime\r
- authenticated variable service.\r
-\r
-Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#ifndef __EFI_RUNTIME_CRYPT_PROTOCOL_H__\r
-#define __EFI_RUNTIME_CRYPT_PROTOCOL_H__\r
-\r
-#include <Library/BaseCryptLib.h>\r
-\r
-///\r
-/// Runtime Cryptographic Protocol GUID.\r
-///\r
-#define EFI_RUNTIME_CRYPT_PROTOCOL_GUID \\r
- { \\r
- 0xe1475e0c, 0x1746, 0x4802, { 0x86, 0x2e, 0x1, 0x1c, 0x2c, 0x2d, 0x9d, 0x86 } \\r
- }\r
-\r
-/**\r
- Retrieves the size, in bytes, of the context buffer required for SHA-256 operations.\r
-\r
- @return The size, in bytes, of the context buffer required for SHA-256 operations.\r
-\r
-**/\r
-typedef\r
-UINTN\r
-(EFIAPI *EFI_RUNTIME_CRYPT_SHA256_GET_CONTEXT_SIZE) (\r
- VOID\r
- );\r
-\r
-\r
-/**\r
- Initializes user-supplied memory pointed by Sha256Context as SHA-256 hash context for\r
- subsequent use.\r
-\r
- If Sha256Context is NULL, then return FALSE.\r
-\r
- @param[in, out] Sha256Context Pointer to SHA-256 Context being initialized.\r
-\r
- @retval TRUE SHA-256 context initialization succeeded.\r
- @retval FALSE SHA-256 context initialization failed.\r
-\r
-**/\r
-typedef\r
-BOOLEAN\r
-(EFIAPI *EFI_RUNTIME_CRYPT_SHA256_INIT) (\r
- IN OUT VOID *Sha256Context\r
- );\r
-\r
-\r
-/**\r
- Performs SHA-256 digest on a data buffer of the specified length. This function can\r
- be called multiple times to compute the digest of long or discontinuous data streams.\r
-\r
- If Sha256Context is NULL, then return FALSE.\r
-\r
- @param[in, out] Sha256Context Pointer to the SHA-256 context.\r
- @param[in] Data Pointer to the buffer containing the data to be hashed.\r
- @param[in] DataLength Length of Data buffer in bytes.\r
-\r
- @retval TRUE SHA-256 data digest succeeded.\r
- @retval FALSE Invalid SHA-256 context. After Sha256Final function has been called, the\r
- SHA-256 context cannot be reused.\r
-\r
-**/\r
-typedef\r
-BOOLEAN\r
-(EFIAPI *EFI_RUNTIME_CRYPT_SHA256_UPDATE) (\r
- IN OUT VOID *Sha256Context,\r
- IN CONST VOID *Data,\r
- IN UINTN DataLength\r
- );\r
-\r
-\r
-/**\r
- Completes SHA-256 hash computation and retrieves the digest value into the specified\r
- memory. After this function has been called, the SHA-256 context cannot be used again.\r
-\r
- If Sha256Context is NULL, then return FALSE.\r
- If HashValue is NULL, then return FALSE.\r
-\r
- @param[in, out] Sha256Context Pointer to SHA-256 context\r
- @param[out] HashValue Pointer to a buffer that receives the SHA-256 digest\r
- value (32 bytes).\r
-\r
- @retval TRUE SHA-256 digest computation succeeded.\r
- @retval FALSE SHA-256 digest computation failed.\r
-\r
-**/\r
-typedef\r
-BOOLEAN\r
-(EFIAPI *EFI_RUNTIME_CRYPT_SHA256_FINAL) (\r
- IN OUT VOID *Sha256Context,\r
- OUT UINT8 *HashValue\r
- );\r
-\r
-\r
-/**\r
- Allocates and Initializes one RSA Context for subsequent use.\r
-\r
- @return Pointer to the RSA Context that has been initialized.\r
- If the allocations fails, RsaNew() returns NULL.\r
-\r
-**/\r
-typedef\r
-VOID *\r
-(EFIAPI *EFI_RUNTIME_CRYPT_RSA_NEW) (\r
- VOID\r
- );\r
-\r
-/**\r
- Release the specified RSA Context.\r
-\r
- @param[in] RsaContext Pointer to the RSA context to be released.\r
-\r
-**/\r
-typedef\r
-VOID\r
-(EFIAPI *EFI_RUNTIME_CRYPT_RSA_FREE) (\r
- IN VOID *RsaContext\r
- );\r
-\r
-/**\r
- Sets the tag-designated RSA key component into the established RSA context from\r
- the user-specified nonnegative integer (octet string format represented in RSA\r
- PKCS#1).\r
-\r
- If RsaContext is NULL, then return FALSE.\r
-\r
- @param[in, out] RsaContext Pointer to RSA context being set.\r
- @param[in] KeyTag Tag of RSA key component being set.\r
- @param[in] BigNumber Pointer to octet integer buffer.\r
- @param[in] BnLength Length of big number buffer in bytes.\r
-\r
- @return TRUE RSA key component was set successfully.\r
- @return FALSE Invalid RSA key component tag.\r
-\r
-**/\r
-typedef\r
-BOOLEAN\r
-(EFIAPI *EFI_RUNTIME_CRYPT_RSA_SET_KEY) (\r
- IN OUT VOID *RsaContext,\r
- IN RSA_KEY_TAG KeyTag,\r
- IN CONST UINT8 *BigNumber,\r
- IN UINTN BnLength\r
- );\r
-\r
-/**\r
- Verifies the RSA-SSA signature with EMSA-PKCS1-v1_5 encoding scheme defined in\r
- RSA PKCS#1.\r
-\r
- If RsaContext is NULL, then return FALSE.\r
- If MessageHash is NULL, then return FALSE.\r
- If Signature is NULL, then return FALSE.\r
- If HashLength is not equal to the size of MD5, SHA-1 or SHA-256 digest, then return FALSE.\r
-\r
- @param[in] RsaContext Pointer to RSA context for signature verification.\r
- @param[in] MessageHash Pointer to octet message hash to be checked.\r
- @param[in] HashLength Length of the message hash in bytes.\r
- @param[in] Signature Pointer to RSA PKCS1-v1_5 signature to be verified.\r
- @param[in] SigLength Length of signature in bytes.\r
-\r
- @return TRUE Valid signature encoded in PKCS1-v1_5.\r
- @return FALSE Invalid signature or invalid RSA context.\r
-\r
-**/\r
-typedef\r
-BOOLEAN\r
-(EFIAPI *EFI_RUNTIME_CRYPT_RSA_PKCS1_VERIFY) (\r
- IN VOID *RsaContext,\r
- IN CONST UINT8 *MessageHash,\r
- IN UINTN HashLength,\r
- IN CONST UINT8 *Signature,\r
- IN UINTN SigLength\r
- );\r
-\r
-///\r
-/// Runtime Cryptographic Protocol Structure.\r
-///\r
-typedef struct {\r
- EFI_RUNTIME_CRYPT_SHA256_GET_CONTEXT_SIZE Sha256GetContextSize;\r
- EFI_RUNTIME_CRYPT_SHA256_INIT Sha256Init;\r
- EFI_RUNTIME_CRYPT_SHA256_UPDATE Sha256Update;\r
- EFI_RUNTIME_CRYPT_SHA256_FINAL Sha256Final;\r
- EFI_RUNTIME_CRYPT_RSA_NEW RsaNew;\r
- EFI_RUNTIME_CRYPT_RSA_FREE RsaFree;\r
- EFI_RUNTIME_CRYPT_RSA_SET_KEY RsaSetKey;\r
- EFI_RUNTIME_CRYPT_RSA_PKCS1_VERIFY RsaPkcs1Verify;\r
-} EFI_RUNTIME_CRYPT_PROTOCOL;\r
-\r
-extern EFI_GUID gEfiRuntimeCryptProtocolGuid;\r
-\r
-#endif\r
# This external input must be validated carefully to avoid security issues such as\r
# buffer overflow or integer overflow.\r
#\r
-# Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
#\r
# The following information is for reference only and not required by the build tools.\r
#\r
-# VALID_ARCHITECTURES = IA32 X64 IPF ARM AARCH64\r
+# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64\r
#\r
\r
[Sources]\r
[Sources.X64]\r
Rand/CryptRandTsc.c\r
\r
-[Sources.IPF]\r
- Rand/CryptRandItc.c\r
-\r
[Sources.ARM]\r
Rand/CryptRand.c\r
\r
#\r
# The following information is for reference only and not required by the build tools.\r
#\r
-# VALID_ARCHITECTURES = IA32 X64 IPF ARM AARCH64\r
+# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64\r
#\r
\r
[Sources]\r
[Sources.X64]\r
Rand/CryptRandTsc.c\r
\r
-[Sources.IPF]\r
- Rand/CryptRandItc.c\r
-\r
[Sources.ARM]\r
Rand/CryptRand.c\r
\r
[Sources.X64]\r
Rand/CryptRandTsc.c\r
\r
-[Sources.IPF]\r
- Rand/CryptRandItc.c\r
-\r
[Sources.ARM]\r
Rand/CryptRand.c\r
\r
+++ /dev/null
-## @file\r
-# Cryptographic Library Instance based on Runtime Crypt Protocol.\r
-# This instance will be only used by the Authenticated Variable driver for IPF.\r
-#\r
-# Note: MD4/MD5/SHA1 Digest functions, HMAC-MD5 functions, HMAC-SHA1 functions,\r
-# AES/TDES/ARC4 functions, RSA external functions, PKCS#7 SignedData sign/verify\r
-# functions, Diffie-Hellman functions, X.509 certificate handler functions,\r
-# authenticode signature verification functions, PEM handler functions,\r
-# pseudorandom number generator functions, and Sha256Duplicate() are not supported\r
-# in this instance.\r
-#\r
-# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-##\r
-\r
-[Defines]\r
- INF_VERSION = 0x00010005\r
- BASE_NAME = BaseCryptLibRuntimeCryptProtocol\r
- MODULE_UNI_FILE = BaseCryptLibRuntimeCryptProtocol.uni\r
- FILE_GUID = BBB31581-855A-44D7-A550-8A585D9B2DE9\r
- MODULE_TYPE = DXE_RUNTIME_DRIVER\r
- VERSION_STRING = 1.0\r
- LIBRARY_CLASS = BaseCryptLib|DXE_RUNTIME_DRIVER DXE_SAL_DRIVER\r
- CONSTRUCTOR = RuntimeDxeIpfCryptLibConstructor\r
- DESTRUCTOR = RuntimeDxeIpfCryptLibDestructor\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-# VALID_ARCHITECTURES = IPF\r
-#\r
-\r
-[Sources]\r
- RuntimeDxeIpfCryptLib.c\r
- InternalCryptLib.h\r
- Hash/CryptMd4Null.c\r
- Hash/CryptMd5Null.c\r
- Hash/CryptSha1Null.c\r
- Hmac/CryptHmacMd5Null.c\r
- Hmac/CryptHmacSha1Null.c\r
- Cipher/CryptAesNull.c\r
- Cipher/CryptTdesNull.c\r
- Cipher/CryptArc4Null.c\r
- Pk/CryptRsaExtNull.c\r
- Pk/CryptPkcs7SignNull.c\r
- Pk/CryptPkcs7VerifyNull.c\r
- Pk/CryptDhNull.c\r
- Pk/CryptX509Null.c\r
- Pk/CryptAuthenticodeNull.c\r
- Pem/CryptPemNull.c\r
- Rand/CryptRandNull.c\r
-\r
-[Packages]\r
- MdePkg/MdePkg.dec\r
- CryptoPkg/CryptoPkg.dec\r
-\r
-[LibraryClasses]\r
- BaseLib\r
- DebugLib\r
- UefiBootServicesTableLib\r
- UefiRuntimeLib\r
-\r
-[Guids]\r
- gEfiEventVirtualAddressChangeGuid ## CONSUMES ## Event\r
-\r
-[Protocols]\r
- gEfiRuntimeCryptProtocolGuid ## CONSUMES\r
-\r
-[Depex]\r
- gEfiRuntimeCryptProtocolGuid\r
+++ /dev/null
-// /** @file\r
-// Cryptographic Library Instance based on Runtime Crypt Protocol.\r
-//\r
-// This instance will be only used by the Authenticated Variable driver for IPF.\r
-//\r
-// Note: MD4/MD5/SHA1 Digest functions, HMAC-MD5 functions, HMAC-SHA1 functions,\r
-// AES/TDES/ARC4 functions, RSA external functions, PKCS#7 SignedData sign/verify\r
-// functions, Diffie-Hellman functions, X.509 certificate handler functions,\r
-// authenticode signature verification functions, PEM handler functions,\r
-// pseudorandom number generator functions, and Sha256Duplicate() are not supported\r
-// in this instance.\r
-//\r
-// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
-//\r
-// This program and the accompanying materials\r
-// are licensed and made available under the terms and conditions of the BSD License\r
-// which accompanies this distribution. The full text of the license may be found at\r
-// http://opensource.org/licenses/bsd-license.php\r
-//\r
-// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-//\r
-// **/\r
-\r
-\r
-#string STR_MODULE_ABSTRACT #language en-US "Cryptographic Library Instance based on Runtime Crypt Protocol"\r
-\r
-#string STR_MODULE_DESCRIPTION #language en-US "This instance will be only used by the Authenticated Variable driver for IPF. Note: MD4/MD5/SHA1 Digest functions, HMAC-MD5 functions, HMAC-SHA1 functions, AES/TDES/ARC4 functions, RSA external functions, PKCS#7 SignedData sign/verify functions, Diffie-Hellman functions, X.509 certificate handler functions, authenticode signature verification functions, PEM handler functions, pseudorandom number generator functions, and Sha256Duplicate() are not supported in this instance."\r
-\r
+++ /dev/null
-/** @file\r
- AES Wrapper Implementation which does not provide real capabilities.\r
-\r
-Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-/**\r
- Retrieves the size, in bytes, of the context buffer required for AES operations.\r
-\r
- Return zero to indicate this interface is not supported.\r
-\r
- @retval 0 This interface is not supported.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-AesGetContextSize (\r
- VOID\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return 0;\r
-}\r
-\r
-/**\r
- Initializes user-supplied memory as AES context for subsequent use.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[out] AesContext Pointer to AES context being initialized.\r
- @param[in] Key Pointer to the user-supplied AES key.\r
- @param[in] KeyLength Length of AES key in bits.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-AesInit (\r
- OUT VOID *AesContext,\r
- IN CONST UINT8 *Key,\r
- IN UINTN KeyLength\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Performs AES encryption on a data buffer of the specified size in ECB mode.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] AesContext Pointer to the AES context.\r
- @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
- @param[in] InputSize Size of the Input buffer in bytes.\r
- @param[out] Output Pointer to a buffer that receives the AES encryption output.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-AesEcbEncrypt (\r
- IN VOID *AesContext,\r
- IN CONST UINT8 *Input,\r
- IN UINTN InputSize,\r
- OUT UINT8 *Output\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Performs AES decryption on a data buffer of the specified size in ECB mode.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] AesContext Pointer to the AES context.\r
- @param[in] Input Pointer to the buffer containing the data to be decrypted.\r
- @param[in] InputSize Size of the Input buffer in bytes.\r
- @param[out] Output Pointer to a buffer that receives the AES decryption output.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-AesEcbDecrypt (\r
- IN VOID *AesContext,\r
- IN CONST UINT8 *Input,\r
- IN UINTN InputSize,\r
- OUT UINT8 *Output\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Performs AES encryption on a data buffer of the specified size in CBC mode.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] AesContext Pointer to the AES context.\r
- @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
- @param[in] InputSize Size of the Input buffer in bytes.\r
- @param[in] Ivec Pointer to initialization vector.\r
- @param[out] Output Pointer to a buffer that receives the AES encryption output.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-AesCbcEncrypt (\r
- IN VOID *AesContext,\r
- IN CONST UINT8 *Input,\r
- IN UINTN InputSize,\r
- IN CONST UINT8 *Ivec,\r
- OUT UINT8 *Output\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Performs AES decryption on a data buffer of the specified size in CBC mode.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] AesContext Pointer to the AES context.\r
- @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
- @param[in] InputSize Size of the Input buffer in bytes.\r
- @param[in] Ivec Pointer to initialization vector.\r
- @param[out] Output Pointer to a buffer that receives the AES encryption output.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-AesCbcDecrypt (\r
- IN VOID *AesContext,\r
- IN CONST UINT8 *Input,\r
- IN UINTN InputSize,\r
- IN CONST UINT8 *Ivec,\r
- OUT UINT8 *Output\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
+++ /dev/null
-/** @file\r
- ARC4 Wrapper Implementation which does not provide real capabilities.\r
-\r
-Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-/**\r
- Retrieves the size, in bytes, of the context buffer required for ARC4 operations.\r
-\r
- Return zero to indicate this interface is not supported.\r
-\r
- @retval 0 This interface is not supported.\r
-\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-Arc4GetContextSize (\r
- VOID\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return 0;\r
-}\r
-\r
-/**\r
- Initializes user-supplied memory as ARC4 context for subsequent use.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[out] Arc4Context Pointer to ARC4 context being initialized.\r
- @param[in] Key Pointer to the user-supplied ARC4 key.\r
- @param[in] KeySize Size of ARC4 key in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Arc4Init (\r
- OUT VOID *Arc4Context,\r
- IN CONST UINT8 *Key,\r
- IN UINTN KeySize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Performs ARC4 encryption on a data buffer of the specified size.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] Arc4Context Pointer to the ARC4 context.\r
- @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
- @param[in] InputSize Size of the Input buffer in bytes.\r
- @param[out] Output Pointer to a buffer that receives the ARC4 encryption output.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Arc4Encrypt (\r
- IN OUT VOID *Arc4Context,\r
- IN CONST UINT8 *Input,\r
- IN UINTN InputSize,\r
- OUT UINT8 *Output\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Performs ARC4 decryption on a data buffer of the specified size.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] Arc4Context Pointer to the ARC4 context.\r
- @param[in] Input Pointer to the buffer containing the data to be decrypted.\r
- @param[in] InputSize Size of the Input buffer in bytes.\r
- @param[out] Output Pointer to a buffer that receives the ARC4 decryption output.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Arc4Decrypt (\r
- IN OUT VOID *Arc4Context,\r
- IN UINT8 *Input,\r
- IN UINTN InputSize,\r
- OUT UINT8 *Output\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Resets the ARC4 context to the initial state.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] Arc4Context Pointer to the ARC4 context.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Arc4Reset (\r
- IN OUT VOID *Arc4Context\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
+++ /dev/null
-/** @file\r
- TDES Wrapper Implementation which does not provide real capabilities.\r
-\r
-Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-/**\r
- Retrieves the size, in bytes, of the context buffer required for TDES operations.\r
-\r
- Return zero to indicate this interface is not supported.\r
-\r
- @retval 0 This interface is not supported.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-TdesGetContextSize (\r
- VOID\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return 0;\r
-}\r
-\r
-/**\r
- Initializes user-supplied memory as TDES context for subsequent use.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[out] TdesContext Pointer to TDES context being initialized.\r
- @param[in] Key Pointer to the user-supplied TDES key.\r
- @param[in] KeyLength Length of TDES key in bits.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-TdesInit (\r
- OUT VOID *TdesContext,\r
- IN CONST UINT8 *Key,\r
- IN UINTN KeyLength\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Performs TDES encryption on a data buffer of the specified size in ECB mode.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] TdesContext Pointer to the TDES context.\r
- @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
- @param[in] InputSize Size of the Input buffer in bytes.\r
- @param[out] Output Pointer to a buffer that receives the TDES encryption output.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-TdesEcbEncrypt (\r
- IN VOID *TdesContext,\r
- IN CONST UINT8 *Input,\r
- IN UINTN InputSize,\r
- OUT UINT8 *Output\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Performs TDES decryption on a data buffer of the specified size in ECB mode.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] TdesContext Pointer to the TDES context.\r
- @param[in] Input Pointer to the buffer containing the data to be decrypted.\r
- @param[in] InputSize Size of the Input buffer in bytes.\r
- @param[out] Output Pointer to a buffer that receives the TDES decryption output.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-TdesEcbDecrypt (\r
- IN VOID *TdesContext,\r
- IN CONST UINT8 *Input,\r
- IN UINTN InputSize,\r
- OUT UINT8 *Output\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Performs TDES encryption on a data buffer of the specified size in CBC mode.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] TdesContext Pointer to the TDES context.\r
- @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
- @param[in] InputSize Size of the Input buffer in bytes.\r
- @param[in] Ivec Pointer to initialization vector.\r
- @param[out] Output Pointer to a buffer that receives the TDES encryption output.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-TdesCbcEncrypt (\r
- IN VOID *TdesContext,\r
- IN CONST UINT8 *Input,\r
- IN UINTN InputSize,\r
- IN CONST UINT8 *Ivec,\r
- OUT UINT8 *Output\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Performs TDES decryption on a data buffer of the specified size in CBC mode.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] TdesContext Pointer to the TDES context.\r
- @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
- @param[in] InputSize Size of the Input buffer in bytes.\r
- @param[in] Ivec Pointer to initialization vector.\r
- @param[out] Output Pointer to a buffer that receives the TDES encryption output.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-TdesCbcDecrypt (\r
- IN VOID *TdesContext,\r
- IN CONST UINT8 *Input,\r
- IN UINTN InputSize,\r
- IN CONST UINT8 *Ivec,\r
- OUT UINT8 *Output\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
+++ /dev/null
-/** @file\r
- MD4 Digest Wrapper Implementation which does not provide real capabilities.\r
-\r
-Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-/**\r
- Retrieves the size, in bytes, of the context buffer required for MD4 hash\r
- operations.\r
-\r
- Return zero to indicate this interface is not supported.\r
-\r
- @retval 0 This interface is not supported.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-Md4GetContextSize (\r
- VOID\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return 0;\r
-}\r
-\r
-/**\r
- Initializes user-supplied memory pointed by Md4Context as MD4 hash context for\r
- subsequent use.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[out] Md4Context Pointer to MD4 context being initialized.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Md4Init (\r
- OUT VOID *Md4Context\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Makes a copy of an existing MD4 context.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] Md4Context Pointer to MD4 context being copied.\r
- @param[out] NewMd4Context Pointer to new MD4 context.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Md4Duplicate (\r
- IN CONST VOID *Md4Context,\r
- OUT VOID *NewMd4Context\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Digests the input data and updates MD4 context.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] Md4Context Pointer to the MD4 context.\r
- @param[in] Data Pointer to the buffer containing the data to be hashed.\r
- @param[in] DataSize Size of Data buffer in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Md4Update (\r
- IN OUT VOID *Md4Context,\r
- IN CONST VOID *Data,\r
- IN UINTN DataSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Completes computation of the MD4 digest value.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] Md4Context Pointer to the MD4 context.\r
- @param[out] HashValue Pointer to a buffer that receives the MD4 digest\r
- value (16 bytes).\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Md4Final (\r
- IN OUT VOID *Md4Context,\r
- OUT UINT8 *HashValue\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
+++ /dev/null
-/** @file\r
- MD5 Digest Wrapper Implementation which does not provide real capabilities.\r
-\r
-Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-\r
-/**\r
- Retrieves the size, in bytes, of the context buffer required for MD5 hash operations.\r
-\r
- Return zero to indicate this interface is not supported.\r
-\r
- @retval 0 This interface is not supported.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-Md5GetContextSize (\r
- VOID\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return 0;\r
-}\r
-\r
-\r
-/**\r
- Initializes user-supplied memory pointed by Md5Context as MD5 hash context for\r
- subsequent use.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[out] Md5Context Pointer to MD5 context being initialized.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Md5Init (\r
- OUT VOID *Md5Context\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Makes a copy of an existing MD5 context.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] Md5Context Pointer to MD5 context being copied.\r
- @param[out] NewMd5Context Pointer to new MD5 context.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Md5Duplicate (\r
- IN CONST VOID *Md5Context,\r
- OUT VOID *NewMd5Context\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Digests the input data and updates MD5 context.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] Md5Context Pointer to the MD5 context.\r
- @param[in] Data Pointer to the buffer containing the data to be hashed.\r
- @param[in] DataSize Size of Data buffer in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Md5Update (\r
- IN OUT VOID *Md5Context,\r
- IN CONST VOID *Data,\r
- IN UINTN DataSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Completes computation of the MD5 digest value.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] Md5Context Pointer to the MD5 context.\r
- @param[out] HashValue Pointer to a buffer that receives the MD5 digest\r
- value (16 bytes).\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Md5Final (\r
- IN OUT VOID *Md5Context,\r
- OUT UINT8 *HashValue\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
+++ /dev/null
-/** @file\r
- SHA-1 Digest Wrapper Implementation which does not provide real capabilities.\r
-\r
-Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-\r
-/**\r
- Retrieves the size, in bytes, of the context buffer required for SHA-1 hash operations.\r
-\r
- Return zero to indicate this interface is not supported.\r
-\r
- @return The size, in bytes, of the context buffer required for SHA-1 hash operations.\r
- @retval 0 This interface is not supported.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-Sha1GetContextSize (\r
- VOID\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return 0;\r
-}\r
-\r
-/**\r
- Initializes user-supplied memory pointed by Sha1Context as SHA-1 hash context for\r
- subsequent use.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[out] Sha1Context Pointer to SHA-1 context being initialized.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Sha1Init (\r
- OUT VOID *Sha1Context\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Makes a copy of an existing SHA-1 context.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] Sha1Context Pointer to SHA-1 context being copied.\r
- @param[out] NewSha1Context Pointer to new SHA-1 context.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Sha1Duplicate (\r
- IN CONST VOID *Sha1Context,\r
- OUT VOID *NewSha1Context\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Digests the input data and updates SHA-1 context.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] Sha1Context Pointer to the SHA-1 context.\r
- @param[in] Data Pointer to the buffer containing the data to be hashed.\r
- @param[in] DataSize Size of Data buffer in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Sha1Update (\r
- IN OUT VOID *Sha1Context,\r
- IN CONST VOID *Data,\r
- IN UINTN DataSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Completes computation of the SHA-1 digest value.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] Sha1Context Pointer to the SHA-1 context.\r
- @param[out] HashValue Pointer to a buffer that receives the SHA-1 digest\r
- value (20 bytes).\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Sha1Final (\r
- IN OUT VOID *Sha1Context,\r
- OUT UINT8 *HashValue\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
+++ /dev/null
-/** @file\r
- HMAC-MD5 Wrapper Implementation which does not provide real capabilities.\r
-\r
-Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-/**\r
- Retrieves the size, in bytes, of the context buffer required for HMAC-MD5 operations.\r
-\r
- Return zero to indicate this interface is not supported.\r
-\r
- @retval 0 This interface is not supported.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-HmacMd5GetContextSize (\r
- VOID\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return 0;\r
-}\r
-\r
-/**\r
- Initializes user-supplied memory pointed by HmacMd5Context as HMAC-MD5 context for\r
- subsequent use.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[out] HmacMd5Context Pointer to HMAC-MD5 context being initialized.\r
- @param[in] Key Pointer to the user-supplied key.\r
- @param[in] KeySize Key size in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-HmacMd5Init (\r
- OUT VOID *HmacMd5Context,\r
- IN CONST UINT8 *Key,\r
- IN UINTN KeySize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Makes a copy of an existing HMAC-MD5 context.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] HmacMd5Context Pointer to HMAC-MD5 context being copied.\r
- @param[out] NewHmacMd5Context Pointer to new HMAC-MD5 context.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-HmacMd5Duplicate (\r
- IN CONST VOID *HmacMd5Context,\r
- OUT VOID *NewHmacMd5Context\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Digests the input data and updates HMAC-MD5 context.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context.\r
- @param[in] Data Pointer to the buffer containing the data to be digested.\r
- @param[in] DataSize Size of Data buffer in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-HmacMd5Update (\r
- IN OUT VOID *HmacMd5Context,\r
- IN CONST VOID *Data,\r
- IN UINTN DataSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Completes computation of the HMAC-MD5 digest value.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context.\r
- @param[out] HmacValue Pointer to a buffer that receives the HMAC-MD5 digest\r
- value (16 bytes).\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-HmacMd5Final (\r
- IN OUT VOID *HmacMd5Context,\r
- OUT UINT8 *HmacValue\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
+++ /dev/null
-/** @file\r
- HMAC-SHA1 Wrapper Implementation which does not provide real capabilities.\r
-\r
-Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-/**\r
- Retrieves the size, in bytes, of the context buffer required for HMAC-SHA1 operations.\r
-\r
- Return zero to indicate this interface is not supported.\r
-\r
- @retval 0 This interface is not supported.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-HmacSha1GetContextSize (\r
- VOID\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return 0;\r
-}\r
-\r
-/**\r
- Initializes user-supplied memory pointed by HmacSha1Context as HMAC-SHA1 context for\r
- subsequent use.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[out] HmacSha1Context Pointer to HMAC-SHA1 context being initialized.\r
- @param[in] Key Pointer to the user-supplied key.\r
- @param[in] KeySize Key size in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-HmacSha1Init (\r
- OUT VOID *HmacSha1Context,\r
- IN CONST UINT8 *Key,\r
- IN UINTN KeySize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Makes a copy of an existing HMAC-SHA1 context.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] HmacSha1Context Pointer to HMAC-SHA1 context being copied.\r
- @param[out] NewHmacSha1Context Pointer to new HMAC-SHA1 context.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-HmacSha1Duplicate (\r
- IN CONST VOID *HmacSha1Context,\r
- OUT VOID *NewHmacSha1Context\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Digests the input data and updates HMAC-SHA1 context.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] HmacSha1Context Pointer to the HMAC-SHA1 context.\r
- @param[in] Data Pointer to the buffer containing the data to be digested.\r
- @param[in] DataSize Size of Data buffer in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-HmacSha1Update (\r
- IN OUT VOID *HmacSha1Context,\r
- IN CONST VOID *Data,\r
- IN UINTN DataSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Completes computation of the HMAC-SHA1 digest value.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] HmacSha1Context Pointer to the HMAC-SHA1 context.\r
- @param[out] HmacValue Pointer to a buffer that receives the HMAC-SHA1 digest\r
- value (20 bytes).\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-HmacSha1Final (\r
- IN OUT VOID *HmacSha1Context,\r
- OUT UINT8 *HmacValue\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
+++ /dev/null
-/** @file\r
- Internal include file for BaseCryptLibRuntimeCryptProtocol.\r
-\r
-Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#ifndef __INTERNAL_CRYPT_LIB_H__\r
-#define __INTERNAL_CRYPT_LIB_H__\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/BaseCryptLib.h>\r
-\r
-#endif\r
-\r
+++ /dev/null
-/** @file\r
- PEM (Privacy Enhanced Mail) Format Handler Wrapper Implementation which does\r
- not provide real capabilities.\r
-\r
-Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-/**\r
- Retrieve the RSA Private Key from the password-protected PEM key data.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] PemData Pointer to the PEM-encoded key data to be retrieved.\r
- @param[in] PemSize Size of the PEM key data in bytes.\r
- @param[in] Password NULL-terminated passphrase used for encrypted PEM key data.\r
- @param[out] RsaContext Pointer to new-generated RSA context which contain the retrieved\r
- RSA private key component. Use RsaFree() function to free the\r
- resource.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RsaGetPrivateKeyFromPem (\r
- IN CONST UINT8 *PemData,\r
- IN UINTN PemSize,\r
- IN CONST CHAR8 *Password,\r
- OUT VOID **RsaContext\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
+++ /dev/null
-/** @file\r
- Authenticode Portable Executable Signature Verification which does not provide\r
- real capabilities.\r
-\r
-Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-/**\r
- Verifies the validity of a PE/COFF Authenticode Signature as described in "Windows\r
- Authenticode Portable Executable Signature Format".\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] AuthData Pointer to the Authenticode Signature retrieved from signed\r
- PE/COFF image to be verified.\r
- @param[in] DataSize Size of the Authenticode Signature in bytes.\r
- @param[in] TrustedCert Pointer to a trusted/root certificate encoded in DER, which\r
- is used for certificate chain verification.\r
- @param[in] CertSize Size of the trusted certificate in bytes.\r
- @param[in] ImageHash Pointer to the original image file hash value. The procedure\r
- for calculating the image hash value is described in Authenticode\r
- specification.\r
- @param[in] HashSize Size of Image hash value in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-AuthenticodeVerify (\r
- IN CONST UINT8 *AuthData,\r
- IN UINTN DataSize,\r
- IN CONST UINT8 *TrustedCert,\r
- IN UINTN CertSize,\r
- IN CONST UINT8 *ImageHash,\r
- IN UINTN HashSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
+++ /dev/null
-/** @file\r
- Diffie-Hellman Wrapper Implementation which does not provide\r
- real capabilities.\r
-\r
-Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-/**\r
- Allocates and Initializes one Diffie-Hellman Context for subsequent use.\r
-\r
- @return Pointer to the Diffie-Hellman Context that has been initialized.\r
- If the interface is not supported, DhNew() returns NULL.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-DhNew (\r
- VOID\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return NULL;\r
-}\r
-\r
-/**\r
- Release the specified DH context.\r
-\r
- If the interface is not supported, then ASSERT().\r
-\r
- @param[in] DhContext Pointer to the DH context to be released.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-DhFree (\r
- IN VOID *DhContext\r
- )\r
-{\r
- ASSERT (FALSE);\r
-}\r
-\r
-/**\r
- Generates DH parameter.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] DhContext Pointer to the DH context.\r
- @param[in] Generator Value of generator.\r
- @param[in] PrimeLength Length in bits of prime to be generated.\r
- @param[out] Prime Pointer to the buffer to receive the generated prime number.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-DhGenerateParameter (\r
- IN OUT VOID *DhContext,\r
- IN UINTN Generator,\r
- IN UINTN PrimeLength,\r
- OUT UINT8 *Prime\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Sets generator and prime parameters for DH.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] DhContext Pointer to the DH context.\r
- @param[in] Generator Value of generator.\r
- @param[in] PrimeLength Length in bits of prime to be generated.\r
- @param[in] Prime Pointer to the prime number.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-DhSetParameter (\r
- IN OUT VOID *DhContext,\r
- IN UINTN Generator,\r
- IN UINTN PrimeLength,\r
- IN CONST UINT8 *Prime\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Generates DH public key.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] DhContext Pointer to the DH context.\r
- @param[out] PublicKey Pointer to the buffer to receive generated public key.\r
- @param[in, out] PublicKeySize On input, the size of PublicKey buffer in bytes.\r
- On output, the size of data returned in PublicKey buffer in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-DhGenerateKey (\r
- IN OUT VOID *DhContext,\r
- OUT UINT8 *PublicKey,\r
- IN OUT UINTN *PublicKeySize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Computes exchanged common key.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] DhContext Pointer to the DH context.\r
- @param[in] PeerPublicKey Pointer to the peer's public key.\r
- @param[in] PeerPublicKeySize Size of peer's public key in bytes.\r
- @param[out] Key Pointer to the buffer to receive generated key.\r
- @param[in, out] KeySize On input, the size of Key buffer in bytes.\r
- On output, the size of data returned in Key buffer in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-DhComputeKey (\r
- IN OUT VOID *DhContext,\r
- IN CONST UINT8 *PeerPublicKey,\r
- IN UINTN PeerPublicKeySize,\r
- OUT UINT8 *Key,\r
- IN OUT UINTN *KeySize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
+++ /dev/null
-/** @file\r
- PKCS#7 SignedData Sign Wrapper Implementation which does not provide real\r
- capabilities.\r
-\r
-Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-/**\r
- Creates a PKCS#7 signedData as described in "PKCS #7: Cryptographic Message\r
- Syntax Standard, version 1.5". This interface is only intended to be used for\r
- application to perform PKCS#7 functionality validation.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] PrivateKey Pointer to the PEM-formatted private key data for\r
- data signing.\r
- @param[in] PrivateKeySize Size of the PEM private key data in bytes.\r
- @param[in] KeyPassword NULL-terminated passphrase used for encrypted PEM\r
- key data.\r
- @param[in] InData Pointer to the content to be signed.\r
- @param[in] InDataSize Size of InData in bytes.\r
- @param[in] SignCert Pointer to signer's DER-encoded certificate to sign with.\r
- @param[in] OtherCerts Pointer to an optional additional set of certificates to\r
- include in the PKCS#7 signedData (e.g. any intermediate\r
- CAs in the chain).\r
- @param[out] SignedData Pointer to output PKCS#7 signedData.\r
- @param[out] SignedDataSize Size of SignedData in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Pkcs7Sign (\r
- IN CONST UINT8 *PrivateKey,\r
- IN UINTN PrivateKeySize,\r
- IN CONST UINT8 *KeyPassword,\r
- IN UINT8 *InData,\r
- IN UINTN InDataSize,\r
- IN UINT8 *SignCert,\r
- IN UINT8 *OtherCerts OPTIONAL,\r
- OUT UINT8 **SignedData,\r
- OUT UINTN *SignedDataSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
+++ /dev/null
-/** @file\r
- PKCS#7 SignedData Verification Wrapper Implementation which does not provide\r
- real capabilities.\r
-\r
-Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-/**\r
- Get the signer's certificates from PKCS#7 signed data as described in "PKCS #7:\r
- Cryptographic Message Syntax Standard". The input signed data could be wrapped\r
- in a ContentInfo structure.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] P7Data Pointer to the PKCS#7 message to verify.\r
- @param[in] P7Length Length of the PKCS#7 message in bytes.\r
- @param[out] CertStack Pointer to Signer's certificates retrieved from P7Data.\r
- It's caller's responsibility to free the buffer.\r
- @param[out] StackLength Length of signer's certificates in bytes.\r
- @param[out] TrustedCert Pointer to a trusted certificate from Signer's certificates.\r
- It's caller's responsibility to free the buffer.\r
- @param[out] CertLength Length of the trusted certificate in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Pkcs7GetSigners (\r
- IN CONST UINT8 *P7Data,\r
- IN UINTN P7Length,\r
- OUT UINT8 **CertStack,\r
- OUT UINTN *StackLength,\r
- OUT UINT8 **TrustedCert,\r
- OUT UINTN *CertLength\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Wrap function to use free() to free allocated memory for certificates.\r
-\r
- If the interface is not supported, then ASSERT().\r
-\r
- @param[in] Certs Pointer to the certificates to be freed.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-Pkcs7FreeSigners (\r
- IN UINT8 *Certs\r
- )\r
-{\r
- ASSERT (FALSE);\r
-}\r
-\r
-/**\r
- Retrieves all embedded certificates from PKCS#7 signed data as described in "PKCS #7:\r
- Cryptographic Message Syntax Standard", and outputs two certificate lists chained and\r
- unchained to the signer's certificates.\r
- The input signed data could be wrapped in a ContentInfo structure.\r
-\r
- @param[in] P7Data Pointer to the PKCS#7 message.\r
- @param[in] P7Length Length of the PKCS#7 message in bytes.\r
- @param[out] SignerChainCerts Pointer to the certificates list chained to signer's\r
- certificate. It's caller's responsibility to free the buffer.\r
- @param[out] ChainLength Length of the chained certificates list buffer in bytes.\r
- @param[out] UnchainCerts Pointer to the unchained certificates lists. It's caller's\r
- responsibility to free the buffer.\r
- @param[out] UnchainLength Length of the unchained certificates list buffer in bytes.\r
-\r
- @retval TRUE The operation is finished successfully.\r
- @retval FALSE Error occurs during the operation.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Pkcs7GetCertificatesList (\r
- IN CONST UINT8 *P7Data,\r
- IN UINTN P7Length,\r
- OUT UINT8 **SignerChainCerts,\r
- OUT UINTN *ChainLength,\r
- OUT UINT8 **UnchainCerts,\r
- OUT UINTN *UnchainLength\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Verifies the validity of a PKCS#7 signed data as described in "PKCS #7:\r
- Cryptographic Message Syntax Standard". The input signed data could be wrapped\r
- in a ContentInfo structure.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] P7Data Pointer to the PKCS#7 message to verify.\r
- @param[in] P7Length Length of the PKCS#7 message in bytes.\r
- @param[in] TrustedCert Pointer to a trusted/root certificate encoded in DER, which\r
- is used for certificate chain verification.\r
- @param[in] CertLength Length of the trusted certificate in bytes.\r
- @param[in] InData Pointer to the content to be verified.\r
- @param[in] DataLength Length of InData in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Pkcs7Verify (\r
- IN CONST UINT8 *P7Data,\r
- IN UINTN P7Length,\r
- IN CONST UINT8 *TrustedCert,\r
- IN UINTN CertLength,\r
- IN CONST UINT8 *InData,\r
- IN UINTN DataLength\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Extracts the attached content from a PKCS#7 signed data if existed. The input signed\r
- data could be wrapped in a ContentInfo structure.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] P7Data Pointer to the PKCS#7 signed data to process.\r
- @param[in] P7Length Length of the PKCS#7 signed data in bytes.\r
- @param[out] Content Pointer to the extracted content from the PKCS#7 signedData.\r
- It's caller's responsibility to free the buffer.\r
- @param[out] ContentSize The size of the extracted content in bytes.\r
-\r
- @retval TRUE The P7Data was correctly formatted for processing.\r
- @retval FALSE The P7Data was not correctly formatted for processing.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Pkcs7GetAttachedContent (\r
- IN CONST UINT8 *P7Data,\r
- IN UINTN P7Length,\r
- OUT VOID **Content,\r
- OUT UINTN *ContentSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
+++ /dev/null
-/** @file\r
- RSA Asymmetric Cipher Wrapper Implementation over OpenSSL.\r
-\r
- This file does not provide real capabilities for following APIs in RSA handling:\r
- 1) RsaGetKey\r
- 2) RsaGenerateKey\r
- 3) RsaCheckKey\r
- 4) RsaPkcs1Sign\r
-\r
-Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-/**\r
- Gets the tag-designated RSA key component from the established RSA context.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] RsaContext Pointer to RSA context being set.\r
- @param[in] KeyTag Tag of RSA key component being set.\r
- @param[out] BigNumber Pointer to octet integer buffer.\r
- @param[in, out] BnSize On input, the size of big number buffer in bytes.\r
- On output, the size of data returned in big number buffer in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RsaGetKey (\r
- IN OUT VOID *RsaContext,\r
- IN RSA_KEY_TAG KeyTag,\r
- OUT UINT8 *BigNumber,\r
- IN OUT UINTN *BnSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Generates RSA key components.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] RsaContext Pointer to RSA context being set.\r
- @param[in] ModulusLength Length of RSA modulus N in bits.\r
- @param[in] PublicExponent Pointer to RSA public exponent.\r
- @param[in] PublicExponentSize Size of RSA public exponent buffer in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RsaGenerateKey (\r
- IN OUT VOID *RsaContext,\r
- IN UINTN ModulusLength,\r
- IN CONST UINT8 *PublicExponent,\r
- IN UINTN PublicExponentSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Validates key components of RSA context.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] RsaContext Pointer to RSA context to check.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RsaCheckKey (\r
- IN VOID *RsaContext\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Carries out the RSA-SSA signature generation with EMSA-PKCS1-v1_5 encoding scheme.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] RsaContext Pointer to RSA context for signature generation.\r
- @param[in] MessageHash Pointer to octet message hash to be signed.\r
- @param[in] HashSize Size of the message hash in bytes.\r
- @param[out] Signature Pointer to buffer to receive RSA PKCS1-v1_5 signature.\r
- @param[in, out] SigSize On input, the size of Signature buffer in bytes.\r
- On output, the size of data returned in Signature buffer in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RsaPkcs1Sign (\r
- IN VOID *RsaContext,\r
- IN CONST UINT8 *MessageHash,\r
- IN UINTN HashSize,\r
- OUT UINT8 *Signature,\r
- IN OUT UINTN *SigSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-\r
+++ /dev/null
-/** @file\r
- X.509 Certificate Handler Wrapper Implementation which does not provide\r
- real capabilities.\r
-\r
-Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-/**\r
- Construct a X509 object from DER-encoded certificate data.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] Cert Pointer to the DER-encoded certificate data.\r
- @param[in] CertSize The size of certificate data in bytes.\r
- @param[out] SingleX509Cert The generated X509 object.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-X509ConstructCertificate (\r
- IN CONST UINT8 *Cert,\r
- IN UINTN CertSize,\r
- OUT UINT8 **SingleX509Cert\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Construct a X509 stack object from a list of DER-encoded certificate data.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in, out] X509Stack On input, pointer to an existing or NULL X509 stack object.\r
- On output, pointer to the X509 stack object with new\r
- inserted X509 certificate.\r
- @param ... A list of DER-encoded single certificate data followed\r
- by certificate size. A NULL terminates the list. The\r
- pairs are the arguments to X509ConstructCertificate().\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-X509ConstructCertificateStack (\r
- IN OUT UINT8 **X509Stack,\r
- ...\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Release the specified X509 object.\r
-\r
- If the interface is not supported, then ASSERT().\r
-\r
- @param[in] X509Cert Pointer to the X509 object to be released.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-X509Free (\r
- IN VOID *X509Cert\r
- )\r
-{\r
- ASSERT (FALSE);\r
-}\r
-\r
-/**\r
- Release the specified X509 stack object.\r
-\r
- If the interface is not supported, then ASSERT().\r
-\r
- @param[in] X509Stack Pointer to the X509 stack object to be released.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-X509StackFree (\r
- IN VOID *X509Stack\r
- )\r
-{\r
- ASSERT (FALSE);\r
-}\r
-\r
-/**\r
- Retrieve the subject bytes from one X.509 certificate.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] Cert Pointer to the DER-encoded X509 certificate.\r
- @param[in] CertSize Size of the X509 certificate in bytes.\r
- @param[out] CertSubject Pointer to the retrieved certificate subject bytes.\r
- @param[in, out] SubjectSize The size in bytes of the CertSubject buffer on input,\r
- and the size of buffer returned CertSubject on output.\r
-\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-X509GetSubjectName (\r
- IN CONST UINT8 *Cert,\r
- IN UINTN CertSize,\r
- OUT UINT8 *CertSubject,\r
- IN OUT UINTN *SubjectSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Retrieve the common name (CN) string from one X.509 certificate.\r
-\r
- Return RETURN_UNSUPPORTED to indicate this interface is not supported.\r
-\r
- @param[in] Cert Pointer to the DER-encoded X509 certificate.\r
- @param[in] CertSize Size of the X509 certificate in bytes.\r
- @param[out] CommonName Buffer to contain the retrieved certificate common\r
- name string. At most CommonNameSize bytes will be\r
- written and the string will be null terminated. May be\r
- NULL in order to determine the size buffer needed.\r
- @param[in,out] CommonNameSize The size in bytes of the CommonName buffer on input,\r
- and the size of buffer returned CommonName on output.\r
- If CommonName is NULL then the amount of space needed\r
- in buffer (including the final null) is returned.\r
-\r
- @retval RETURN_UNSUPPORTED The operation is not supported.\r
-\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-X509GetCommonName (\r
- IN CONST UINT8 *Cert,\r
- IN UINTN CertSize,\r
- OUT CHAR8 *CommonName, OPTIONAL\r
- IN OUT UINTN *CommonNameSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return RETURN_UNSUPPORTED;\r
-}\r
-\r
-/**\r
- Retrieve the RSA Public Key from one DER-encoded X509 certificate.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] Cert Pointer to the DER-encoded X509 certificate.\r
- @param[in] CertSize Size of the X509 certificate in bytes.\r
- @param[out] RsaContext Pointer to new-generated RSA context which contain the retrieved\r
- RSA public key component. Use RsaFree() function to free the\r
- resource.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RsaGetPublicKeyFromX509 (\r
- IN CONST UINT8 *Cert,\r
- IN UINTN CertSize,\r
- OUT VOID **RsaContext\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Verify one X509 certificate was issued by the trusted CA.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] Cert Pointer to the DER-encoded X509 certificate to be verified.\r
- @param[in] CertSize Size of the X509 certificate in bytes.\r
- @param[in] CACert Pointer to the DER-encoded trusted CA certificate.\r
- @param[in] CACertSize Size of the CA Certificate in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-X509VerifyCert (\r
- IN CONST UINT8 *Cert,\r
- IN UINTN CertSize,\r
- IN CONST UINT8 *CACert,\r
- IN UINTN CACertSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Retrieve the TBSCertificate from one given X.509 certificate.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] Cert Pointer to the given DER-encoded X509 certificate.\r
- @param[in] CertSize Size of the X509 certificate in bytes.\r
- @param[out] TBSCert DER-Encoded To-Be-Signed certificate.\r
- @param[out] TBSCertSize Size of the TBS certificate in bytes.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-X509GetTBSCert (\r
- IN CONST UINT8 *Cert,\r
- IN UINTN CertSize,\r
- OUT UINT8 **TBSCert,\r
- OUT UINTN *TBSCertSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
+++ /dev/null
-/** @file\r
- Pseudorandom Number Generator Wrapper Implementation which does not provide\r
- real capabilities.\r
-\r
-Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "InternalCryptLib.h"\r
-\r
-\r
-/**\r
- Sets up the seed value for the pseudorandom number generator.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] Seed Pointer to seed value.\r
- If NULL, default seed is used.\r
- @param[in] SeedSize Size of seed value.\r
- If Seed is NULL, this parameter is ignored.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RandomSeed (\r
- IN CONST UINT8 *Seed OPTIONAL,\r
- IN UINTN SeedSize\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-/**\r
- Generates a pseudorandom byte stream of the specified size.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[out] Output Pointer to buffer to receive random value.\r
- @param[in] Size Size of random bytes to generate.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RandomBytes (\r
- OUT UINT8 *Output,\r
- IN UINTN Size\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
+++ /dev/null
-/** @file\r
- Implementation of The runtime cryptographic library instance (for IPF).\r
-\r
-Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <Uefi.h>\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/UefiRuntimeLib.h>\r
-\r
-#include <Protocol/RuntimeCrypt.h>\r
-\r
-#include <Guid/EventGroup.h>\r
-\r
-EFI_RUNTIME_CRYPT_PROTOCOL *mCryptProtocol = NULL;\r
-EFI_EVENT mIpfCryptLibVirtualNotifyEvent;\r
-\r
-/**\r
- Notification function of EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, which converts\r
- pointer to new virtual address.\r
-\r
- @param Event Event whose notification function is being invoked.\r
- @param Context Pointer to the notification function's context\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-IpfCryptLibAddressChangeEvent (\r
- IN EFI_EVENT Event,\r
- IN VOID *Context\r
- )\r
-{\r
- //\r
- // Convert Address of Runtime Crypto Protocol.\r
- //\r
- EfiConvertPointer (0x0, (VOID **) &mCryptProtocol);\r
-}\r
-\r
-/**\r
- Constructor of IPF Crypto Library Instance.\r
- This function locates the Runtime Crypt Protocol and register notification\r
- function for EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event.\r
-\r
- @param ImageHandle The firmware allocated handle for the EFI image.\r
- @param SystemTable A pointer to the EFI System Table.\r
-\r
- @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-RuntimeDxeIpfCryptLibConstructor (\r
- IN EFI_HANDLE ImageHandle,\r
- IN EFI_SYSTEM_TABLE *SystemTable\r
- )\r
-{\r
- EFI_STATUS Status;\r
-\r
- //\r
- // Locate Runtime Crypt Protocol Instance\r
- //\r
- Status = gBS->LocateProtocol (\r
- &gEfiRuntimeCryptProtocolGuid,\r
- NULL,\r
- (VOID**) &mCryptProtocol\r
- );\r
- ASSERT_EFI_ERROR (Status);\r
- ASSERT (mCryptProtocol != NULL);\r
-\r
- //\r
- // Register SetVirtualAddressMap () notify function\r
- //\r
- Status = gBS->CreateEventEx (\r
- EVT_NOTIFY_SIGNAL,\r
- TPL_NOTIFY,\r
- IpfCryptLibAddressChangeEvent,\r
- NULL,\r
- &gEfiEventVirtualAddressChangeGuid,\r
- &mIpfCryptLibVirtualNotifyEvent\r
- );\r
- ASSERT_EFI_ERROR (Status);\r
-\r
- return Status;\r
-}\r
-\r
-/**\r
- Destructor of IPF Crypto Library Instance.\r
-\r
- @param ImageHandle The firmware allocated handle for the EFI image.\r
- @param SystemTable A pointer to the EFI System Table.\r
-\r
- @retval EFI_SUCCESS The destructor completed successfully.\r
- @retval Other value The destructor did not complete successfully.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-RuntimeDxeIpfCryptLibDestructor (\r
- IN EFI_HANDLE ImageHandle,\r
- IN EFI_SYSTEM_TABLE *SystemTable\r
- )\r
-{\r
- EFI_STATUS Status;\r
-\r
- //\r
- // Close the Set Virtual Address Map event\r
- //\r
- Status = gBS->CloseEvent (mIpfCryptLibVirtualNotifyEvent);\r
- ASSERT_EFI_ERROR (Status);\r
-\r
- return Status;\r
-}\r
-\r
-/**\r
- Check whether crypto service provided by Runtime Crypt protocol is ready to use.\r
-\r
- Crypto service is available if the call is in physical mode prior to\r
- SetVirtualAddressMap() or virtual mode after SetVirtualAddressMap(). If either\r
- of these two conditions are met, this routine will return TRUE; if neither of\r
- these conditions are met, this routine will return FALSE.\r
-\r
- @retval TRUE The Crypto service is ready to use.\r
- @retval FALSE The Crypto service is not available.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-InternalIsCryptServiveAvailable (\r
- VOID\r
- )\r
-{\r
- INT64 CpuMode;\r
- BOOLEAN GoneVirtual;\r
-\r
- CpuMode = AsmCpuVirtual();\r
- if (CpuMode < 0) {\r
- //\r
- // CPU is in mixed mode, return failing the operation gracefully.\r
- //\r
- return FALSE;\r
- }\r
-\r
- GoneVirtual = EfiGoneVirtual();\r
-\r
- if ((CpuMode > 0) && !GoneVirtual) {\r
- //\r
- // CPU is in virtual mode, but SetVirtualAddressMap() has not been called,\r
- // so return failing the operation gracefully.\r
- //\r
- return FALSE;\r
- }\r
-\r
- if ((CpuMode == 0) && GoneVirtual) {\r
- //\r
- // CPU is in physical mode, but SetVirtualAddressMap() has been called,\r
- // so return failing the operation gracefully.\r
- //\r
- return FALSE;\r
- }\r
-\r
- return TRUE;\r
-}\r
-\r
-/**\r
- Retrieves the size, in bytes, of the context buffer required for SHA-256 operations.\r
-\r
- @return The size, in bytes, of the context buffer required for SHA-256 operations.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-Sha256GetContextSize (\r
- VOID\r
- )\r
-{\r
- if (!InternalIsCryptServiveAvailable ()) {\r
- return 0;\r
- }\r
-\r
- return mCryptProtocol->Sha256GetContextSize ();\r
-}\r
-\r
-/**\r
- Initializes user-supplied memory pointed by Sha256Context as SHA-256 hash context for\r
- subsequent use.\r
-\r
- If Sha256Context is NULL, then return FALSE.\r
-\r
- @param[in, out] Sha256Context Pointer to SHA-256 Context being initialized.\r
-\r
- @retval TRUE SHA-256 context initialization succeeded.\r
- @retval FALSE SHA-256 context initialization failed.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Sha256Init (\r
- IN OUT VOID *Sha256Context\r
- )\r
-{\r
- if (!InternalIsCryptServiveAvailable ()) {\r
- return FALSE;\r
- }\r
-\r
- return mCryptProtocol->Sha256Init (Sha256Context);\r
-}\r
-\r
-\r
-/**\r
- Makes a copy of an existing SHA-256 context.\r
-\r
- Return FALSE to indicate this interface is not supported.\r
-\r
- @param[in] Sha256Context Pointer to SHA-256 context being copied.\r
- @param[out] NewSha256Context Pointer to new SHA-256 context.\r
-\r
- @retval FALSE This interface is not supported.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Sha256Duplicate (\r
- IN CONST VOID *Sha256Context,\r
- OUT VOID *NewSha256Context\r
- )\r
-{\r
- ASSERT (FALSE);\r
- return FALSE;\r
-}\r
-\r
-\r
-/**\r
- Performs SHA-256 digest on a data buffer of the specified length. This function can\r
- be called multiple times to compute the digest of long or discontinuous data streams.\r
-\r
- If Sha256Context is NULL, then return FALSE.\r
-\r
- @param[in, out] Sha256Context Pointer to the SHA-256 context.\r
- @param[in] Data Pointer to the buffer containing the data to be hashed.\r
- @param[in] DataLength Length of Data buffer in bytes.\r
-\r
- @retval TRUE SHA-256 data digest succeeded.\r
- @retval FALSE Invalid SHA-256 context. After Sha256Final function has been called, the\r
- SHA-256 context cannot be reused.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Sha256Update (\r
- IN OUT VOID *Sha256Context,\r
- IN CONST VOID *Data,\r
- IN UINTN DataLength\r
- )\r
-{\r
- if (!InternalIsCryptServiveAvailable ()) {\r
- return FALSE;\r
- }\r
-\r
- return mCryptProtocol->Sha256Update (Sha256Context, Data, DataLength);\r
-}\r
-\r
-/**\r
- Completes SHA-256 hash computation and retrieves the digest value into the specified\r
- memory. After this function has been called, the SHA-256 context cannot be used again.\r
-\r
- If Sha256Context is NULL, then return FALSE.\r
- If HashValue is NULL, then return FALSE.\r
-\r
- @param[in, out] Sha256Context Pointer to SHA-256 context\r
- @param[out] HashValue Pointer to a buffer that receives the SHA-256 digest\r
- value (32 bytes).\r
-\r
- @retval TRUE SHA-256 digest computation succeeded.\r
- @retval FALSE SHA-256 digest computation failed.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-Sha256Final (\r
- IN OUT VOID *Sha256Context,\r
- OUT UINT8 *HashValue\r
- )\r
-{\r
- if (!InternalIsCryptServiveAvailable ()) {\r
- return FALSE;\r
- }\r
-\r
- return mCryptProtocol->Sha256Final (Sha256Context, HashValue);\r
-}\r
-\r
-/**\r
- Allocates and initializes one RSA context for subsequent use.\r
-\r
- @return Pointer to the RSA context that has been initialized.\r
- If the allocations fails, RsaNew() returns NULL.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-RsaNew (\r
- VOID\r
- )\r
-{\r
- if (!InternalIsCryptServiveAvailable ()) {\r
- return FALSE;\r
- }\r
-\r
- return mCryptProtocol->RsaNew ();\r
-}\r
-\r
-/**\r
- Release the specified RSA context.\r
-\r
- @param[in] RsaContext Pointer to the RSA context to be released.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-RsaFree (\r
- IN VOID *RsaContext\r
- )\r
-{\r
- if (!InternalIsCryptServiveAvailable ()) {\r
- return;\r
- }\r
-\r
- mCryptProtocol->RsaFree (RsaContext);\r
-}\r
-\r
-/**\r
- Sets the tag-designated key component into the established RSA context.\r
-\r
- This function sets the tag-designated RSA key component into the established\r
- RSA context from the user-specified non-negative integer (octet string format\r
- represented in RSA PKCS#1).\r
- If BigNumber is NULL, then the specified key component in RSA context is cleared.\r
-\r
- If RsaContext is NULL, then return FALSE.\r
-\r
- @param[in, out] RsaContext Pointer to RSA context being set.\r
- @param[in] KeyTag Tag of RSA key component being set.\r
- @param[in] BigNumber Pointer to octet integer buffer.\r
- If NULL, then the specified key component in RSA\r
- context is cleared.\r
- @param[in] BnSize Size of big number buffer in bytes.\r
- If BigNumber is NULL, then it is ignored.\r
-\r
- @retval TRUE RSA key component was set successfully.\r
- @retval FALSE Invalid RSA key component tag.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RsaSetKey (\r
- IN OUT VOID *RsaContext,\r
- IN RSA_KEY_TAG KeyTag,\r
- IN CONST UINT8 *BigNumber,\r
- IN UINTN BnSize\r
- )\r
-{\r
- if (!InternalIsCryptServiveAvailable ()) {\r
- return FALSE;\r
- }\r
-\r
- return mCryptProtocol->RsaSetKey (RsaContext, KeyTag, BigNumber, BnSize);\r
-}\r
-\r
-/**\r
- Verifies the RSA-SSA signature with EMSA-PKCS1-v1_5 encoding scheme defined in\r
- RSA PKCS#1.\r
-\r
- If RsaContext is NULL, then return FALSE.\r
- If MessageHash is NULL, then return FALSE.\r
- If Signature is NULL, then return FALSE.\r
- If HashSize is not equal to the size of MD5, SHA-1 or SHA-256 digest, then return FALSE.\r
-\r
- @param[in] RsaContext Pointer to RSA context for signature verification.\r
- @param[in] MessageHash Pointer to octet message hash to be checked.\r
- @param[in] HashSize Size of the message hash in bytes.\r
- @param[in] Signature Pointer to RSA PKCS1-v1_5 signature to be verified.\r
- @param[in] SigSize Size of signature in bytes.\r
-\r
- @retval TRUE Valid signature encoded in PKCS1-v1_5.\r
- @retval FALSE Invalid signature or invalid RSA context.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-RsaPkcs1Verify (\r
- IN VOID *RsaContext,\r
- IN CONST UINT8 *MessageHash,\r
- IN UINTN HashSize,\r
- IN CONST UINT8 *Signature,\r
- IN UINTN SigSize\r
- )\r
-{\r
- if (!InternalIsCryptServiveAvailable ()) {\r
- return FALSE;\r
- }\r
-\r
- return mCryptProtocol->RsaPkcs1Verify (\r
- RsaContext,\r
- MessageHash,\r
- HashSize,\r
- Signature,\r
- SigSize\r
- );\r
-}\r
## @file\r
# Intrinsic Routines Wrapper Library Instance.\r
#\r
-# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
#\r
# The following information is for reference only and not required by the build tools.\r
#\r
-# VALID_ARCHITECTURES = IA32 X64 IPF\r
+# VALID_ARCHITECTURES = IA32 X64\r
#\r
\r
[Sources]\r
[Sources.X64]\r
CopyMem.c\r
\r
-[Sources.IPF]\r
- CopyMem.c | MSFT\r
- CopyMem.c | INTEL\r
-#\r
-# In tools_def.txt, GCC rename symbol name memcpy to be CopyMem for IPF,\r
-# i.e. "DEFINE GCC_IPF_SYMRENAME_FLAGS = --redefine-sym memcpy=CopyMem",\r
-# so there will be no source file CopyMem.c for GCC compiler family.\r
-#\r
-\r
[Packages]\r
MdePkg/MdePkg.dec\r
\r
MSFT:RELEASE_*_IA32_CC_FLAGS == /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF\r
MSFT:DEBUG_*_X64_CC_FLAGS == /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1b2s /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm\r
MSFT:RELEASE_*_X64_CC_FLAGS == /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1b2s /Gy /FIAutoGen.h /EHs-c- /GR- /GF\r
- MSFT:DEBUG_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /FIAutoGen.h /QIPF_fr32 /Zi\r
- MSFT:RELEASE_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /FIAutoGen.h /QIPF_fr32\r
INTEL:*_*_*_CC_FLAGS = /Oi-\r
## @file\r
# This module provides OpenSSL Library implementation.\r
#\r
-# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
DEFINE OPENSSL_FLAGS = -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DNO_SYSLOG\r
\r
#\r
-# VALID_ARCHITECTURES = IA32 X64 IPF ARM AARCH64\r
+# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64\r
#\r
\r
[Sources]\r
#\r
MSFT:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4244 /wd4245 /wd4267 /wd4389 /wd4702 /wd4706 /wd4819\r
MSFT:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4244 /wd4245 /wd4267 /wd4306 /wd4389 /wd4702 /wd4706 /wd4819\r
- MSFT:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4244 /wd4245 /wd4267 /wd4306 /wd4389 /wd4702 /wd4706 /wd4819\r
\r
INTEL:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w\r
INTEL:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w\r
- INTEL:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w\r
\r
#\r
# Suppress the following build warnings in openssl so we don't break the build with -Werror\r
#\r
GCC:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized\r
GCC:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=format -Wno-format -DNO_MSABI_VA_FUNCS\r
- GCC:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format\r
GCC:*_*_ARM_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized\r
GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format\r
\r
## @file\r
# This module provides OpenSSL Library implementation.\r
#\r
-# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
DEFINE OPENSSL_FLAGS = -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DNO_SYSLOG\r
\r
#\r
-# VALID_ARCHITECTURES = IA32 X64 IPF ARM AARCH64\r
+# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64\r
#\r
\r
[Sources]\r
#\r
MSFT:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4244 /wd4245 /wd4267 /wd4389 /wd4702 /wd4706 /wd4819\r
MSFT:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4244 /wd4245 /wd4267 /wd4306 /wd4389 /wd4702 /wd4706 /wd4819\r
- MSFT:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4244 /wd4245 /wd4267 /wd4306 /wd4389 /wd4702 /wd4706 /wd4819\r
\r
INTEL:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w\r
INTEL:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w\r
- INTEL:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w\r
\r
#\r
# Suppress the following build warnings in openssl so we don't break the build with -Werror\r
#\r
GCC:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized\r
GCC:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=format -Wno-format -DNO_MSABI_VA_FUNCS\r
- GCC:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format\r
GCC:*_*_ARM_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized\r
GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format\r
\r
## @file\r
# SSL/TLS Wrapper Library Instance based on OpenSSL.\r
#\r
-# Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
#\r
# The following information is for reference only and not required by the build tools.\r
#\r
-# VALID_ARCHITECTURES = IA32 X64 IPF ARM AARCH64\r
+# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64\r
#\r
\r
[Sources]\r