|
iPXE
|
DER-encoded ASN.1 data. More...
#include <stdlib.h>#include <string.h>#include <errno.h>#include <assert.h>#include <ipxe/asn1.h>#include <ipxe/der.h>#include <ipxe/image.h>Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| int | der_asn1 (const void *data, size_t len, size_t offset, struct asn1_cursor **cursor) |
| Extract ASN.1 object from DER data. More... | |
| static int | der_image_probe (struct image *image) |
| Probe DER image. More... | |
| static int | der_image_asn1 (struct image *image, size_t offset, struct asn1_cursor **cursor) |
| Extract ASN.1 object from DER image. More... | |
| struct image_type der_image_type | __image_type (PROBE_NORMAL) |
| DER image type. More... | |
DER-encoded ASN.1 data.
Definition in file der.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| int der_asn1 | ( | const void * | data, |
| size_t | len, | ||
| size_t | offset, | ||
| struct asn1_cursor ** | cursor | ||
| ) |
Extract ASN.1 object from DER data.
| data | DER data |
| len | Length of DER data |
| offset | Offset within data |
| cursor | ASN.1 cursor to fill in |
| next | Offset to next object, or negative error |
The caller is responsible for eventually calling free() on the allocated ASN.1 cursor.
Definition at line 52 of file der.c.
References asn1_shrink_any(), assert(), data, ENOMEM, len, malloc(), memcpy(), offset, and raw.
Referenced by der_image_asn1(), and efisig_asn1().
|
static |
Probe DER image.
| image | DER image |
| rc | Return status code |
Definition at line 84 of file der.c.
References ASN1_SEQUENCE, asn1_skip(), asn1_cursor::data, image::data, DBGC, ENOEXEC, asn1_cursor::len, image::len, image::name, rc, and strerror().
|
static |
Extract ASN.1 object from DER image.
| image | DER image |
| offset | Offset within image |
| cursor | ASN.1 cursor to fill in |
| next | Offset to next image, or negative error |
The caller is responsible for eventually calling free() on the allocated ASN.1 cursor.
Definition at line 119 of file der.c.
References image::data, DBGC, der_asn1(), image::len, image::name, next, offset, rc, and strerror().
| struct image_type zimg_image_type __image_type | ( | PROBE_NORMAL | ) |
DER image type.
Linux kernel compressed image type.
1.8.15