spnego_asn1.c File Reference

Method routines generated from SPNEGO ASN.1 module. See spnego_asn1.pl for details. Do not edit. More...

Go to the source code of this file.

Data Structures

struct  octet_string
struct  oid
struct  MechTypeList
struct  ContextFlags
struct  NegTokenInit
struct  NegTokenResp

Defines

#define ASN1_MALLOC_ENCODE(T, B, BL, S, L, R)
#define BACK   if (e) return e; p -= l; len -= l; ret += l; POST(p); POST(len); POST(ret)
#define FORW   if(e) goto fail; p += l; len -= l; ret += l; POST(p); POST(len); POST(ret)

Typedefs

typedef char * general_string
typedef char * utf8_string
typedef oid MechType

Functions

static int encode_MechType (unsigned char *, size_t, const MechType *, size_t *)
static int decode_MechType (const unsigned char *, size_t, MechType *, size_t *)
static void free_MechType (MechType *)
static int encode_MechTypeList (unsigned char *, size_t, const MechTypeList *, size_t *)
static int decode_MechTypeList (const unsigned char *, size_t, MechTypeList *, size_t *)
static void free_MechTypeList (MechTypeList *)
static int encode_ContextFlags (unsigned char *, size_t, const ContextFlags *, size_t *)
static int decode_ContextFlags (const unsigned char *, size_t, ContextFlags *, size_t *)
static void free_ContextFlags (ContextFlags *)
static int encode_NegTokenInit (unsigned char *, size_t, const NegTokenInit *, size_t *)
static int decode_NegTokenInit (const unsigned char *, size_t, NegTokenInit *, size_t *)
static void free_NegTokenInit (NegTokenInit *)
static int encode_NegTokenResp (unsigned char *, size_t, const NegTokenResp *, size_t *)
static int decode_NegTokenResp (const unsigned char *, size_t, NegTokenResp *, size_t *)
static void free_NegTokenResp (NegTokenResp *)


Detailed Description

Method routines generated from SPNEGO ASN.1 module. See spnego_asn1.pl for details. Do not edit.

Definition in file spnego_asn1.c.


Define Documentation

#define ASN1_MALLOC_ENCODE ( T,
B,
BL,
S,
L,
 ) 

Value:

do {                                                         \
    (BL) = length_##T((S));                                    \
    (B) = malloc((BL));                                        \
    if((B) == NULL) {                                          \
      (R) = ENOMEM;                                            \
    } else {                                                   \
      (R) = encode_##T(((unsigned char*)(B)) + (BL) - 1, (BL), \
                       (S), (L));                              \
      if((R) != 0) {                                           \
        free((B));                                             \
        (B) = NULL;                                            \
      }                                                        \
    }                                                          \
  } while (0)

Definition at line 48 of file spnego_asn1.c.

#define BACK   if (e) return e; p -= l; len -= l; ret += l; POST(p); POST(len); POST(ret)

Definition at line 174 of file spnego_asn1.c.

Referenced by encode_ContextFlags(), encode_MechType(), encode_MechTypeList(), encode_NegTokenInit(), and encode_NegTokenResp().

#define FORW   if(e) goto fail; p += l; len -= l; ret += l; POST(p); POST(len); POST(ret)

Definition at line 189 of file spnego_asn1.c.

Referenced by decode_ContextFlags(), decode_MechType(), decode_MechTypeList(), decode_NegTokenInit(), and decode_NegTokenResp().


Typedef Documentation

typedef char* general_string

Definition at line 39 of file spnego_asn1.c.

typedef char* utf8_string

Definition at line 41 of file spnego_asn1.c.

typedef oid MechType

Definition at line 70 of file spnego_asn1.c.


Function Documentation

static int encode_MechType ( unsigned char *  p,
size_t  len,
const MechType data,
size_t *  size 
) [static]

Definition at line 177 of file spnego_asn1.c.

References BACK.

Referenced by encode_MechTypeList(), and encode_NegTokenResp().

static int decode_MechType ( const unsigned char *  p,
size_t  len,
MechType data,
size_t *  size 
) [static]

Definition at line 192 of file spnego_asn1.c.

References FORW, and free_MechType().

Referenced by decode_MechTypeList(), and decode_NegTokenResp().

static void free_MechType ( MechType data  )  [static]

Definition at line 210 of file spnego_asn1.c.

Referenced by decode_MechType(), free_MechTypeList(), and free_NegTokenResp().

static int encode_MechTypeList ( unsigned char *  p,
size_t  len,
const MechTypeList data,
size_t *  size 
) [static]

Definition at line 225 of file spnego_asn1.c.

References BACK, and encode_MechType().

Referenced by encode_NegTokenInit().

static int decode_MechTypeList ( const unsigned char *  p,
size_t  len,
MechTypeList data,
size_t *  size 
) [static]

Definition at line 245 of file spnego_asn1.c.

References decode_MechType(), FORW, and free_MechTypeList().

Referenced by decode_NegTokenInit().

static void free_MechTypeList ( MechTypeList data  )  [static]

Definition at line 288 of file spnego_asn1.c.

References free(), and free_MechType().

Referenced by decode_MechTypeList(), and free_NegTokenInit().

static int encode_ContextFlags ( unsigned char *  p,
size_t  len,
const ContextFlags data,
size_t *  size 
) [static]

Definition at line 308 of file spnego_asn1.c.

References ContextFlags::anonFlag, BACK, ContextFlags::confFlag, ContextFlags::delegFlag, ContextFlags::integFlag, ContextFlags::mutualFlag, ContextFlags::replayFlag, and ContextFlags::sequenceFlag.

Referenced by encode_NegTokenInit().

static int decode_ContextFlags ( const unsigned char *  p,
size_t  len,
ContextFlags data,
size_t *  size 
) [static]

Definition at line 355 of file spnego_asn1.c.

References ContextFlags::anonFlag, ContextFlags::confFlag, ContextFlags::delegFlag, FORW, free_ContextFlags(), ContextFlags::integFlag, ContextFlags::mutualFlag, ContextFlags::replayFlag, and ContextFlags::sequenceFlag.

Referenced by decode_NegTokenInit().

static void free_ContextFlags ( ContextFlags data  )  [static]

Definition at line 388 of file spnego_asn1.c.

Referenced by decode_ContextFlags(), and free_NegTokenInit().

static int encode_NegTokenInit ( unsigned char *  p,
size_t  len,
const NegTokenInit data,
size_t *  size 
) [static]

Definition at line 414 of file spnego_asn1.c.

References BACK, encode_ContextFlags(), and encode_MechTypeList().

static int decode_NegTokenInit ( const unsigned char *  p,
size_t  len,
NegTokenInit data,
size_t *  size 
) [static]

Definition at line 462 of file spnego_asn1.c.

References decode_ContextFlags(), decode_MechTypeList(), FORW, and free_NegTokenInit().

static void free_NegTokenInit ( NegTokenInit data  )  [static]

Definition at line 607 of file spnego_asn1.c.

References free(), free_ContextFlags(), and free_MechTypeList().

Referenced by decode_NegTokenInit().

static int encode_NegTokenResp ( unsigned char *  p,
size_t  len,
const NegTokenResp data,
size_t *  size 
) [static]

Definition at line 637 of file spnego_asn1.c.

References BACK, and encode_MechType().

static int decode_NegTokenResp ( const unsigned char *  p,
size_t  len,
NegTokenResp data,
size_t *  size 
) [static]

Definition at line 686 of file spnego_asn1.c.

References decode_MechType(), FORW, and free_NegTokenResp().

static void free_NegTokenResp ( NegTokenResp data  )  [static]

Definition at line 834 of file spnego_asn1.c.

References free(), and free_MechType().

Referenced by decode_NegTokenResp().


Generated on Tue Apr 28 17:41:13 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha