You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

asn1.h 647B

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