25#ifndef PROTOCORE_DER_H
26#define PROTOCORE_DER_H
34#define PROTOCORE_DER_BOOLEAN 0x01u
35#define PROTOCORE_DER_INTEGER 0x02u
36#define PROTOCORE_DER_BIT_STRING 0x03u
37#define PROTOCORE_DER_OCTET_STRING 0x04u
38#define PROTOCORE_DER_NULL 0x05u
39#define PROTOCORE_DER_OID 0x06u
40#define PROTOCORE_DER_UTF8_STRING 0x0Cu
41#define PROTOCORE_DER_PRINTABLE_STRING 0x13u
42#define PROTOCORE_DER_IA5_STRING 0x16u
43#define PROTOCORE_DER_UTC_TIME 0x17u
44#define PROTOCORE_DER_GENERALIZED_TIME 0x18u
45#define PROTOCORE_DER_SEQUENCE 0x30u
46#define PROTOCORE_DER_SET 0x31u
50#define PROTOCORE_DER_CONSTRUCTED 0x20u
53#define PROTOCORE_DER_CONTEXT(n) (0x80u | (uint8_t)(n))
54#define PROTOCORE_DER_CONTEXT_CONSTRUCTED(n) (0xA0u | (uint8_t)(n))
118 void (*
const read)(uint8_t *work);
119 void (*
const enter)(uint8_t *work);
120 void (*
const uint)(uint8_t *work);
121 void (*
const bitstring)(uint8_t *work);
122 void (*
const oid_eq)(uint8_t *work);
123 void (*
const time)(uint8_t *work);
139static const DerNs Der __attribute__((unused)) = {
void protocore_der_oid_eq(uint8_t *work)
void protocore_der_time(uint8_t *work)
void protocore_der_enter(uint8_t *work)
DerVars DerV
The operands and the outcome.
void protocore_der_uint(uint8_t *work)
void protocore_der_bitstring(uint8_t *work)
void protocore_der_read(uint8_t *work)
void(*const read)(uint8_t *work)
An object identifier a comparison names, in its encoded form (X.690 sec 8.19).
const uint8_t * oid
the OID's content octets, without the tag and length
The bytes a read walks, and where in them it starts.
const uint8_t * buf
the encoding, the caller's
size_t len
how much of it there is
size_t pos
where this read begins
One value in the caller's bytes: what it is, where its content is, and what follows.
size_t next
the offset the following value begins at
uint8_t tag
the identifier octet (X.690 sec 8.1.2)
const uint8_t * content
the content octets, in the caller's buffer
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS