62 *cursor =
malloc (
sizeof ( **cursor ) + remaining );
65 raw = ( ( (
void * ) *cursor ) +
sizeof ( **cursor ) );
68 (*cursor)->data =
raw;
69 (*cursor)->len = remaining;
75 return (
offset + (*cursor)->len );
94 DBGC (
image,
"DER %s is not valid ASN.1: %s\n",
128 DBGC (
image,
"DER %s could not extract ASN.1: %s\n",
static int der_image_asn1(struct image *image, size_t offset, struct asn1_cursor **cursor)
Extract ASN.1 object from DER image.
struct arbelprm_rc_send_wqe rc
const void * data
Read-only data.
#define ENOEXEC
Exec format error.
const void * data
Start of data.
An executable image type.
#define PROBE_NORMAL
Normal image probe priority.
char * name
Name of this image type.
size_t len
Length of data.
#define ENOMEM
Not enough space.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
char * strerror(int errno)
Retrieve string representation of error number.
size_t len
Length of raw file image.
int asn1_shrink_any(struct asn1_cursor *cursor)
Shrink ASN.1 object of any type.
#define ASN1_SEQUENCE
ASN.1 sequence.
uint32_t next
Next descriptor address.
void * malloc(size_t size)
Allocate memory.
static int der_image_probe(struct image *image)
Probe DER image.
int asn1_skip(struct asn1_cursor *cursor, unsigned int type)
Skip ASN.1 object.
uint8_t data[48]
Additional event data.
int der_asn1(const void *data, size_t len, size_t offset, struct asn1_cursor **cursor)
Extract ASN.1 object from DER data.
uint16_t offset
Offset to command line.
struct image_type der_image_type __image_type(PROBE_NORMAL)
DER image type.