00001
00018 #ifndef C4E_ASN1_H
00019 #define C4E_ASN1_H
00020
00021
00022
00023
00024
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028
00029
00030
00031
00032 #define C4E_ASN1_TAG_NUM_MASK (0x1fU)
00033 #define C4E_ASN1_TAG_PRIMCONST_MASK (0x20U)
00034 #define C4E_ASN1_TAG_CLASS_MASK (0xc0U)
00036 #define C4E_ASN1_TAG_CLASS_UNIVERSAL (0x00U)
00037 #define C4E_ASN1_TAG_CLASS_APPLICATION (0x40U)
00038 #define C4E_ASN1_TAG_CLASS_CONTEXT (0x80U)
00039 #define C4E_ASN1_TAG_CLASS_PRIVATE C4E_ASN1_TAG_CLASS_MASK
00041 #define C4E_ASN1_TAG_PRIMITIVE (0x00U)
00042 #define C4E_ASN1_TAG_CONSTRUCTED (0x20U)
00044 #define C4E_ASN1_TAG_ID_BOOLEAN (C4E_ASN1_TAG_CLASS_UNIVERSAL | C4E_ASN1_TAG_PRIMITIVE | 1U)
00045 #define C4E_ASN1_TAG_ID_INTEGER (C4E_ASN1_TAG_CLASS_UNIVERSAL | C4E_ASN1_TAG_PRIMITIVE | 2U)
00046 #define C4E_ASN1_TAG_ID_BITSTRING (C4E_ASN1_TAG_CLASS_UNIVERSAL | C4E_ASN1_TAG_PRIMITIVE | 3U)
00047 #define C4E_ASN1_TAG_ID_OCTETSTRING (C4E_ASN1_TAG_CLASS_UNIVERSAL | C4E_ASN1_TAG_PRIMITIVE | 4U)
00048 #define C4E_ASN1_TAG_ID_NULL (C4E_ASN1_TAG_CLASS_UNIVERSAL | C4E_ASN1_TAG_PRIMITIVE | 5U)
00049 #define C4E_ASN1_TAG_ID_OID (C4E_ASN1_TAG_CLASS_UNIVERSAL | C4E_ASN1_TAG_PRIMITIVE | 6U)
00050 #define C4E_ASN1_TAG_ID_UTF8STRING (C4E_ASN1_TAG_CLASS_UNIVERSAL | C4E_ASN1_TAG_PRIMITIVE | 12U)
00051 #define C4E_ASN1_TAG_ID_PRINTSTRING (C4E_ASN1_TAG_CLASS_UNIVERSAL | C4E_ASN1_TAG_PRIMITIVE | 19U)
00052 #define C4E_ASN1_TAG_ID_T61STRING (C4E_ASN1_TAG_CLASS_UNIVERSAL | C4E_ASN1_TAG_PRIMITIVE | 20U)
00053 #define C4E_ASN1_TAG_ID_IA5STRING (C4E_ASN1_TAG_CLASS_UNIVERSAL | C4E_ASN1_TAG_PRIMITIVE | 22U)
00054 #define C4E_ASN1_TAG_ID_UTCTIME (C4E_ASN1_TAG_CLASS_UNIVERSAL | C4E_ASN1_TAG_PRIMITIVE | 23U)
00055 #define C4E_ASN1_TAG_ID_SEQUENCE (C4E_ASN1_TAG_CLASS_UNIVERSAL | C4E_ASN1_TAG_CONSTRUCTED | 16U)
00056 #define C4E_ASN1_TAG_ID_SET (C4E_ASN1_TAG_CLASS_UNIVERSAL | C4E_ASN1_TAG_CONSTRUCTED | 17U)
00058 #define C4E_ASN1_TAG_NUM_MULTIBYTE C4E_ASN1_TAG_NUM_MASK
00070 #define C4E_ASN1_LEN_SIZE (8U)
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00105 C4E_CONST C4eArchUint8*
00106 c4e_asn1_expect_tag(C4E_CONST C4eArchUint8* C4E_RESTRICT tlv,
00107 C4eArchUint8 tag,
00108 C4eArchSize* C4E_RESTRICT plen,
00109 C4eElement* C4E_RESTRICT asn1len);
00110
00111
00112
00113 #ifdef __cplusplus
00114 }
00115 #endif
00116
00117
00118
00119 #endif
00120
00121
00122
00123
00124
00125