This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
2010-04-19 21:16:01 +02:00
|
|
|
#ifndef _IPXE_ASN1_H
|
|
|
|
#define _IPXE_ASN1_H
|
2007-04-21 20:53:26 +02:00
|
|
|
|
|
|
|
/** @file
|
|
|
|
*
|
|
|
|
* ASN.1 encoding
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2009-05-01 16:41:06 +02:00
|
|
|
FILE_LICENCE ( GPL2_OR_LATER );
|
|
|
|
|
2007-04-21 20:53:26 +02:00
|
|
|
#define ASN1_INTEGER 0x02
|
|
|
|
#define ASN1_BIT_STRING 0x03
|
|
|
|
#define ASN1_OCTET_STRING 0x04
|
|
|
|
#define ASN1_NULL 0x05
|
|
|
|
#define ASN1_OID 0x06
|
|
|
|
#define ASN1_SEQUENCE 0x30
|
|
|
|
#define ASN1_IP_ADDRESS 0x40
|
|
|
|
#define ASN1_EXPLICIT_TAG 0xa0
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A DER-encoded ASN.1 object cursor
|
|
|
|
*/
|
|
|
|
struct asn1_cursor {
|
|
|
|
/** Start of data */
|
2009-02-10 18:37:24 +01:00
|
|
|
void *data;
|
2007-04-21 20:53:26 +02:00
|
|
|
/** Length of data */
|
|
|
|
size_t len;
|
|
|
|
};
|
|
|
|
|
2009-02-10 18:37:24 +01:00
|
|
|
extern int asn1_enter ( struct asn1_cursor *cursor, unsigned int type );
|
|
|
|
extern int asn1_skip ( struct asn1_cursor *cursor, unsigned int type );
|
2007-04-21 20:53:26 +02:00
|
|
|
|
2010-04-19 21:16:01 +02:00
|
|
|
#endif /* _IPXE_ASN1_H */
|