Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Enumerations
secasn1t.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sec_ASN1Template_struct

Defines

#define SEC_ASN1_DEFAULT_ARENA_SIZE   (2048)
#define SEC_ASN1_TAG_MASK   0xff
#define SEC_ASN1_TAGNUM_MASK   0x1f
#define SEC_ASN1_BOOLEAN   0x01
#define SEC_ASN1_INTEGER   0x02
#define SEC_ASN1_BIT_STRING   0x03
#define SEC_ASN1_OCTET_STRING   0x04
#define SEC_ASN1_NULL   0x05
#define SEC_ASN1_OBJECT_ID   0x06
#define SEC_ASN1_OBJECT_DESCRIPTOR   0x07
#define SEC_ASN1_REAL   0x09
#define SEC_ASN1_ENUMERATED   0x0a
#define SEC_ASN1_EMBEDDED_PDV   0x0b
#define SEC_ASN1_UTF8_STRING   0x0c
#define SEC_ASN1_SEQUENCE   0x10
#define SEC_ASN1_SET   0x11
#define SEC_ASN1_NUMERIC_STRING   0x12
#define SEC_ASN1_PRINTABLE_STRING   0x13
#define SEC_ASN1_T61_STRING   0x14
#define SEC_ASN1_VIDEOTEX_STRING   0x15
#define SEC_ASN1_IA5_STRING   0x16
#define SEC_ASN1_UTC_TIME   0x17
#define SEC_ASN1_GENERALIZED_TIME   0x18
#define SEC_ASN1_GRAPHIC_STRING   0x19
#define SEC_ASN1_VISIBLE_STRING   0x1a
#define SEC_ASN1_GENERAL_STRING   0x1b
#define SEC_ASN1_UNIVERSAL_STRING   0x1c
#define SEC_ASN1_BMP_STRING   0x1e
#define SEC_ASN1_HIGH_TAG_NUMBER   0x1f
#define SEC_ASN1_TELETEX_STRING   SEC_ASN1_T61_STRING
#define SEC_ASN1_METHOD_MASK   0x20
#define SEC_ASN1_PRIMITIVE   0x00
#define SEC_ASN1_CONSTRUCTED   0x20
#define SEC_ASN1_CLASS_MASK   0xc0
#define SEC_ASN1_UNIVERSAL   0x00
#define SEC_ASN1_APPLICATION   0x40
#define SEC_ASN1_CONTEXT_SPECIFIC   0x80
#define SEC_ASN1_PRIVATE   0xc0
#define SEC_ASN1_OPTIONAL   0x00100
#define SEC_ASN1_EXPLICIT   0x00200
#define SEC_ASN1_ANY   0x00400
#define SEC_ASN1_INLINE   0x00800
#define SEC_ASN1_POINTER   0x01000
#define SEC_ASN1_GROUP
#define SEC_ASN1_DYNAMIC
#define SEC_ASN1_SKIP   0x08000 /* skip a field; only for decoding */
#define SEC_ASN1_INNER
#define SEC_ASN1_SAVE
#define SEC_ASN1_MAY_STREAM
#define SEC_ASN1_SKIP_REST
#define SEC_ASN1_CHOICE   0x100000 /* pick one from a template */
#define SEC_ASN1_NO_STREAM
#define SEC_ASN1_DEBUG_BREAK
#define SEC_ASN1_SEQUENCE_OF   (SEC_ASN1_GROUP | SEC_ASN1_SEQUENCE)
#define SEC_ASN1_SET_OF   (SEC_ASN1_GROUP | SEC_ASN1_SET)
#define SEC_ASN1_ANY_CONTENTS   (SEC_ASN1_ANY | SEC_ASN1_INNER)
#define SEC_ASN1D_MAX_DEPTH   32
#define SEC_ASN1_GET(x)   x
#define SEC_ASN1_SUB(x)   x
#define SEC_ASN1_XTRN   0
#define SEC_ASN1_MKSUB(x)
#define SEC_ASN1_CHOOSER_DECLARE(x)   extern const SEC_ASN1Template * NSS_Get_##x (void *arg, PRBool enc);
#define SEC_ASN1_CHOOSER_IMPLEMENT(x)

Typedefs

typedef struct
sec_ASN1Template_struct 
SEC_ASN1Template
typedef const SEC_ASN1TemplateSEC_ASN1TemplateChooser (void *arg, PRBool enc)
typedef SEC_ASN1TemplateChooserSEC_ASN1TemplateChooserPtr
typedef struct sec_DecoderContext_struct
typedef struct sec_EncoderContext_struct
typedef void(* SEC_ASN1NotifyProc )(void *arg, PRBool before, void *dest, int real_depth)
typedef void(* SEC_ASN1WriteProc )(void *arg, const char *data, unsigned long len, int depth, SEC_ASN1EncodingPart data_kind)

Enumerations

enum  SEC_ASN1EncodingPart {
  SEC_ASN1_Identifier = 0, SEC_ASN1_Length = 1, SEC_ASN1_Contents = 2, SEC_ASN1_EndOfContents = 3,
  SEC_ASN1_Identifier = 0, SEC_ASN1_Length = 1, SEC_ASN1_Contents = 2, SEC_ASN1_EndOfContents = 3
}

Class Documentation

struct sec_ASN1Template_struct

Definition at line 56 of file secasn1t.h.

Class Members
unsigned long kind
unsigned long offset
unsigned int size
const void * sub

Define Documentation

#define SEC_ASN1_ANY   0x00400

Definition at line 166 of file secasn1t.h.

Definition at line 185 of file secasn1t.h.

Definition at line 154 of file secasn1t.h.

Definition at line 112 of file secasn1t.h.

Definition at line 139 of file secasn1t.h.

Definition at line 110 of file secasn1t.h.

#define SEC_ASN1_CHOICE   0x100000 /* pick one from a template */

Definition at line 176 of file secasn1t.h.

#define SEC_ASN1_CHOOSER_DECLARE (   x)    extern const SEC_ASN1Template * NSS_Get_##x (void *arg, PRBool enc);

Definition at line 211 of file secasn1t.h.

Value:
const SEC_ASN1Template * NSS_Get_##x(void * arg, PRBool enc) \
{ return x; }

Definition at line 214 of file secasn1t.h.

Definition at line 152 of file secasn1t.h.

Definition at line 150 of file secasn1t.h.

Definition at line 155 of file secasn1t.h.

Value:
0X400000 /* put this in your template and the
                                           decoder will assert when it
                                           processes it. Only for use with
                                           SEC_QuickDERDecodeItem */

Definition at line 178 of file secasn1t.h.

Definition at line 93 of file secasn1t.h.

Value:
0x04000 /* subtemplate is found by calling
                                    * a function at runtime */

Definition at line 170 of file secasn1t.h.

Definition at line 120 of file secasn1t.h.

Definition at line 119 of file secasn1t.h.

#define SEC_ASN1_EXPLICIT   0x00200

Definition at line 165 of file secasn1t.h.

Definition at line 136 of file secasn1t.h.

Definition at line 133 of file secasn1t.h.

#define SEC_ASN1_GET (   x)    x

Definition at line 205 of file secasn1t.h.

Definition at line 134 of file secasn1t.h.

Value:
0x02000       /* with SET or SEQUENCE means
                                    * SET OF or SEQUENCE OF */

Definition at line 169 of file secasn1t.h.

Definition at line 140 of file secasn1t.h.

Definition at line 131 of file secasn1t.h.

#define SEC_ASN1_INLINE   0x00800

Definition at line 167 of file secasn1t.h.

Value:
0x10000       /* with ANY means capture the
                                    * contents only (not the id, len,
                                    * or eoc); only for decoding */

Definition at line 172 of file secasn1t.h.

Definition at line 111 of file secasn1t.h.

Value:
0x40000       /* field or one of its sub-fields may
                                    * stream in and so should encode as
                                    * indefinite-length when streaming
                                    * has been indicated; only for
                                    * encoding */

Definition at line 174 of file secasn1t.h.

Definition at line 148 of file secasn1t.h.

Definition at line 208 of file secasn1t.h.

Value:
0X200000 /* This entry will not stream
                                           even if the sub-template says
                                           streaming is possible.  Helps
                                           to solve ambiguities with potential
                                           streaming entries that are 
                                           optional */

Definition at line 177 of file secasn1t.h.

#define SEC_ASN1_NULL   0x05

Definition at line 114 of file secasn1t.h.

Definition at line 127 of file secasn1t.h.

Definition at line 116 of file secasn1t.h.

Definition at line 115 of file secasn1t.h.

Definition at line 113 of file secasn1t.h.

#define SEC_ASN1_OPTIONAL   0x00100

Definition at line 164 of file secasn1t.h.

#define SEC_ASN1_POINTER   0x01000

Definition at line 168 of file secasn1t.h.

Definition at line 149 of file secasn1t.h.

Definition at line 128 of file secasn1t.h.

Definition at line 156 of file secasn1t.h.

#define SEC_ASN1_REAL   0x09

Definition at line 118 of file secasn1t.h.

Value:
0x20000 /* stash away the encoded bytes first;
                                    * only for decoding */

Definition at line 173 of file secasn1t.h.

Definition at line 125 of file secasn1t.h.

Definition at line 183 of file secasn1t.h.

#define SEC_ASN1_SET   0x11

Definition at line 126 of file secasn1t.h.

Definition at line 184 of file secasn1t.h.

#define SEC_ASN1_SKIP   0x08000 /* skip a field; only for decoding */

Definition at line 171 of file secasn1t.h.

Value:
0x80000       /* skip all following fields;
                                      only for decoding */

Definition at line 175 of file secasn1t.h.

#define SEC_ASN1_SUB (   x)    x

Definition at line 206 of file secasn1t.h.

Definition at line 129 of file secasn1t.h.

Definition at line 98 of file secasn1t.h.

Definition at line 109 of file secasn1t.h.

Definition at line 141 of file secasn1t.h.

Definition at line 153 of file secasn1t.h.

Definition at line 137 of file secasn1t.h.

Definition at line 132 of file secasn1t.h.

Definition at line 121 of file secasn1t.h.

Definition at line 130 of file secasn1t.h.

Definition at line 135 of file secasn1t.h.

Definition at line 207 of file secasn1t.h.

Definition at line 188 of file secasn1t.h.


Typedef Documentation

typedef void(* SEC_ASN1NotifyProc)(void *arg, PRBool before, void *dest, int real_depth)

Definition at line 245 of file secasn1t.h.

Definition at line 195 of file secasn1t.h.

Definition at line 196 of file secasn1t.h.

typedef void(* SEC_ASN1WriteProc)(void *arg, const char *data, unsigned long len, int depth, SEC_ASN1EncodingPart data_kind)

Definition at line 278 of file secasn1t.h.

typedef struct sec_DecoderContext_struct

Definition at line 221 of file secasn1t.h.

typedef struct sec_EncoderContext_struct

Definition at line 226 of file secasn1t.h.


Enumeration Type Documentation

Enumerator:
SEC_ASN1_Identifier 
SEC_ASN1_Length 
SEC_ASN1_Contents 
SEC_ASN1_EndOfContents 
SEC_ASN1_Identifier 
SEC_ASN1_Length 
SEC_ASN1_Contents 
SEC_ASN1_EndOfContents 

Definition at line 234 of file secasn1t.h.

{ return x; }

/*
** Opaque object used by the decoder to store state.
*/
typedef struct sec_DecoderContext_struct SEC_ASN1DecoderContext;