OpenCore  1.0.4
OpenCore Bootloader
1.0.4
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
AppleEfiSignTool.c File Reference
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcMachoLib.h>
#include <Library/OcPeCoffExtLib.h>
#include <Library/OcStringLib.h>
#include <Library/PcdLib.h>
#include <UserFile.h>

Go to the source code of this file.

Macros

#define APPLE_EFI_SIGN_TOOL_VERSION   "1.1"
 

Enumerations

enum  PE_IMAGE_ARCH { PE_ARCH_32 , PE_ARCH_64 , PE_ARCH_ANY }
 

Functions

STATIC VOID PrintHelp (VOID)
 
STATIC INT32 VerifySignatureAndApfs (IN OUT UINT8 *Image, IN UINT32 ImageSize, IN OUT BOOLEAN *IsFat, IN BOOLEAN ForceFixup, IN PE_IMAGE_ARCH Arch)
 
int ENTRY_POINT (int argc, char *argv[])
 
int LLVMFuzzerTestOneInput (const uint8_t *Data, size_t Size)
 

Detailed Description

AppleEfiSignTool – Tool for signing and verifying Apple EFI binaries.

Copyright (c) 2018-2023, savvas, PMheart, vit9696, mikebeaton

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.

Definition in file AppleEfiSignTool.c.

Macro Definition Documentation

◆ APPLE_EFI_SIGN_TOOL_VERSION

#define APPLE_EFI_SIGN_TOOL_VERSION   "1.1"

Definition at line 29 of file AppleEfiSignTool.c.

Enumeration Type Documentation

◆ PE_IMAGE_ARCH

Enumerator
PE_ARCH_32 
PE_ARCH_64 
PE_ARCH_ANY 

Definition at line 31 of file AppleEfiSignTool.c.

Function Documentation

◆ ENTRY_POINT()

int ENTRY_POINT ( int argc,
char * argv[] )

Definition at line 174 of file AppleEfiSignTool.c.

◆ LLVMFuzzerTestOneInput()

int LLVMFuzzerTestOneInput ( const uint8_t * Data,
size_t Size )

Definition at line 236 of file AppleEfiSignTool.c.

◆ PrintHelp()

STATIC VOID PrintHelp ( VOID )

Definition at line 39 of file AppleEfiSignTool.c.

◆ VerifySignatureAndApfs()

STATIC INT32 VerifySignatureAndApfs ( IN OUT UINT8 * Image,
IN UINT32 ImageSize,
IN OUT BOOLEAN * IsFat,
IN BOOLEAN ForceFixup,
IN PE_IMAGE_ARCH Arch )

Verify PE image signature. Report APFS info if present.

Parameters
[in,out]ImageA pointer to image file buffer.
[in]ImageSizeSize of Image.
[out]IsFatWill be set to TRUE if Image is a FAT binary, or left unchanged otherwise.
[in]ArchImage architechure.
Returns
0 if Image is successfully verified, otherwise EXIT_FAILURE.

Definition at line 70 of file AppleEfiSignTool.c.