mirror of
https://github.com/ipxe/ipxe
synced 2026-04-16 03:00:10 +03:00
[crypto] Remove userptr_t from ASN.1 parsers
Simplify the ASN.1 code by assuming that all objects are fully accessible via pointer dereferences. This allows the concept of "additional data beyond the end of the cursor" to be removed, and simplifies parsing of all ASN.1 image formats. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -54,14 +54,14 @@ static struct x509_chain efi_cacerts = {
|
||||
* @v offset Offset within data
|
||||
* @v next Next offset, or negative error
|
||||
*/
|
||||
static int efi_cacert ( void *data, size_t len, size_t offset ) {
|
||||
static int efi_cacert ( const void *data, size_t len, size_t offset ) {
|
||||
struct asn1_cursor *cursor;
|
||||
struct x509_certificate *cert;
|
||||
int next;
|
||||
int rc;
|
||||
|
||||
/* Extract ASN.1 object */
|
||||
next = efisig_asn1 ( virt_to_user ( data ), len, offset, &cursor );
|
||||
next = efisig_asn1 ( data, len, offset, &cursor );
|
||||
if ( next < 0 ) {
|
||||
rc = next;
|
||||
DBGC ( &efi_cacerts, "EFICA could not parse at +%#zx: %s\n",
|
||||
|
||||
Reference in New Issue
Block a user