libtropic
C library for TROPIC01 chip
lt_asn1_der.h File Reference

ASN1 DER parser. More...

#include "libtropic_common.h"
Include dependency graph for lt_asn1_der.h:

Macros

#define OBJ_ID_CURVEX25519   0x2B656E
 

Enumerations

enum  asn1der_obj_kind_t {
  ASN1DER_BOOLEAN = 0x01 , ASN1DER_INTEGER = 0x02 , ASN1DER_STRING_BIT = 0x03 , ASN1DER_STRING_OCTET = 0x04 ,
  ASN1DER_STRING_NULL = 0x05 , ASN1DER_OBJECT_IDENTIFIER = 0x06 , ASN1DER_STRING_UTF8 = 0x0C , ASN1DER_STRING_PRINTABLE = 0x13 ,
  ASN1DER_UTC_TIME = 0x17 , ASN1DER_SEQUENCE = 0x30
}
 
enum  asn1der_crop_kind_t { ASN1DER_CROP_SUFFIX , ASN1DER_CROP_PREFIX }
 

Functions

lt_ret_t asn1der_find_object (const uint8_t *stream, uint16_t len, int32_t obj_id, uint8_t *buf, int buf_len, enum asn1der_crop_kind_t crop_kind)
 Parse ASN1 DER encoded stream and find certain OBJECT. Return data from primitve type right after the OBJECT_IDENTIFIER. If multiple objects of the searched OBJECT_KIND are present, return only first one. More...
 

Detailed Description

Author
Tropic Square s.r.o.
License
For the license see file LICENSE.txt file in the root directory of this source tree.