SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.h File Reference


Data Structures

struct  WIN_CERTIFICATE_EFI_PKCS
struct  HASH_TABLE

Defines

#define EFI_CERT_TYPE_RSA2048_SHA256_SIZE   256
#define EFI_CERT_TYPE_RSA2048_SIZE   256
#define MAX_NOTIFY_STRING_LEN   64
#define TWO_BYTE_ENCODE   0x82
#define ALIGNMENT_SIZE   8
#define ALIGN_SIZE(a)   (((a) % ALIGNMENT_SIZE) ? ALIGNMENT_SIZE - ((a) % ALIGNMENT_SIZE) : 0)
#define IMAGE_UNKNOWN   0x00000000
#define IMAGE_FROM_FV   0x00000001
#define IMAGE_FROM_OPTION_ROM   0x00000002
#define IMAGE_FROM_REMOVABLE_MEDIA   0x00000003
#define IMAGE_FROM_FIXED_MEDIA   0x00000004
#define ALWAYS_EXECUTE   0x00000000
#define NEVER_EXECUTE   0x00000001
#define ALLOW_EXECUTE_ON_SECURITY_VIOLATION   0x00000002
#define DEFER_EXECUTE_ON_SECURITY_VIOLATION   0x00000003
#define DENY_EXECUTE_ON_SECURITY_VIOLATION   0x00000004
#define QUERY_USER_ON_SECURITY_VIOLATION   0x00000005
#define HASHALG_SHA1   0x00000000
#define HASHALG_SHA224   0x00000001
#define HASHALG_SHA256   0x00000002
#define HASHALG_SHA384   0x00000003
#define HASHALG_SHA512   0x00000004
#define HASHALG_MAX   0x00000005
#define MAX_DIGEST_SIZE   SHA512_DIGEST_SIZE

Typedefs

typedef UINTN(EFIAPI * HASH_GET_CONTEXT_SIZE )(VOID)
typedef BOOLEAN(EFIAPI * HASH_INIT )(IN OUT VOID *HashContext)
typedef BOOLEAN(EFIAPI * HASH_UPDATE )(IN OUT VOID *HashContext, IN CONST VOID *Data, IN UINTN DataLength)
typedef BOOLEAN(EFIAPI * HASH_FINAL )(IN OUT VOID *HashContext, OUT UINT8 *HashValue)

Detailed Description

The internal header file includes the common header files, defines internal structure and functions used by ImageVerificationLib.

Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.


Define Documentation

#define ALIGN_SIZE (  )     (((a) % ALIGNMENT_SIZE) ? ALIGNMENT_SIZE - ((a) % ALIGNMENT_SIZE) : 0)

#define ALIGNMENT_SIZE   8

#define ALLOW_EXECUTE_ON_SECURITY_VIOLATION   0x00000002

#define ALWAYS_EXECUTE   0x00000000

#define DEFER_EXECUTE_ON_SECURITY_VIOLATION   0x00000003

#define DENY_EXECUTE_ON_SECURITY_VIOLATION   0x00000004

#define EFI_CERT_TYPE_RSA2048_SHA256_SIZE   256

#define EFI_CERT_TYPE_RSA2048_SIZE   256

#define HASHALG_MAX   0x00000005

#define HASHALG_SHA1   0x00000000

Referenced by HashPeImage().

#define HASHALG_SHA224   0x00000001

#define HASHALG_SHA256   0x00000002

#define HASHALG_SHA384   0x00000003

#define HASHALG_SHA512   0x00000004

#define IMAGE_FROM_FIXED_MEDIA   0x00000004

#define IMAGE_FROM_FV   0x00000001

#define IMAGE_FROM_OPTION_ROM   0x00000002

#define IMAGE_FROM_REMOVABLE_MEDIA   0x00000003

#define IMAGE_UNKNOWN   0x00000000

#define MAX_DIGEST_SIZE   SHA512_DIGEST_SIZE

#define MAX_NOTIFY_STRING_LEN   64

#define NEVER_EXECUTE   0x00000001

#define QUERY_USER_ON_SECURITY_VIOLATION   0x00000005

#define TWO_BYTE_ENCODE   0x82

Referenced by HashPeImageByType().


Typedef Documentation

typedef BOOLEAN(EFIAPI * HASH_FINAL)(IN OUT VOID *HashContext, OUT UINT8 *HashValue)

Completes hash computation and retrieves the digest value into the specified memory. After this function has been called, the context cannot be used again.

If HashContext is NULL, then ASSERT(). If HashValue is NULL, then ASSERT().

Parameters:
[in,out] HashContext Pointer to the MD5 context
[out] HashValue Pointer to a buffer that receives the HASH digest value.
Return values:
TRUE HASH digest computation succeeded.
FALSE HASH digest computation failed.

typedef UINTN(EFIAPI * HASH_GET_CONTEXT_SIZE)(VOID)

Retrieves the size, in bytes, of the context buffer required for hash operations.

Returns:
The size, in bytes, of the context buffer required for hash operations.

typedef BOOLEAN(EFIAPI * HASH_INIT)(IN OUT VOID *HashContext)

Initializes user-supplied memory pointed by HashContext as hash context for subsequent use.

If HashContext is NULL, then ASSERT().

Parameters:
[in,out] HashContext Pointer to Context being initialized.
Return values:
TRUE HASH context initialization succeeded.
FALSE HASH context initialization failed.

typedef BOOLEAN(EFIAPI * HASH_UPDATE)(IN OUT VOID *HashContext, IN CONST VOID *Data, IN UINTN DataLength)

Performs digest on a data buffer of the specified length. This function can be called multiple times to compute the digest of long or discontinuous data streams.

If HashContext is NULL, then ASSERT().

Parameters:
[in,out] HashContext Pointer to the MD5 context.
[in] Data Pointer to the buffer containing the data to be hashed.
[in] DataLength Length of Data buffer in bytes.
Return values:
TRUE HASH data digest succeeded.
FALSE Invalid HASH context. After HashFinal function has been called, the HASH context cannot be reused.


Generated on Thu Sep 24 23:44:24 2015 for SecurityPkg[ALL] by  doxygen 1.5.7.1