|
@@ -17,6 +17,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
17
|
17
|
|
18
|
18
|
struct uri;
|
19
|
19
|
struct pixel_buffer;
|
|
20
|
+struct asn1_cursor;
|
20
|
21
|
struct image_type;
|
21
|
22
|
|
22
|
23
|
/** An executable image */
|
|
@@ -99,6 +100,19 @@ struct image_type {
|
99
|
100
|
* @ret rc Return status code
|
100
|
101
|
*/
|
101
|
102
|
int ( * pixbuf ) ( struct image *image, struct pixel_buffer **pixbuf );
|
|
103
|
+ /**
|
|
104
|
+ * Extract ASN.1 object from image
|
|
105
|
+ *
|
|
106
|
+ * @v image Image
|
|
107
|
+ * @v offset Offset within image
|
|
108
|
+ * @v cursor ASN.1 cursor to fill in
|
|
109
|
+ * @ret next Offset to next image, or negative error
|
|
110
|
+ *
|
|
111
|
+ * The caller is responsible for eventually calling free() on
|
|
112
|
+ * the allocated ASN.1 cursor.
|
|
113
|
+ */
|
|
114
|
+ int ( * asn1 ) ( struct image *image, size_t offset,
|
|
115
|
+ struct asn1_cursor **cursor );
|
102
|
116
|
};
|
103
|
117
|
|
104
|
118
|
/**
|
|
@@ -170,6 +184,8 @@ extern int image_select ( struct image *image );
|
170
|
184
|
extern struct image * image_find_selected ( void );
|
171
|
185
|
extern int image_set_trust ( int require_trusted, int permanent );
|
172
|
186
|
extern int image_pixbuf ( struct image *image, struct pixel_buffer **pixbuf );
|
|
187
|
+extern int image_asn1 ( struct image *image, size_t offset,
|
|
188
|
+ struct asn1_cursor **cursor );
|
173
|
189
|
|
174
|
190
|
/**
|
175
|
191
|
* Increment reference count on an image
|