00001
00002 #ifndef __JBXL_JBXL_ASN1_NODE_H_
00003 #define __JBXL_JBXL_ASN1_NODE_H_
00004
00005 #include "buffer.h"
00006 #include "asn1_tool.h"
00007
00008
00009
00010
00011
00012 #define JBXL_ASN1_ANCHOR 0xff
00013
00014 #define JBXL_ASN1_PRIMITIVE 0x00
00015 #define JBXL_ASN1_CNSTRCTD 0x20
00016
00017 #define JBXL_ASN1_UNIVERSAL 0x00
00018 #define JBXL_ASN1_APPLI 0x40
00019 #define JBXL_ASN1_CONTEXT 0x80
00020 #define JBXL_ASN1_PRIVATE 0xc0
00021
00022 #define JBXL_ASN1_END 0x00
00023 #define JBXL_ASN1_BOOL 0x01
00024 #define JBXL_ASN1_INT 0x02
00025 #define JBXL_ASN1_BIT 0x03
00026 #define JBXL_ASN1_OCT 0x04
00027 #define JBXL_ASN1_NULL 0x05
00028 #define JBXL_ASN1_OBJ 0x06
00029 #define JBXL_ASN1_DSC 0x07
00030 #define JBXL_ASN1_EXT 0x08
00031 #define JBXL_ASN1_REAL 0x09
00032 #define JBXL_ASN1_ENU 0x0a
00033 #define JBXL_ASN1_EMB 0x0b
00034 #define JBXL_ASN1_UTF8 0x0c
00035 #define JBXL_ASN1_OID 0x0d
00036 #define JBXL_ASN1_SEQ 0x10
00037 #define JBXL_ASN1_SET 0x11
00038
00039 #define JBXL_ASN1_NMSTR 0x12
00040 #define JBXL_ASN1_PRSTR 0x13
00041 #define JBXL_ASN1_TLSTR 0x14
00042 #define JBXL_ASN1_VDSTR 0x15
00043 #define JBXL_ASN1_IA5 0x16
00044 #define JBXL_ASN1_UTC 0x17
00045 #define JBXL_ASN1_GTM 0x18
00046 #define JBXL_ASN1_GRSTR 0x19
00047 #define JBXL_ASN1_VSSTR 0x1a
00048 #define JBXL_ASN1_GNSTR 0x1b
00049 #define JBXL_ASN1_UNSTR 0x1c
00050 #define JBXL_ASN1_CHSTR 0x1d
00051 #define JBXL_ASN1_BMSTR 0x1e
00052
00053 #define JBXL_ASN1_SEQ_CNSTRCTD 0x30
00054 #define JBXL_ASN1_SET_CNSTRCTD 0x31
00055
00056
00057 void asn1_print_id(FILE* fp, int id);
00058 void asn1_id_type(int id, int* type, int* cnst, int* tag);
00059 void asn1_print_tag_value(FILE* fp, int tag, Buffer buf);
00060
00061
00062
00063 #endif // __JBXL_JBXL_ASN1_TOOL_H_