Go to the source code of this file.
Macros | |
#define | OC_SB_MODEL_DEFAULT "Default" |
#define | OC_SB_MODEL_DISABLED "Disabled" |
#define | OC_SB_MODEL_LEGACY "x86legacy" |
Functions | |
EFI_STATUS EFIAPI | OcAppleImg4Verify (IN APPLE_IMG4_VERIFICATION_PROTOCOL *This, IN UINT32 ObjType, IN CONST VOID *ImageBuffer, IN UINTN ImageSize, IN UINT8 SbMode, IN CONST VOID *ManifestBuffer, IN UINTN ManifestSize, OUT UINT8 **HashDigest OPTIONAL, OUT UINTN *DigestSize OPTIONAL) |
VOID | OcAppleImg4RegisterOverride (IN CONST UINT8 *OriginalDigest, IN CONST UINT8 *Image, IN UINT32 ImageSize) |
CONST CHAR8 * | OcAppleImg4GetHardwareModel (IN CONST CHAR8 *ModelRequest) |
EFI_STATUS | OcAppleImg4BootstrapValues (IN CONST CHAR8 *Model, IN UINT64 Ecid OPTIONAL) |
APPLE_IMG4_VERIFICATION_PROTOCOL * | OcAppleImg4VerificationInstallProtocol (IN BOOLEAN Reinstall) |
Copyright (C) 2019, Download-Fritz. 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 OcAppleImg4Lib.h.
#define OC_SB_MODEL_DEFAULT "Default" |
Chooses the default model (most recent broadly supported).
Definition at line 23 of file OcAppleImg4Lib.h.
#define OC_SB_MODEL_DISABLED "Disabled" |
No secure boot mode special value.
Definition at line 28 of file OcAppleImg4Lib.h.
#define OC_SB_MODEL_LEGACY "x86legacy" |
Legacy secure boot model (for all non-gibraltar models).
Definition at line 33 of file OcAppleImg4Lib.h.
EFI_STATUS OcAppleImg4BootstrapValues | ( | IN CONST CHAR8 * | Model, |
IN UINT64 Ecid | OPTIONAL ) |
Bootstrap NVRAM and library values for secure booting.
[in] | Model | Secure boot model (without ap suffix in lower-case). |
[in] | Ecid | Secure boot ECID identifier for this model, optional. |
NULL | There was an error locating or installing the protocol. |
< Checked by calling OcAppleImg4GetHardwareModel.
Definition at line 341 of file OcAppleImg4Lib.c.
CONST CHAR8 * OcAppleImg4GetHardwareModel | ( | IN CONST CHAR8 * | ModelRequest | ) |
Obtain hardware model for secure booting from the model request.
[in] | ModelRequest | Raw model. |
Model | in lower case on success. |
NULL | on failure |
Definition at line 156 of file OcAppleImg4Lib.c.
VOID OcAppleImg4RegisterOverride | ( | IN CONST UINT8 * | OriginalDigest, |
IN CONST UINT8 * | Image, | ||
IN UINT32 | ImageSize ) |
Register digest override with SHA-384 hash. This allows to replace one image with another.
[in] | OriginalDigest | Original SHA-384 digest. |
[in] | Image | Pointer to new image. |
[in] | ImageSize | Image size. |
Definition at line 325 of file OcAppleImg4Lib.c.
APPLE_IMG4_VERIFICATION_PROTOCOL * OcAppleImg4VerificationInstallProtocol | ( | IN BOOLEAN | Reinstall | ) |
Install and initialise the Apple IMG4 verification protocol.
[in] | Reinstall | Replace any installed protocol. |
NULL | There was an error locating or installing the protocol. |
Definition at line 511 of file OcAppleImg4Lib.c.
EFI_STATUS EFIAPI OcAppleImg4Verify | ( | IN APPLE_IMG4_VERIFICATION_PROTOCOL * | This, |
IN UINT32 | ObjType, | ||
IN CONST VOID * | ImageBuffer, | ||
IN UINTN | ImageSize, | ||
IN UINT8 | SbMode, | ||
IN CONST VOID * | ManifestBuffer, | ||
IN UINTN | ManifestSize, | ||
OUT UINT8 **HashDigest | OPTIONAL, | ||
OUT UINTN *DigestSize | OPTIONAL ) |
Verify the signature of ImageBuffer against Type of its IMG4 Manifest.
[in] | This | The pointer to the current protocol instance. |
[in] | ObjType | The IMG4 object type to validate against. |
[in] | ImageBuffer | The buffer to validate. |
[in] | ImageSize | The size, in bytes, of ImageBuffer. |
[in] | SbMode | The requested IMG4 Secure Boot mode. |
[in] | ManifestBuffer | The buffer of the IMG4 Manifest. |
[in] | ManifestSize | The size, in bytes, of ManifestBuffer. |
[out] | HashDigest | On output, a pointer to ImageBuffer's digest. |
[out] | DigestSize | On output, the size, in bytes, of *HashDigest. |
EFI_SUCCESS | ImageBuffer is correctly signed. |
EFI_INVALID_PARAMETER | One or more required parameters are NULL. |
EFI_OUT_OF_RESOURCES | Not enough resources are available. |
EFI_SECURITY_VIOLATION | ImageBuffer's signature is invalid. |
Definition at line 172 of file OcAppleImg4Lib.c.