1 /*************************************************/
3 /* Description: list of definitions and exported */
4 /* objects by coding.c and decoding.c */
5 /*************************************************/
11 #define UNIVERSAL 0x00
12 #define APPLICATION 0x40
13 #define CONTEXT_SPECIFIC 0x80
15 #define STRUCTURED 0x20
18 #define TAG_BOOLEAN 0x01
19 #define TAG_INTEGER 0x02
20 #define TAG_SEQUENCE 0x10
22 #define TAG_OCTET_STRING 0x04
23 #define TAG_BIT_STRING 0x03
24 #define TAG_UTCTime 0x17
25 #define TAG_GENERALIZEDTime 0x18
26 #define TAG_OBJECT_ID 0x06
27 #define TAG_ENUMERATED 0x0A
29 #define TAG_GENERALSTRING 0x1B
31 unsigned int _asn1_get_tag_der(const unsigned char *der
,
32 unsigned char *class,int *len
);
34 void _asn1_octet_der(const unsigned char *str
,int str_len
,
35 unsigned char *der
,int *der_len
);
37 asn1_retCode
_asn1_get_octet_der(const unsigned char *der
,
38 int *der_len
,unsigned char *str
,int str_size
, int *str_len
);
40 void _asn1_bit_der(const unsigned char *str
,int bit_len
,
41 unsigned char *der
,int *der_len
);
43 asn1_retCode
_asn1_get_bit_der(const unsigned char *der
,
44 int *der_len
,unsigned char *str
, int str_size
,
47 signed long _asn1_get_length_der(const unsigned char *der
,int *len
);
49 void _asn1_length_der(unsigned long len
,unsigned char *ans
,int *ans_len
);