diff options
author | Michael Brown | 2016-07-28 16:02:15 +0200 |
---|---|---|
committer | Michael Brown | 2016-07-28 16:02:15 +0200 |
commit | 296670a6481ab8b4090c3e53fa4b8dc9518e7c69 (patch) | |
tree | 0512604b5923d4d32729131b16fe4870c32d7f32 /src/include | |
parent | [crypto] Remove obsolete extern declaration for asn1_invalidate_cursor() (diff) | |
download | ipxe-296670a6481ab8b4090c3e53fa4b8dc9518e7c69.tar.gz ipxe-296670a6481ab8b4090c3e53fa4b8dc9518e7c69.tar.xz ipxe-296670a6481ab8b4090c3e53fa4b8dc9518e7c69.zip |
[crypto] Allow for parsing of partial ASN.1 cursors
Allow code to create a partial ASN.1 cursor containing only the type
and length bytes, so that asn1_start() may be used to determine the
length of a large ASN.1 blob without first allocating memory to hold
the entire blob.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ipxe/asn1.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/ipxe/asn1.h b/src/include/ipxe/asn1.h index 70dd3eae..b0a82c00 100644 --- a/src/include/ipxe/asn1.h +++ b/src/include/ipxe/asn1.h @@ -337,6 +337,8 @@ asn1_type ( const struct asn1_cursor *cursor ) { return ( ( cursor->len >= sizeof ( *type ) ) ? *type : ASN1_END ); } +extern int asn1_start ( struct asn1_cursor *cursor, unsigned int type, + size_t extra ); extern int asn1_enter ( struct asn1_cursor *cursor, unsigned int type ); extern int asn1_skip_if_exists ( struct asn1_cursor *cursor, unsigned int type ); |