Libtropic API
SDK for the TROPIC01 secure element
Version: master (latest)
Loading...
Searching...
No Matches
lt_asn1_der.h File Reference

ASN1 DER parser. More...

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

Macros

#define LT_OBJ_ID_CURVEX25519   0x2B656E
 

Typedefs

typedef enum lt_asn1der_obj_kind_t lt_asn1der_obj_kind_t
 
typedef enum lt_asn1der_crop_kind_t lt_asn1der_crop_kind_t
 

Enumerations

enum  lt_asn1der_obj_kind_t {
  LT_ASN1DER_BOOLEAN = 0x01 , LT_ASN1DER_INTEGER = 0x02 , LT_ASN1DER_STRING_BIT = 0x03 , LT_ASN1DER_STRING_OCTET = 0x04 ,
  LT_ASN1DER_STRING_NULL = 0x05 , LT_ASN1DER_OBJECT_IDENTIFIER = 0x06 , LT_ASN1DER_STRING_UTF8 = 0x0C , LT_ASN1DER_STRING_PRINTABLE = 0x13 ,
  LT_ASN1DER_UTC_TIME = 0x17 , LT_ASN1DER_SEQUENCE = 0x30
}
 
enum  lt_asn1der_crop_kind_t { LT_ASN1DER_CROP_SUFFIX , LT_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 lt_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.
 

Detailed Description

License
For the license see file LICENSE.txt file in the root directory of this source tree.