OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
DER_Img4Manifest.c File Reference
#include "libDER/libDER.h"
#include "libDER/asn1Types.h"
#include "libDER/DER_CertCrl.h"
#include "libDER/DER_Decode.h"
#include "libDER/DER_Keys.h"
#include "libDER/oids.h"
#include "libDERImg4.h"
#include "DER_Img4Manifest.h"
#include "Img4oids.h"

Go to the source code of this file.

Data Structures

struct  Image4CertificateInfo
 

Enumerations

enum  { Img4ManifestPropSetTypeManp = 0 , Img4ManifestPropSetTypeObjp = 1 }
 

Functions

bool DERItemCompare (const DERItem *Item1, const DERItem *Item2)
 
bool DERItemNull (const DERItem *Item)
 
DERReturn DERImg4ParseInteger64 (const DERItem *Contents, uint64_t *Result)
 
DERReturn DERImg4ParseInteger32 (const DERItem *Contents, uint32_t *Result)
 
DERReturn DERVerifySignature (const DERItem *PubKeyItem, const DERItem *SigItem, const DERItem *DataItem, const DERItem *algoOid)
 
DERReturn DERImg4ManifestVerifyCertIssuer (const Image4CertificateInfo *ChildCertInfo, const Image4CertificateInfo *ParentCertInfo)
 
DERReturn DERImg4ManifestVerifySignature (DERItem *ManCertRoleItem, const DERImg4Manifest *Manifest)
 
DERReturn DERImg4FindPropertyItem (const DERItem *PropSetItem, DERTag PropName, DERItem *PropItem)
 
DERReturn DERImg4FindDecodeProperty (const DERItem *PropSetItem, DERTag PropName, DERTag PropValueTag, DERImg4Property *Property)
 
DERReturn DERImg4DecodeProperty (const DERItem *PropItem, DERTag PropName, DERImg4Property *Property)
 
DERReturn DERImg4ManifestDecodePropertyBoolean (const DERItem *PropItem, uint32_t PropName, bool *Value)
 
DERReturn DERImg4DecodePropertyInteger32 (const DERItem *PropItem, uint32_t PropName, uint32_t *Value)
 
DERReturn DERImg4DecodePropertyInteger64 (const DERItem *PropItem, uint32_t PropName, uint64_t *Value)
 
DERReturn DERImg4ValidateCertificateRole (const DERItem *ManPropSetItem, const DERItem *ObjPropSetItem, const DERItem *ManBodyCertItem)
 
DERReturn DERImg4ManifestDecodeProperty (const DERItem *PropItem, uint32_t PropName, DERImg4ManifestInfo *ManInfo, uint32_t PropSetType)
 
DERReturn DERImg4ManifestDecodeProperties (DERImg4ManifestInfo *ManInfo, const DERItem *PropSetItem, uint32_t PropSetType)
 
DERReturn DERImg4ParseManifest (DERImg4ManifestInfo *ManInfo, const void *ManBuffer, size_t ManSize, uint32_t ObjType)
 

Detailed Description

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 DER_Img4Manifest.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
Img4ManifestPropSetTypeManp 
Img4ManifestPropSetTypeObjp 

Definition at line 33 of file DER_Img4Manifest.c.

Function Documentation

◆ DERImg4DecodeProperty()

DERReturn DERImg4DecodeProperty ( const DERItem * PropItem,
DERTag PropName,
DERImg4Property * Property )

Definition at line 658 of file DER_Img4Manifest.c.

◆ DERImg4DecodePropertyInteger32()

DERReturn DERImg4DecodePropertyInteger32 ( const DERItem * PropItem,
uint32_t PropName,
uint32_t * Value )

Definition at line 761 of file DER_Img4Manifest.c.

◆ DERImg4DecodePropertyInteger64()

DERReturn DERImg4DecodePropertyInteger64 ( const DERItem * PropItem,
uint32_t PropName,
uint64_t * Value )

Definition at line 790 of file DER_Img4Manifest.c.

◆ DERImg4FindDecodeProperty()

DERReturn DERImg4FindDecodeProperty ( const DERItem * PropSetItem,
DERTag PropName,
DERTag PropValueTag,
DERImg4Property * Property )

Definition at line 602 of file DER_Img4Manifest.c.

◆ DERImg4FindPropertyItem()

DERReturn DERImg4FindPropertyItem ( const DERItem * PropSetItem,
DERTag PropName,
DERItem * PropItem )

Definition at line 571 of file DER_Img4Manifest.c.

◆ DERImg4ManifestDecodeProperties()

DERReturn DERImg4ManifestDecodeProperties ( DERImg4ManifestInfo * ManInfo,
const DERItem * PropSetItem,
uint32_t PropSetType )

Definition at line 1152 of file DER_Img4Manifest.c.

◆ DERImg4ManifestDecodeProperty()

DERReturn DERImg4ManifestDecodeProperty ( const DERItem * PropItem,
uint32_t PropName,
DERImg4ManifestInfo * ManInfo,
uint32_t PropSetType )

Definition at line 954 of file DER_Img4Manifest.c.

◆ DERImg4ManifestDecodePropertyBoolean()

DERReturn DERImg4ManifestDecodePropertyBoolean ( const DERItem * PropItem,
uint32_t PropName,
bool * Value )

Definition at line 726 of file DER_Img4Manifest.c.

◆ DERImg4ManifestVerifyCertIssuer()

DERReturn DERImg4ManifestVerifyCertIssuer ( const Image4CertificateInfo * ChildCertInfo,
const Image4CertificateInfo * ParentCertInfo )

Definition at line 377 of file DER_Img4Manifest.c.

◆ DERImg4ManifestVerifySignature()

DERReturn DERImg4ManifestVerifySignature ( DERItem * ManCertRoleItem,
const DERImg4Manifest * Manifest )

Definition at line 443 of file DER_Img4Manifest.c.

◆ DERImg4ParseInteger32()

DERReturn DERImg4ParseInteger32 ( const DERItem * Contents,
uint32_t * Result )

Definition at line 118 of file DER_Img4Manifest.c.

◆ DERImg4ParseInteger64()

DERReturn DERImg4ParseInteger64 ( const DERItem * Contents,
uint64_t * Result )

Definition at line 71 of file DER_Img4Manifest.c.

◆ DERImg4ParseManifest()

DERReturn DERImg4ParseManifest ( DERImg4ManifestInfo * ManInfo,
const void * ManBuffer,
size_t ManSize,
uint32_t ObjType )

Verify and parse the IMG4 Manifest in ManBuffer and output its information. On success, the Manifest is guaranteed to be digitally signed with the platform-provided DERImg4RootCertificate.

Parameters
[out]ManInfoOutput Manifest information structure.
[in]ManBufferBuffer containing the Manifest data.
[in]ManSizeSize, in bytes, of ManBuffer.
[in]ObjTypeThe object type to inspect.
Return values
DR_SuccessManBuffer contains a valid, signed IMG4 Manifest and its information has been returned into ManInfo.
otherAn error has occured.

Definition at line 1230 of file DER_Img4Manifest.c.

◆ DERImg4ValidateCertificateRole()

DERReturn DERImg4ValidateCertificateRole ( const DERItem * ManPropSetItem,
const DERItem * ObjPropSetItem,
const DERItem * ManBodyCertItem )

Definition at line 819 of file DER_Img4Manifest.c.

◆ DERItemCompare()

bool DERItemCompare ( const DERItem * Item1,
const DERItem * Item2 )

Definition at line 39 of file DER_Img4Manifest.c.

◆ DERItemNull()

bool DERItemNull ( const DERItem * Item)

Definition at line 55 of file DER_Img4Manifest.c.

◆ DERVerifySignature()

DERReturn DERVerifySignature ( const DERItem * PubKeyItem,
const DERItem * SigItem,
const DERItem * DataItem,
const DERItem * algoOid )

Definition at line 143 of file DER_Img4Manifest.c.