asn1t.h File Reference

#include <stddef.h>
#include <openssl/e_os2.h>
#include <openssl/asn1.h>

Go to the source code of this file.

Data Structures

struct  ASN1_TEMPLATE_st
struct  ASN1_ADB_st
struct  ASN1_ADB_TABLE_st
struct  ASN1_ITEM_st
struct  ASN1_TLC_st
struct  ASN1_COMPAT_FUNCS_st
struct  ASN1_EXTERN_FUNCS_st
struct  ASN1_PRIMITIVE_FUNCS_st
struct  ASN1_AUX_st

Defines

#define ASN1_ADB_ptr(iptr)   ((const ASN1_ADB *)(iptr))
#define ASN1_ITEM_start(itname)   OPENSSL_GLOBAL const ASN1_ITEM itname##_it = {
#define ASN1_ITEM_end(itname)   };
#define ASN1_ITEM_TEMPLATE(tname)   static const ASN1_TEMPLATE tname##_item_tt
#define ASN1_ITEM_TEMPLATE_END(tname)
#define ASN1_SEQUENCE(tname)   static const ASN1_TEMPLATE tname##_seq_tt[]
#define ASN1_SEQUENCE_END(stname)   ASN1_SEQUENCE_END_name(stname, stname)
#define ASN1_SEQUENCE_END_name(stname, tname)
#define ASN1_NDEF_SEQUENCE(tname)   ASN1_SEQUENCE(tname)
#define ASN1_SEQUENCE_cb(tname, cb)
#define ASN1_BROKEN_SEQUENCE(tname)
#define ASN1_SEQUENCE_ref(tname, cb, lck)
#define ASN1_SEQUENCE_enc(tname, enc, cb)
#define ASN1_NDEF_SEQUENCE_END(tname)
#define ASN1_BROKEN_SEQUENCE_END(stname)   ASN1_SEQUENCE_END_ref(stname, stname)
#define ASN1_SEQUENCE_END_enc(stname, tname)   ASN1_SEQUENCE_END_ref(stname, tname)
#define ASN1_SEQUENCE_END_cb(stname, tname)   ASN1_SEQUENCE_END_ref(stname, tname)
#define ASN1_SEQUENCE_END_ref(stname, tname)
#define ASN1_CHOICE(tname)   static const ASN1_TEMPLATE tname##_ch_tt[]
#define ASN1_CHOICE_cb(tname, cb)
#define ASN1_CHOICE_END(stname)   ASN1_CHOICE_END_name(stname, stname)
#define ASN1_CHOICE_END_name(stname, tname)   ASN1_CHOICE_END_selector(stname, tname, type)
#define ASN1_CHOICE_END_selector(stname, tname, selname)
#define ASN1_CHOICE_END_cb(stname, tname, selname)
#define ASN1_EX_TEMPLATE_TYPE(flags, tag, name, type)
#define ASN1_EX_TYPE(flags, tag, stname, field, type)
#define ASN1_EX_COMBINE(flags, tag, type)
#define ASN1_IMP_EX(stname, field, type, tag, ex)   ASN1_EX_TYPE(ASN1_TFLG_IMPLICIT | ex, tag, stname, field, type)
#define ASN1_EXP_EX(stname, field, type, tag, ex)   ASN1_EX_TYPE(ASN1_TFLG_EXPLICIT | ex, tag, stname, field, type)
#define ASN1_ADB_OBJECT(tblname)   { ASN1_TFLG_ADB_OID, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) }
#define ASN1_ADB_INTEGER(tblname)   { ASN1_TFLG_ADB_INT, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) }
#define ASN1_SIMPLE(stname, field, type)   ASN1_EX_TYPE(0,0, stname, field, type)
#define ASN1_OPT(stname, field, type)   ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type)
#define ASN1_IMP(stname, field, type, tag)   ASN1_IMP_EX(stname, field, type, tag, 0)
#define ASN1_IMP_OPT(stname, field, type, tag)   ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
#define ASN1_EXP(stname, field, type, tag)   ASN1_EXP_EX(stname, field, type, tag, 0)
#define ASN1_EXP_OPT(stname, field, type, tag)   ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
#define ASN1_SEQUENCE_OF(stname, field, type)   ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, stname, field, type)
#define ASN1_SEQUENCE_OF_OPT(stname, field, type)   ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type)
#define ASN1_SET_OF(stname, field, type)   ASN1_EX_TYPE(ASN1_TFLG_SET_OF, 0, stname, field, type)
#define ASN1_SET_OF_OPT(stname, field, type)   ASN1_EX_TYPE(ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type)
#define ASN1_IMP_SET_OF(stname, field, type, tag)   ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
#define ASN1_EXP_SET_OF(stname, field, type, tag)   ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
#define ASN1_IMP_SET_OF_OPT(stname, field, type, tag)   ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL)
#define ASN1_EXP_SET_OF_OPT(stname, field, type, tag)   ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL)
#define ASN1_IMP_SEQUENCE_OF(stname, field, type, tag)   ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
#define ASN1_IMP_SEQUENCE_OF_OPT(stname, field, type, tag)   ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL)
#define ASN1_EXP_SEQUENCE_OF(stname, field, type, tag)   ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
#define ASN1_EXP_SEQUENCE_OF_OPT(stname, field, type, tag)   ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL)
#define ASN1_NDEF_EXP_OPT(stname, field, type, tag)   ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_NDEF)
#define ASN1_ADB(name)   static const ASN1_ADB_TABLE name##_adbtbl[]
#define ASN1_ADB_END(name, flags, field, app_table, def, none)
#define ADB_ENTRY(val, template)   {val, template}
#define ASN1_ADB_TEMPLATE(name)   static const ASN1_TEMPLATE name##_tt
#define ASN1_TEMPLATE_item(t)   (t->item_ptr)
#define ASN1_TEMPLATE_adb(t)   (t->item_ptr)
#define ASN1_TFLG_OPTIONAL   (0x1)
#define ASN1_TFLG_SET_OF   (0x1 << 1)
#define ASN1_TFLG_SEQUENCE_OF   (0x2 << 1)
#define ASN1_TFLG_SET_ORDER   (0x3 << 1)
#define ASN1_TFLG_SK_MASK   (0x3 << 1)
#define ASN1_TFLG_IMPTAG   (0x1 << 3)
#define ASN1_TFLG_EXPTAG   (0x2 << 3)
#define ASN1_TFLG_TAG_MASK   (0x3 << 3)
#define ASN1_TFLG_IMPLICIT   ASN1_TFLG_IMPTAG|ASN1_TFLG_CONTEXT
#define ASN1_TFLG_EXPLICIT   ASN1_TFLG_EXPTAG|ASN1_TFLG_CONTEXT
#define ASN1_TFLG_UNIVERSAL   (0x0<<6)
#define ASN1_TFLG_APPLICATION   (0x1<<6)
#define ASN1_TFLG_CONTEXT   (0x2<<6)
#define ASN1_TFLG_PRIVATE   (0x3<<6)
#define ASN1_TFLG_TAG_CLASS   (0x3<<6)
#define ASN1_TFLG_ADB_MASK   (0x3<<8)
#define ASN1_TFLG_ADB_OID   (0x1<<8)
#define ASN1_TFLG_ADB_INT   (0x1<<9)
#define ASN1_TFLG_COMBINE   (0x1<<10)
#define ASN1_TFLG_NDEF   (0x1<<11)
#define ASN1_ITYPE_PRIMITIVE   0x0
#define ASN1_ITYPE_SEQUENCE   0x1
#define ASN1_ITYPE_CHOICE   0x2
#define ASN1_ITYPE_COMPAT   0x3
#define ASN1_ITYPE_EXTERN   0x4
#define ASN1_ITYPE_MSTRING   0x5
#define ASN1_ITYPE_NDEF_SEQUENCE   0x6
#define ASN1_AFLG_REFCOUNT   1
#define ASN1_AFLG_ENCODING   2
#define ASN1_AFLG_BROKEN   4
#define ASN1_OP_NEW_PRE   0
#define ASN1_OP_NEW_POST   1
#define ASN1_OP_FREE_PRE   2
#define ASN1_OP_FREE_POST   3
#define ASN1_OP_D2I_PRE   4
#define ASN1_OP_D2I_POST   5
#define ASN1_OP_I2D_PRE   6
#define ASN1_OP_I2D_POST   7
#define IMPLEMENT_ASN1_TYPE(stname)   IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0)
#define IMPLEMENT_ASN1_TYPE_ex(itname, vname, ex)
#define IMPLEMENT_ASN1_MSTRING(itname, mask)
#define IMPLEMENT_COMPAT_ASN1(sname)   IMPLEMENT_COMPAT_ASN1_type(sname, V_ASN1_SEQUENCE)
#define IMPLEMENT_COMPAT_ASN1_type(sname, tag)
#define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs)
#define IMPLEMENT_ASN1_FUNCTIONS(stname)   IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname)
#define IMPLEMENT_ASN1_FUNCTIONS_name(stname, itname)   IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, itname)
#define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name(stname, itname)   IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname)
#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname)   IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname)
#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname)
#define IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, fname)
#define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname)
#define IMPLEMENT_ASN1_NDEF_FUNCTION(stname)
#define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname)
#define IMPLEMENT_ASN1_DUP_FUNCTION(stname)
#define IMPLEMENT_ASN1_FUNCTIONS_const(name)   IMPLEMENT_ASN1_FUNCTIONS_const_fname(name, name, name)
#define IMPLEMENT_ASN1_FUNCTIONS_const_fname(stname, itname, fname)

Typedefs

typedef struct ASN1_ADB_TABLE_st ASN1_ADB_TABLE
typedef struct ASN1_ADB_st ASN1_ADB
typedef ASN1_VALUEASN1_new_func (void)
typedef void ASN1_free_func (ASN1_VALUE *a)
typedef ASN1_VALUEASN1_d2i_func (ASN1_VALUE **a, const unsigned char **in, long length)
typedef int ASN1_i2d_func (ASN1_VALUE *a, unsigned char **in)
typedef int ASN1_ex_d2i (ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx)
typedef int ASN1_ex_i2d (ASN1_VALUE **pval, unsigned char **out, const ASN1_ITEM *it, int tag, int aclass)
typedef int ASN1_ex_new_func (ASN1_VALUE **pval, const ASN1_ITEM *it)
typedef void ASN1_ex_free_func (ASN1_VALUE **pval, const ASN1_ITEM *it)
typedef int ASN1_primitive_i2c (ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN1_ITEM *it)
typedef int ASN1_primitive_c2i (ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it)
typedef struct ASN1_COMPAT_FUNCS_st ASN1_COMPAT_FUNCS
typedef struct ASN1_EXTERN_FUNCS_st ASN1_EXTERN_FUNCS
typedef struct
ASN1_PRIMITIVE_FUNCS_st 
ASN1_PRIMITIVE_FUNCS
typedef int ASN1_aux_cb (int operation, ASN1_VALUE **in, const ASN1_ITEM *it)
typedef struct ASN1_AUX_st ASN1_AUX

Functions

int ASN1_item_ex_new (ASN1_VALUE **pval, const ASN1_ITEM *it)
void ASN1_item_ex_free (ASN1_VALUE **pval, const ASN1_ITEM *it)
int ASN1_template_new (ASN1_VALUE **pval, const ASN1_TEMPLATE *tt)
int ASN1_primitive_new (ASN1_VALUE **pval, const ASN1_ITEM *it)
void ASN1_template_free (ASN1_VALUE **pval, const ASN1_TEMPLATE *tt)
int ASN1_template_d2i (ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_TEMPLATE *tt)
int ASN1_item_ex_d2i (ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx)
int ASN1_item_ex_i2d (ASN1_VALUE **pval, unsigned char **out, const ASN1_ITEM *it, int tag, int aclass)
int ASN1_template_i2d (ASN1_VALUE **pval, unsigned char **out, const ASN1_TEMPLATE *tt)
void ASN1_primitive_free (ASN1_VALUE **pval, const ASN1_ITEM *it)
int asn1_ex_i2c (ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN1_ITEM *it)
int asn1_ex_c2i (ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it)
int asn1_get_choice_selector (ASN1_VALUE **pval, const ASN1_ITEM *it)
int asn1_set_choice_selector (ASN1_VALUE **pval, int value, const ASN1_ITEM *it)
ASN1_VALUE ** asn1_get_field_ptr (ASN1_VALUE **pval, const ASN1_TEMPLATE *tt)
const ASN1_TEMPLATEasn1_do_adb (ASN1_VALUE **pval, const ASN1_TEMPLATE *tt, int nullerr)
int asn1_do_lock (ASN1_VALUE **pval, int op, const ASN1_ITEM *it)
void asn1_enc_init (ASN1_VALUE **pval, const ASN1_ITEM *it)
void asn1_enc_free (ASN1_VALUE **pval, const ASN1_ITEM *it)
int asn1_enc_restore (int *len, unsigned char **out, ASN1_VALUE **pval, const ASN1_ITEM *it)
int asn1_enc_save (ASN1_VALUE **pval, const unsigned char *in, int inlen, const ASN1_ITEM *it)


Define Documentation

#define ADB_ENTRY ( val,
template   )     {val, template}

Definition at line 416 of file asn1t.h.

#define ASN1_ADB ( name   )     static const ASN1_ADB_TABLE name##_adbtbl[]

Definition at line 377 of file asn1t.h.

#define ASN1_ADB_END ( name,
flags,
field,
app_table,
def,
none   ) 

Value:

;\
   static const ASN1_ADB name##_adb = {\
      flags,\
      offsetof(name, field),\
      app_table,\
      name##_adbtbl,\
      sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\
      def,\
      none\
   }

Definition at line 382 of file asn1t.h.

#define ASN1_ADB_INTEGER ( tblname   )     { ASN1_TFLG_ADB_INT, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) }

Definition at line 307 of file asn1t.h.

#define ASN1_ADB_OBJECT ( tblname   )     { ASN1_TFLG_ADB_OID, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) }

Definition at line 306 of file asn1t.h.

#define ASN1_ADB_ptr ( iptr   )     ((const ASN1_ADB *)(iptr))

Definition at line 80 of file asn1t.h.

#define ASN1_ADB_TEMPLATE ( name   )     static const ASN1_TEMPLATE name##_tt

Definition at line 418 of file asn1t.h.

#define ASN1_AFLG_BROKEN   4

Definition at line 711 of file asn1t.h.

#define ASN1_AFLG_ENCODING   2

Definition at line 709 of file asn1t.h.

#define ASN1_AFLG_REFCOUNT   1

Definition at line 707 of file asn1t.h.

#define ASN1_BROKEN_SEQUENCE ( tname   ) 

Value:

static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_BROKEN, 0, 0, 0, 0}; \
   ASN1_SEQUENCE(tname)

Definition at line 176 of file asn1t.h.

#define ASN1_BROKEN_SEQUENCE_END ( stname   )     ASN1_SEQUENCE_END_ref(stname, stname)

Definition at line 200 of file asn1t.h.

#define ASN1_CHOICE ( tname   )     static const ASN1_TEMPLATE tname##_ch_tt[]

Definition at line 241 of file asn1t.h.

#define ASN1_CHOICE_cb ( tname,
cb   ) 

Value:

static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \
   ASN1_CHOICE(tname)

Definition at line 244 of file asn1t.h.

#define ASN1_CHOICE_END ( stname   )     ASN1_CHOICE_END_name(stname, stname)

Definition at line 248 of file asn1t.h.

#define ASN1_CHOICE_END_cb ( stname,
tname,
selname   ) 

Value:

;\
   ASN1_ITEM_start(tname) \
      ASN1_ITYPE_CHOICE,\
      offsetof(stname,selname) ,\
      tname##_ch_tt,\
      sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
      &tname##_aux,\
      sizeof(stname),\
      #stname \
   ASN1_ITEM_end(tname)

Definition at line 264 of file asn1t.h.

#define ASN1_CHOICE_END_name ( stname,
tname   )     ASN1_CHOICE_END_selector(stname, tname, type)

Definition at line 250 of file asn1t.h.

#define ASN1_CHOICE_END_selector ( stname,
tname,
selname   ) 

Value:

;\
   ASN1_ITEM_start(tname) \
      ASN1_ITYPE_CHOICE,\
      offsetof(stname,selname) ,\
      tname##_ch_tt,\
      sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
      NULL,\
      sizeof(stname),\
      #stname \
   ASN1_ITEM_end(tname)

Definition at line 252 of file asn1t.h.

#define ASN1_EX_COMBINE ( flags,
tag,
type   ) 

Value:

{ \
   (flags)|ASN1_TFLG_COMBINE, (tag), 0, NULL, ASN1_ITEM_ref(type) }

Definition at line 292 of file asn1t.h.

#define ASN1_EX_TEMPLATE_TYPE ( flags,
tag,
name,
type   ) 

Value:

{ \
   (flags), (tag), 0,\
   #name, ASN1_ITEM_ref(type) }

Definition at line 278 of file asn1t.h.

#define ASN1_EX_TYPE ( flags,
tag,
stname,
field,
type   ) 

Value:

{ \
   (flags), (tag), offsetof(stname, field),\
   #field, ASN1_ITEM_ref(type) }

Definition at line 286 of file asn1t.h.

#define ASN1_EXP ( stname,
field,
type,
tag   )     ASN1_EXP_EX(stname, field, type, tag, 0)

Definition at line 326 of file asn1t.h.

#define ASN1_EXP_EX ( stname,
field,
type,
tag,
ex   )     ASN1_EX_TYPE(ASN1_TFLG_EXPLICIT | ex, tag, stname, field, type)

Definition at line 300 of file asn1t.h.

#define ASN1_EXP_OPT ( stname,
field,
type,
tag   )     ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)

Definition at line 327 of file asn1t.h.

#define ASN1_EXP_SEQUENCE_OF ( stname,
field,
type,
tag   )     ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)

Definition at line 365 of file asn1t.h.

#define ASN1_EXP_SEQUENCE_OF_OPT ( stname,
field,
type,
tag   )     ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL)

Definition at line 368 of file asn1t.h.

#define ASN1_EXP_SET_OF ( stname,
field,
type,
tag   )     ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)

Definition at line 350 of file asn1t.h.

#define ASN1_EXP_SET_OF_OPT ( stname,
field,
type,
tag   )     ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL)

Definition at line 356 of file asn1t.h.

#define ASN1_IMP ( stname,
field,
type,
tag   )     ASN1_IMP_EX(stname, field, type, tag, 0)

Definition at line 319 of file asn1t.h.

#define ASN1_IMP_EX ( stname,
field,
type,
tag,
ex   )     ASN1_EX_TYPE(ASN1_TFLG_IMPLICIT | ex, tag, stname, field, type)

Definition at line 297 of file asn1t.h.

#define ASN1_IMP_OPT ( stname,
field,
type,
tag   )     ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)

Definition at line 322 of file asn1t.h.

#define ASN1_IMP_SEQUENCE_OF ( stname,
field,
type,
tag   )     ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)

Definition at line 359 of file asn1t.h.

#define ASN1_IMP_SEQUENCE_OF_OPT ( stname,
field,
type,
tag   )     ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL)

Definition at line 362 of file asn1t.h.

#define ASN1_IMP_SET_OF ( stname,
field,
type,
tag   )     ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)

Definition at line 347 of file asn1t.h.

#define ASN1_IMP_SET_OF_OPT ( stname,
field,
type,
tag   )     ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL)

Definition at line 353 of file asn1t.h.

#define ASN1_ITEM_end ( itname   )     };

Definition at line 88 of file asn1t.h.

#define ASN1_ITEM_start ( itname   )     OPENSSL_GLOBAL const ASN1_ITEM itname##_it = {

Definition at line 85 of file asn1t.h.

#define ASN1_ITEM_TEMPLATE ( tname   )     static const ASN1_TEMPLATE tname##_item_tt

Definition at line 114 of file asn1t.h.

#define ASN1_ITEM_TEMPLATE_END ( tname   ) 

Value:

;\
   ASN1_ITEM_start(tname) \
      ASN1_ITYPE_PRIMITIVE,\
      -1,\
      &tname##_item_tt,\
      0,\
      NULL,\
      0,\
      #tname \
   ASN1_ITEM_end(tname)

Definition at line 117 of file asn1t.h.

#define ASN1_ITYPE_CHOICE   0x2

Definition at line 609 of file asn1t.h.

#define ASN1_ITYPE_COMPAT   0x3

Definition at line 611 of file asn1t.h.

#define ASN1_ITYPE_EXTERN   0x4

Definition at line 613 of file asn1t.h.

#define ASN1_ITYPE_MSTRING   0x5

Definition at line 615 of file asn1t.h.

#define ASN1_ITYPE_NDEF_SEQUENCE   0x6

Definition at line 617 of file asn1t.h.

#define ASN1_ITYPE_PRIMITIVE   0x0

Definition at line 605 of file asn1t.h.

#define ASN1_ITYPE_SEQUENCE   0x1

Definition at line 607 of file asn1t.h.

#define ASN1_NDEF_EXP_OPT ( stname,
field,
type,
tag   )     ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_NDEF)

Definition at line 372 of file asn1t.h.

#define ASN1_NDEF_SEQUENCE ( tname   )     ASN1_SEQUENCE(tname)

Definition at line 169 of file asn1t.h.

#define ASN1_NDEF_SEQUENCE_END ( tname   ) 

Value:

;\
   ASN1_ITEM_start(tname) \
      ASN1_ITYPE_NDEF_SEQUENCE,\
      V_ASN1_SEQUENCE,\
      tname##_seq_tt,\
      sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
      NULL,\
      sizeof(tname),\
      #tname \
   ASN1_ITEM_end(tname)

Definition at line 188 of file asn1t.h.

#define ASN1_OP_D2I_POST   5

Definition at line 720 of file asn1t.h.

#define ASN1_OP_D2I_PRE   4

Definition at line 719 of file asn1t.h.

#define ASN1_OP_FREE_POST   3

Definition at line 718 of file asn1t.h.

#define ASN1_OP_FREE_PRE   2

Definition at line 717 of file asn1t.h.

#define ASN1_OP_I2D_POST   7

Definition at line 722 of file asn1t.h.

#define ASN1_OP_I2D_PRE   6

Definition at line 721 of file asn1t.h.

#define ASN1_OP_NEW_POST   1

Definition at line 716 of file asn1t.h.

#define ASN1_OP_NEW_PRE   0

Definition at line 715 of file asn1t.h.

#define ASN1_OPT ( stname,
field,
type   )     ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type)

Definition at line 316 of file asn1t.h.

#define ASN1_SEQUENCE ( tname   )     static const ASN1_TEMPLATE tname##_seq_tt[]

Definition at line 152 of file asn1t.h.

#define ASN1_SEQUENCE_cb ( tname,
cb   ) 

Value:

static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \
   ASN1_SEQUENCE(tname)

Definition at line 172 of file asn1t.h.

#define ASN1_SEQUENCE_enc ( tname,
enc,
cb   ) 

Value:

static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_ENCODING, 0, 0, cb, offsetof(tname, enc)}; \
   ASN1_SEQUENCE(tname)

Definition at line 184 of file asn1t.h.

#define ASN1_SEQUENCE_END ( stname   )     ASN1_SEQUENCE_END_name(stname, stname)

Definition at line 155 of file asn1t.h.

#define ASN1_SEQUENCE_END_cb ( stname,
tname   )     ASN1_SEQUENCE_END_ref(stname, tname)

Definition at line 204 of file asn1t.h.

#define ASN1_SEQUENCE_END_enc ( stname,
tname   )     ASN1_SEQUENCE_END_ref(stname, tname)

Definition at line 202 of file asn1t.h.

#define ASN1_SEQUENCE_END_name ( stname,
tname   ) 

Value:

;\
   ASN1_ITEM_start(tname) \
      ASN1_ITYPE_SEQUENCE,\
      V_ASN1_SEQUENCE,\
      tname##_seq_tt,\
      sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
      NULL,\
      sizeof(stname),\
      #stname \
   ASN1_ITEM_end(tname)

Definition at line 157 of file asn1t.h.

#define ASN1_SEQUENCE_END_ref ( stname,
tname   ) 

Value:

;\
   ASN1_ITEM_start(tname) \
      ASN1_ITYPE_SEQUENCE,\
      V_ASN1_SEQUENCE,\
      tname##_seq_tt,\
      sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
      &tname##_aux,\
      sizeof(stname),\
      #stname \
   ASN1_ITEM_end(tname)

Definition at line 206 of file asn1t.h.

#define ASN1_SEQUENCE_OF ( stname,
field,
type   )     ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, stname, field, type)

Definition at line 330 of file asn1t.h.

#define ASN1_SEQUENCE_OF_OPT ( stname,
field,
type   )     ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type)

Definition at line 334 of file asn1t.h.

#define ASN1_SEQUENCE_ref ( tname,
cb,
lck   ) 

Value:

static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), lck, cb, 0}; \
   ASN1_SEQUENCE(tname)

Definition at line 180 of file asn1t.h.

#define ASN1_SET_OF ( stname,
field,
type   )     ASN1_EX_TYPE(ASN1_TFLG_SET_OF, 0, stname, field, type)

Definition at line 339 of file asn1t.h.

#define ASN1_SET_OF_OPT ( stname,
field,
type   )     ASN1_EX_TYPE(ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type)

Definition at line 342 of file asn1t.h.

#define ASN1_SIMPLE ( stname,
field,
type   )     ASN1_EX_TYPE(0,0, stname, field, type)

Definition at line 313 of file asn1t.h.

#define ASN1_TEMPLATE_adb ( t   )     (t->item_ptr)

Definition at line 440 of file asn1t.h.

#define ASN1_TEMPLATE_item ( t   )     (t->item_ptr)

Definition at line 439 of file asn1t.h.

#define ASN1_TFLG_ADB_INT   (0x1<<9)

Definition at line 528 of file asn1t.h.

#define ASN1_TFLG_ADB_MASK   (0x3<<8)

Definition at line 524 of file asn1t.h.

#define ASN1_TFLG_ADB_OID   (0x1<<8)

Definition at line 526 of file asn1t.h.

#define ASN1_TFLG_APPLICATION   (0x1<<6)

Definition at line 510 of file asn1t.h.

#define ASN1_TFLG_COMBINE   (0x1<<10)

Definition at line 538 of file asn1t.h.

#define ASN1_TFLG_CONTEXT   (0x2<<6)

Definition at line 512 of file asn1t.h.

#define ASN1_TFLG_EXPLICIT   ASN1_TFLG_EXPTAG|ASN1_TFLG_CONTEXT

Definition at line 499 of file asn1t.h.

#define ASN1_TFLG_EXPTAG   (0x2 << 3)

Definition at line 491 of file asn1t.h.

#define ASN1_TFLG_IMPLICIT   ASN1_TFLG_IMPTAG|ASN1_TFLG_CONTEXT

Definition at line 496 of file asn1t.h.

#define ASN1_TFLG_IMPTAG   (0x1 << 3)

Definition at line 487 of file asn1t.h.

#define ASN1_TFLG_NDEF   (0x1<<11)

Definition at line 545 of file asn1t.h.

#define ASN1_TFLG_OPTIONAL   (0x1)

Definition at line 463 of file asn1t.h.

#define ASN1_TFLG_PRIVATE   (0x3<<6)

Definition at line 514 of file asn1t.h.

#define ASN1_TFLG_SEQUENCE_OF   (0x2 << 1)

Definition at line 469 of file asn1t.h.

#define ASN1_TFLG_SET_OF   (0x1 << 1)

Definition at line 466 of file asn1t.h.

#define ASN1_TFLG_SET_ORDER   (0x3 << 1)

Definition at line 476 of file asn1t.h.

#define ASN1_TFLG_SK_MASK   (0x3 << 1)

Definition at line 479 of file asn1t.h.

#define ASN1_TFLG_TAG_CLASS   (0x3<<6)

Definition at line 516 of file asn1t.h.

#define ASN1_TFLG_TAG_MASK   (0x3 << 3)

Definition at line 493 of file asn1t.h.

#define ASN1_TFLG_UNIVERSAL   (0x0<<6)

Definition at line 508 of file asn1t.h.

#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS ( stname   )     IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname)

Definition at line 778 of file asn1t.h.

#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname ( stname,
itname,
fname   ) 

Value:

stname *fname##_new(void) \
   { \
      return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \
   } \
   void fname##_free(stname *a) \
   { \
      ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \
   }

Definition at line 781 of file asn1t.h.

#define IMPLEMENT_ASN1_DUP_FUNCTION ( stname   ) 

Value:

stname * stname##_dup(stname *x) \
        { \
        return ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \
        }

Definition at line 824 of file asn1t.h.

#define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname ( stname,
itname,
fname   ) 

Value:

stname *d2i_##fname(stname **a, const unsigned char **in, long len) \
   { \
      return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\
   } \
   int i2d_##fname(const stname *a, unsigned char **out) \
   { \
      return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\
   }

Definition at line 814 of file asn1t.h.

#define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname ( stname,
itname,
fname   ) 

Value:

stname *d2i_##fname(stname **a, const unsigned char **in, long len) \
   { \
      return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\
   } \
   int i2d_##fname(stname *a, unsigned char **out) \
   { \
      return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\
   }

Definition at line 795 of file asn1t.h.

#define IMPLEMENT_ASN1_FUNCTIONS ( stname   )     IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname)

Definition at line 771 of file asn1t.h.

#define IMPLEMENT_ASN1_FUNCTIONS_const ( name   )     IMPLEMENT_ASN1_FUNCTIONS_const_fname(name, name, name)

Definition at line 830 of file asn1t.h.

#define IMPLEMENT_ASN1_FUNCTIONS_const_fname ( stname,
itname,
fname   ) 

Value:

Definition at line 833 of file asn1t.h.

#define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name ( stname,
itname   )     IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname)

Definition at line 775 of file asn1t.h.

#define IMPLEMENT_ASN1_FUNCTIONS_fname ( stname,
itname,
fname   ) 

Value:

IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \
   IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname)

Definition at line 791 of file asn1t.h.

#define IMPLEMENT_ASN1_FUNCTIONS_name ( stname,
itname   )     IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, itname)

Definition at line 773 of file asn1t.h.

#define IMPLEMENT_ASN1_MSTRING ( itname,
mask   ) 

Value:

ASN1_ITEM_start(itname) \
               ASN1_ITYPE_MSTRING, mask, NULL, 0, NULL, sizeof(ASN1_STRING), #itname \
            ASN1_ITEM_end(itname)

Definition at line 732 of file asn1t.h.

#define IMPLEMENT_ASN1_NDEF_FUNCTION ( stname   ) 

Value:

int i2d_##stname##_NDEF(stname *a, unsigned char **out) \
   { \
      return ASN1_item_ndef_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(stname));\
   }

Definition at line 805 of file asn1t.h.

#define IMPLEMENT_ASN1_TYPE ( stname   )     IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0)

Definition at line 725 of file asn1t.h.

#define IMPLEMENT_ASN1_TYPE_ex ( itname,
vname,
ex   ) 

Value:

ASN1_ITEM_start(itname) \
               ASN1_ITYPE_PRIMITIVE, V_##vname, NULL, 0, NULL, ex, #itname \
            ASN1_ITEM_end(itname)

Definition at line 726 of file asn1t.h.

#define IMPLEMENT_COMPAT_ASN1 ( sname   )     IMPLEMENT_COMPAT_ASN1_type(sname, V_ASN1_SEQUENCE)

Definition at line 739 of file asn1t.h.

#define IMPLEMENT_COMPAT_ASN1_type ( sname,
tag   ) 

Value:

static const ASN1_COMPAT_FUNCS sname##_ff = { \
      (ASN1_new_func *)sname##_new, \
      (ASN1_free_func *)sname##_free, \
      (ASN1_d2i_func *)d2i_##sname, \
      (ASN1_i2d_func *)i2d_##sname, \
   }; \
   ASN1_ITEM_start(sname) \
      ASN1_ITYPE_COMPAT, \
      tag, \
      NULL, \
      0, \
      &sname##_ff, \
      0, \
      #sname \
   ASN1_ITEM_end(sname)

Definition at line 741 of file asn1t.h.

#define IMPLEMENT_EXTERN_ASN1 ( sname,
tag,
fptrs   ) 

Value:

ASN1_ITEM_start(sname) \
      ASN1_ITYPE_EXTERN, \
      tag, \
      NULL, \
      0, \
      &fptrs, \
      0, \
      #sname \
   ASN1_ITEM_end(sname)

Definition at line 758 of file asn1t.h.


Typedef Documentation

typedef struct ASN1_ADB_st ASN1_ADB

Definition at line 443 of file asn1t.h.

Definition at line 442 of file asn1t.h.

typedef struct ASN1_AUX_st ASN1_AUX

typedef int ASN1_aux_cb(int operation, ASN1_VALUE **in, const ASN1_ITEM *it)

Definition at line 693 of file asn1t.h.

typedef ASN1_VALUE* ASN1_d2i_func(ASN1_VALUE **a, const unsigned char **in, long length)

Definition at line 637 of file asn1t.h.

typedef int ASN1_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx)

Definition at line 640 of file asn1t.h.

typedef void ASN1_ex_free_func(ASN1_VALUE **pval, const ASN1_ITEM *it)

Definition at line 645 of file asn1t.h.

typedef int ASN1_ex_i2d(ASN1_VALUE **pval, unsigned char **out, const ASN1_ITEM *it, int tag, int aclass)

Definition at line 643 of file asn1t.h.

typedef int ASN1_ex_new_func(ASN1_VALUE **pval, const ASN1_ITEM *it)

Definition at line 644 of file asn1t.h.

typedef void ASN1_free_func(ASN1_VALUE *a)

Definition at line 636 of file asn1t.h.

typedef int ASN1_i2d_func(ASN1_VALUE *a, unsigned char **in)

Definition at line 638 of file asn1t.h.

typedef ASN1_VALUE* ASN1_new_func(void)

Definition at line 635 of file asn1t.h.

typedef int ASN1_primitive_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it)

Definition at line 648 of file asn1t.h.

typedef int ASN1_primitive_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN1_ITEM *it)

Definition at line 647 of file asn1t.h.


Function Documentation

const ASN1_TEMPLATE* asn1_do_adb ( ASN1_VALUE **  pval,
const ASN1_TEMPLATE tt,
int  nullerr 
)

int asn1_do_lock ( ASN1_VALUE **  pval,
int  op,
const ASN1_ITEM it 
)

void asn1_enc_free ( ASN1_VALUE **  pval,
const ASN1_ITEM it 
)

void asn1_enc_init ( ASN1_VALUE **  pval,
const ASN1_ITEM it 
)

int asn1_enc_restore ( int *  len,
unsigned char **  out,
ASN1_VALUE **  pval,
const ASN1_ITEM it 
)

int asn1_enc_save ( ASN1_VALUE **  pval,
const unsigned char *  in,
int  inlen,
const ASN1_ITEM it 
)

int asn1_ex_c2i ( ASN1_VALUE **  pval,
const unsigned char *  cont,
int  len,
int  utype,
char *  free_cont,
const ASN1_ITEM it 
)

int asn1_ex_i2c ( ASN1_VALUE **  pval,
unsigned char *  cont,
int *  putype,
const ASN1_ITEM it 
)

int asn1_get_choice_selector ( ASN1_VALUE **  pval,
const ASN1_ITEM it 
)

ASN1_VALUE** asn1_get_field_ptr ( ASN1_VALUE **  pval,
const ASN1_TEMPLATE tt 
)

int ASN1_item_ex_d2i ( ASN1_VALUE **  pval,
const unsigned char **  in,
long  len,
const ASN1_ITEM it,
int  tag,
int  aclass,
char  opt,
ASN1_TLC ctx 
)

void ASN1_item_ex_free ( ASN1_VALUE **  pval,
const ASN1_ITEM it 
)

int ASN1_item_ex_i2d ( ASN1_VALUE **  pval,
unsigned char **  out,
const ASN1_ITEM it,
int  tag,
int  aclass 
)

int ASN1_item_ex_new ( ASN1_VALUE **  pval,
const ASN1_ITEM it 
)

void ASN1_primitive_free ( ASN1_VALUE **  pval,
const ASN1_ITEM it 
)

int ASN1_primitive_new ( ASN1_VALUE **  pval,
const ASN1_ITEM it 
)

int asn1_set_choice_selector ( ASN1_VALUE **  pval,
int  value,
const ASN1_ITEM it 
)

int ASN1_template_d2i ( ASN1_VALUE **  pval,
const unsigned char **  in,
long  len,
const ASN1_TEMPLATE tt 
)

void ASN1_template_free ( ASN1_VALUE **  pval,
const ASN1_TEMPLATE tt 
)

int ASN1_template_i2d ( ASN1_VALUE **  pval,
unsigned char **  out,
const ASN1_TEMPLATE tt 
)

int ASN1_template_new ( ASN1_VALUE **  pval,
const ASN1_TEMPLATE tt 
)


Generated on Thu Aug 20 22:33:06 2009 for OpenXDAS by  doxygen 1.5.6