Home | History | Annotate | Download | only in gpxe
      1 #ifndef _GPXE_ASN1_H
      2 #define _GPXE_ASN1_H
      3 
      4 /** @file
      5  *
      6  * ASN.1 encoding
      7  *
      8  */
      9 
     10 FILE_LICENCE ( GPL2_OR_LATER );
     11 
     12 #define ASN1_INTEGER 0x02
     13 #define ASN1_BIT_STRING 0x03
     14 #define ASN1_OCTET_STRING 0x04
     15 #define ASN1_NULL 0x05
     16 #define ASN1_OID 0x06
     17 #define ASN1_SEQUENCE 0x30
     18 #define ASN1_IP_ADDRESS 0x40
     19 #define ASN1_EXPLICIT_TAG 0xa0
     20 
     21 /**
     22  * A DER-encoded ASN.1 object cursor
     23  */
     24 struct asn1_cursor {
     25 	/** Start of data */
     26 	void *data;
     27 	/** Length of data */
     28 	size_t len;
     29 };
     30 
     31 extern int asn1_enter ( struct asn1_cursor *cursor, unsigned int type );
     32 extern int asn1_skip ( struct asn1_cursor *cursor, unsigned int type );
     33 
     34 #endif /* _GPXE_ASN1_H */
     35