+2002-09-02 Ken Raeburn <raeburn@mit.edu>
+
+ * asn1_decode.c, asn1_encode.c, asn1_get.c, asn1_get.h,
+ asn1_k_decode.c, asn1_k_encode.c, asn1_make.c, asn1_make.h,
+ asn1buf,c. asn1buf.h, krb5_decode.c, krb5_encode.c: Use prototype
+ style definitions for functions. Avoid variable name "class".
+
2002-08-29 Ken Raeburn <raeburn@mit.edu>
* Makefile.in: Revert $(S)=>/ change, for Windows support.
#define setup()\
asn1_error_code retval;\
-asn1_class class;\
+asn1_class asn1class;\
asn1_construction construction;\
asn1_tagnum tagnum;\
unsigned int length
#define tag(type)\
-retval = asn1_get_tag(buf,&class,&construction,&tagnum,&length);\
+retval = asn1_get_tag(buf,&asn1class,&construction,&tagnum,&length);\
if(retval) return retval;\
-if(class != UNIVERSAL || construction != PRIMITIVE || tagnum != type)\
+if(asn1class != UNIVERSAL || construction != PRIMITIVE || tagnum != type)\
return ASN1_BAD_ID
#define cleanup()\
time_t gmt_mktime (struct tm *);
-asn1_error_code asn1_decode_integer(buf, val)
- asn1buf * buf;
- long * val;
+asn1_error_code asn1_decode_integer(asn1buf *buf, long int *val)
{
setup();
asn1_octet o;
cleanup();
}
-asn1_error_code asn1_decode_unsigned_integer(buf, val)
- asn1buf * buf;
- unsigned long * val;
+asn1_error_code asn1_decode_unsigned_integer(asn1buf *buf, long unsigned int *val)
{
setup();
asn1_octet o;
cleanup();
}
-asn1_error_code asn1_decode_octetstring(buf, retlen, val)
- asn1buf * buf;
- unsigned int * retlen;
- asn1_octet ** val;
+asn1_error_code asn1_decode_octetstring(asn1buf *buf, unsigned int *retlen, asn1_octet **val)
{
setup();
tag(ASN1_OCTETSTRING);
cleanup();
}
-asn1_error_code asn1_decode_charstring(buf, retlen, val)
- asn1buf * buf;
- unsigned int * retlen;
- char ** val;
+asn1_error_code asn1_decode_charstring(asn1buf *buf, unsigned int *retlen, char **val)
{
setup();
tag(ASN1_OCTETSTRING);
}
-asn1_error_code asn1_decode_generalstring(buf, retlen, val)
- asn1buf * buf;
- unsigned int * retlen;
- char ** val;
+asn1_error_code asn1_decode_generalstring(asn1buf *buf, unsigned int *retlen, char **val)
{
setup();
tag(ASN1_GENERALSTRING);
}
-asn1_error_code asn1_decode_null(buf)
- asn1buf * buf;
+asn1_error_code asn1_decode_null(asn1buf *buf)
{
setup();
tag(ASN1_NULL);
cleanup();
}
-asn1_error_code asn1_decode_printablestring(buf, retlen, val)
- asn1buf * buf;
- int * retlen;
- char ** val;
+asn1_error_code asn1_decode_printablestring(asn1buf *buf, int *retlen, char **val)
{
setup();
tag(ASN1_PRINTABLESTRING);
cleanup();
}
-asn1_error_code asn1_decode_ia5string(buf, retlen, val)
- asn1buf * buf;
- int * retlen;
- char ** val;
+asn1_error_code asn1_decode_ia5string(asn1buf *buf, int *retlen, char **val)
{
setup();
tag(ASN1_IA5STRING);
cleanup();
}
-asn1_error_code asn1_decode_generaltime(buf, val)
- asn1buf * buf;
- time_t * val;
+asn1_error_code asn1_decode_generaltime(asn1buf *buf, time_t *val)
{
setup();
char *s;
#include "asn1_encode.h"
#include "asn1_make.h"
-asn1_error_code asn1_encode_integer(buf, val, retlen)
- asn1buf * buf;
- const long val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_integer(asn1buf *buf, long val,
+ unsigned int *retlen)
{
asn1_error_code retval;
unsigned int length = 0;
return 0;
}
-asn1_error_code asn1_encode_unsigned_integer(buf, val, retlen)
- asn1buf * buf;
- const unsigned long val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_unsigned_integer(asn1buf *buf, unsigned long val,
+ unsigned int *retlen)
{
asn1_error_code retval;
unsigned int length = 0;
return 0;
}
-asn1_error_code asn1_encode_octetstring(buf, len, val, retlen)
- asn1buf * buf;
- const unsigned int len;
- const asn1_octet * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_octetstring(asn1buf *buf, unsigned int len,
+ const asn1_octet *val,
+ unsigned int *retlen)
{
asn1_error_code retval;
unsigned int length;
return 0;
}
-asn1_error_code asn1_encode_charstring(buf, len, val, retlen)
- asn1buf * buf;
- const unsigned int len;
- const char * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_charstring(asn1buf *buf, unsigned int len,
+ const char *val, unsigned int *retlen)
{
asn1_error_code retval;
unsigned int length;
return 0;
}
-asn1_error_code asn1_encode_null(buf, retlen)
- asn1buf * buf;
- int * retlen;
+asn1_error_code asn1_encode_null(asn1buf *buf, int *retlen)
{
asn1_error_code retval;
return 0;
}
-asn1_error_code asn1_encode_printablestring(buf, len, val, retlen)
- asn1buf * buf;
- const unsigned int len;
- const char * val;
- int * retlen;
+asn1_error_code asn1_encode_printablestring(asn1buf *buf, unsigned int len,
+ const char *val, int *retlen)
{
asn1_error_code retval;
unsigned int length;
return 0;
}
-asn1_error_code asn1_encode_ia5string(buf, len, val, retlen)
- asn1buf * buf;
- const unsigned int len;
- const char * val;
- int * retlen;
+asn1_error_code asn1_encode_ia5string(asn1buf *buf, unsigned int len,
+ const char *val, int *retlen)
{
asn1_error_code retval;
unsigned int length;
return 0;
}
-asn1_error_code asn1_encode_generaltime(buf, val, retlen)
- asn1buf * buf;
- const time_t val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_generaltime(asn1buf *buf, time_t val,
+ unsigned int *retlen)
{
asn1_error_code retval;
struct tm *gtime;
return 0;
}
-asn1_error_code asn1_encode_generalstring(buf, len, val, retlen)
- asn1buf * buf;
- const unsigned int len;
- const char * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_generalstring(asn1buf *buf, unsigned int len,
+ const char *val,
+ unsigned int *retlen)
{
asn1_error_code retval;
unsigned int length;
#include "asn1_get.h"
asn1_error_code
-asn1_get_tag_indef(buf, class, construction, tagnum, retlen, indef)
- asn1buf * buf;
- asn1_class * class;
- asn1_construction * construction;
- asn1_tagnum * tagnum;
- unsigned int * retlen;
- int * indef;
+asn1_get_tag_indef(asn1buf *buf, asn1_class *asn1class,
+ asn1_construction *construction, asn1_tagnum *tagnum,
+ unsigned int *retlen, int *indef)
{
asn1_error_code retval;
*tagnum = ASN1_TAGNUM_CEILING;
return 0;
}
- retval = asn1_get_id(buf,class,construction,tagnum);
+ retval = asn1_get_id(buf,asn1class,construction,tagnum);
if(retval) return retval;
retval = asn1_get_length(buf,retlen,indef);
if(retval) return retval;
}
asn1_error_code
-asn1_get_tag(buf, class, construction, tagnum, retlen)
- asn1buf *buf;
- asn1_class *class;
- asn1_construction *construction;
- asn1_tagnum *tagnum;
- unsigned int *retlen;
+asn1_get_tag(asn1buf *buf, asn1_class *asn1class,
+ asn1_construction *construction, asn1_tagnum *tagnum,
+ unsigned int *retlen)
{
int indef;
- return asn1_get_tag_indef(buf, class, construction, tagnum, retlen, &indef);
+ return asn1_get_tag_indef(buf, asn1class, construction, tagnum, retlen,
+ &indef);
}
-asn1_error_code asn1_get_sequence(buf, retlen, indef)
- asn1buf * buf;
- unsigned int * retlen;
- int * indef;
+asn1_error_code asn1_get_sequence(asn1buf *buf, unsigned int *retlen, int *indef)
{
asn1_error_code retval;
- asn1_class class;
+ asn1_class asn1class;
asn1_construction construction;
asn1_tagnum tagnum;
- retval = asn1_get_tag_indef(buf,&class,&construction,&tagnum,retlen,indef);
+ retval = asn1_get_tag_indef(buf,&asn1class,&construction,&tagnum,retlen,indef);
if(retval) return retval;
if(retval) return (krb5_error_code)retval;
- if(class != UNIVERSAL || construction != CONSTRUCTED ||
+ if(asn1class != UNIVERSAL || construction != CONSTRUCTED ||
tagnum != ASN1_SEQUENCE) return ASN1_BAD_ID;
return 0;
}
/****************************************************************/
/* Private Procedures */
-asn1_error_code asn1_get_id(buf, class, construction, tagnum)
- asn1buf * buf;
- asn1_class * class;
- asn1_construction * construction;
- asn1_tagnum * tagnum;
+asn1_error_code asn1_get_id(asn1buf *buf, asn1_class *asn1class,
+ asn1_construction *construction,
+ asn1_tagnum *tagnum)
{
asn1_error_code retval;
asn1_tagnum tn=0;
retval = asn1buf_remove_octet(buf,&o);
if(retval) return retval;
- if(class != NULL)
- *class = (asn1_class)(o&ASN1_CLASS_MASK);
+ if(asn1class != NULL)
+ *asn1class = (asn1_class)(o&ASN1_CLASS_MASK);
if(construction != NULL)
*construction = (asn1_construction)(o&ASN1_CONSTRUCTION_MASK);
if((o&ASN1_TAG_NUMBER_MASK) != ASN1_TAG_NUMBER_MASK){
return 0;
}
-asn1_error_code asn1_get_length(buf, retlen, indef)
- asn1buf * buf;
- unsigned int * retlen;
- int * indef;
+asn1_error_code asn1_get_length(asn1buf *buf, unsigned int *retlen, int *indef)
{
asn1_error_code retval;
asn1_octet o;
asn1_error_code asn1_get_tag_indef
(asn1buf *buf,
- asn1_class *class,
+ asn1_class *Class,
asn1_construction *construction,
asn1_tagnum *tagnum,
unsigned int *retlen, int *indef);
asn1_error_code asn1_get_tag
(asn1buf *buf,
- asn1_class *class,
+ asn1_class *Class,
asn1_construction *construction,
asn1_tagnum *tagnum,
unsigned int *retlen);
/* requires *buf is allocated
effects Decodes the tag in *buf. If class != NULL, returns
- the class in *class. Similarly, the construction,
+ the class in *Class. Similarly, the construction,
tag number, and length are returned in *construction,
*tagnum, and *retlen, respectively.
If *buf is empty to begin with,
asn1_error_code asn1_get_id
(asn1buf *buf,
- asn1_class *class,
+ asn1_class *Class,
asn1_construction *construction,
asn1_tagnum *tagnum);
/* requires *buf is allocated
effects Decodes the group of identifier octets at *buf's
current position. If class != NULL, returns the class
- in *class. Similarly, the construction and tag number
+ in *Class. Similarly, the construction and tag number
are returned in *construction and *tagnum, respectively.
Returns ASN1_OVERRUN if *buf is exhausted. */
#define setup()\
asn1_error_code retval;\
-asn1_class class;\
+asn1_class asn1class;\
asn1_construction construction;\
asn1_tagnum tagnum;\
unsigned int length,taglen
#define unused_var(x) if(0) {x=0; x=x-x;}
#define next_tag()\
-retval = asn1_get_tag_indef(&subbuf,&class,&construction,\
+retval = asn1_get_tag_indef(&subbuf,&asn1class,&construction,\
&tagnum,&taglen,&indef);\
if(retval) return retval;
#define get_eoc() \
-retval = asn1_get_tag_indef(&subbuf,&class,&construction, \
+retval = asn1_get_tag_indef(&subbuf,&asn1class,&construction, \
&tagnum,&taglen,&indef); \
if(retval) return retval; \
-if(class != UNIVERSAL || tagnum || indef) \
+if(asn1class != UNIVERSAL || tagnum || indef) \
return ASN1_MISSING_EOC
#define alloc_field(var,type)\
#define apptag(tagexpect)\
-retval = asn1_get_tag(buf,&class,&construction,&tagnum,&applen);\
+retval = asn1_get_tag(buf,&asn1class,&construction,&tagnum,&applen);\
if(retval) return retval;\
-if(class != APPLICATION || construction != CONSTRUCTED ||\
+if(asn1class != APPLICATION || construction != CONSTRUCTED ||\
tagnum != (tagexpect)) return ASN1_BAD_ID
/**** normal fields ****/
#define get_field(var,tagexpect,decoder)\
if(tagnum > (tagexpect)) return ASN1_MISSING_FIELD;\
if(tagnum < (tagexpect)) return ASN1_MISPLACED_FIELD;\
-if((class != CONTEXT_SPECIFIC || construction != CONSTRUCTED) \
- && (tagnum || taglen || class != UNIVERSAL)) \
+if((asn1class != CONTEXT_SPECIFIC || construction != CONSTRUCTED) \
+ && (tagnum || taglen || asn1class != UNIVERSAL)) \
return ASN1_BAD_ID;\
get_field_body(var,decoder)
#define opt_field(var,tagexpect,decoder,optvalue)\
-if((class != CONTEXT_SPECIFIC || construction != CONSTRUCTED) \
- && (tagnum || taglen || class != UNIVERSAL)) \
+if((asn1class != CONTEXT_SPECIFIC || construction != CONSTRUCTED) \
+ && (tagnum || taglen || asn1class != UNIVERSAL)) \
return ASN1_BAD_ID;\
if(tagnum == (tagexpect)){\
get_field_body(var,decoder); }\
#define get_lenfield(len,var,tagexpect,decoder)\
if(tagnum > (tagexpect)) return ASN1_MISSING_FIELD;\
if(tagnum < (tagexpect)) return ASN1_MISPLACED_FIELD;\
-if((class != CONTEXT_SPECIFIC || construction != CONSTRUCTED) \
- && (tagnum || taglen || class != UNIVERSAL)) \
+if((asn1class != CONTEXT_SPECIFIC || construction != CONSTRUCTED) \
+ && (tagnum || taglen || asn1class != UNIVERSAL)) \
return ASN1_BAD_ID;\
get_lenfield_body(len,var,decoder)
next_tag()
#define end_structure()\
-retval = asn1buf_sync(buf,&subbuf,class,tagnum,length,indef,seqindef);\
+retval = asn1buf_sync(buf,&subbuf,asn1class,tagnum,length,indef,seqindef);\
if(retval) return retval
#define sequence_of(buf) \
unsigned int length, taglen; \
-asn1_class class; \
+asn1_class asn1class; \
asn1_construction construction; \
asn1_tagnum tagnum; \
int indef; \
if(retval) return retval;
#define end_sequence_of(buf) \
-retval = asn1_get_tag_indef(&seqbuf,&class,&construction, \
+retval = asn1_get_tag_indef(&seqbuf,&asn1class,&construction, \
&tagnum,&taglen,&indef); \
if(retval) return retval; \
-retval = asn1buf_sync(buf,&seqbuf,class,tagnum, \
+retval = asn1buf_sync(buf,&seqbuf,asn1class,tagnum, \
length,indef,seqofindef); \
if(retval) return retval;
/* scalars */
-asn1_error_code asn1_decode_kerberos_time(buf, val)
- asn1buf * buf;
- krb5_timestamp * val;
+asn1_error_code asn1_decode_kerberos_time(asn1buf *buf, krb5_timestamp *val)
{
time_t t;
asn1_error_code retval;
}
#define integer_convert(fname,ktype)\
-asn1_error_code fname(buf, val)\
- asn1buf * buf;\
- ktype * val;\
+asn1_error_code fname(asn1buf * buf, ktype * val)\
{\
asn1_error_code retval;\
long n;\
return 0;\
}
#define unsigned_integer_convert(fname,ktype)\
-asn1_error_code fname(buf, val)\
- asn1buf * buf;\
- ktype * val;\
+asn1_error_code fname(asn1buf * buf, ktype * val)\
{\
asn1_error_code retval;\
unsigned long n;\
unsigned_integer_convert(asn1_decode_ui_2,krb5_ui_2)
unsigned_integer_convert(asn1_decode_ui_4,krb5_ui_4)
-asn1_error_code asn1_decode_msgtype(buf, val)
- asn1buf * buf;
- krb5_msgtype * val;
+asn1_error_code asn1_decode_msgtype(asn1buf *buf, krb5_msgtype *val)
{
asn1_error_code retval;
unsigned long n;
/* structures */
-asn1_error_code asn1_decode_realm(buf, val)
- asn1buf * buf;
- krb5_principal * val;
+asn1_error_code asn1_decode_realm(asn1buf *buf, krb5_principal *val)
{
return asn1_decode_generalstring(buf,
&((*val)->realm.length),
&((*val)->realm.data));
}
-asn1_error_code asn1_decode_principal_name(buf, val)
- asn1buf * buf;
- krb5_principal * val;
+asn1_error_code asn1_decode_principal_name(asn1buf *buf, krb5_principal *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_checksum(buf, val)
- asn1buf * buf;
- krb5_checksum * val;
+asn1_error_code asn1_decode_checksum(asn1buf *buf, krb5_checksum *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_encryption_key(buf, val)
- asn1buf * buf;
- krb5_keyblock * val;
+asn1_error_code asn1_decode_encryption_key(asn1buf *buf, krb5_keyblock *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_encrypted_data(buf, val)
- asn1buf * buf;
- krb5_enc_data * val;
+asn1_error_code asn1_decode_encrypted_data(asn1buf *buf, krb5_enc_data *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_krb5_flags(buf, val)
- asn1buf * buf;
- krb5_flags * val;
+asn1_error_code asn1_decode_krb5_flags(asn1buf *buf, krb5_flags *val)
{
setup();
asn1_octet unused, o;
krb5_flags f=0;
unused_var(taglen);
- retval = asn1_get_tag(buf,&class,&construction,&tagnum,&length);
+ retval = asn1_get_tag(buf,&asn1class,&construction,&tagnum,&length);
if(retval) return retval;
- if(class != UNIVERSAL || construction != PRIMITIVE ||
+ if(asn1class != UNIVERSAL || construction != PRIMITIVE ||
tagnum != ASN1_BITSTRING) return ASN1_BAD_ID;
retval = asn1buf_remove_octet(buf,&unused); /* # of padding bits */
return 0;
}
-asn1_error_code asn1_decode_ticket_flags(buf, val)
- asn1buf * buf;
- krb5_flags * val;
+asn1_error_code asn1_decode_ticket_flags(asn1buf *buf, krb5_flags *val)
{ return asn1_decode_krb5_flags(buf,val); }
-asn1_error_code asn1_decode_ap_options(buf, val)
- asn1buf * buf;
- krb5_flags * val;
+asn1_error_code asn1_decode_ap_options(asn1buf *buf, krb5_flags *val)
{ return asn1_decode_krb5_flags(buf,val); }
-asn1_error_code asn1_decode_kdc_options(buf, val)
- asn1buf * buf;
- krb5_flags * val;
+asn1_error_code asn1_decode_kdc_options(asn1buf *buf, krb5_flags *val)
{ return asn1_decode_krb5_flags(buf,val); }
-asn1_error_code asn1_decode_transited_encoding(buf, val)
- asn1buf * buf;
- krb5_transited * val;
+asn1_error_code asn1_decode_transited_encoding(asn1buf *buf, krb5_transited *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_enc_kdc_rep_part(buf, val)
- asn1buf * buf;
- krb5_enc_kdc_rep_part * val;
+asn1_error_code asn1_decode_enc_kdc_rep_part(asn1buf *buf, krb5_enc_kdc_rep_part *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_ticket(buf, val)
- asn1buf * buf;
- krb5_ticket * val;
+asn1_error_code asn1_decode_ticket(asn1buf *buf, krb5_ticket *val)
{
setup();
unsigned int applen;
val->magic = KV5M_TICKET;
}
if(!applen) {
- retval = asn1_get_tag(buf,&class,&construction,&tagnum,NULL);
+ retval = asn1_get_tag(buf,&asn1class,&construction,&tagnum,NULL);
if (retval) return retval;
}
cleanup();
}
-asn1_error_code asn1_decode_kdc_req(buf, val)
- asn1buf * buf;
- krb5_kdc_req * val;
+asn1_error_code asn1_decode_kdc_req(asn1buf *buf, krb5_kdc_req *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_kdc_req_body(buf, val)
- asn1buf * buf;
- krb5_kdc_req * val;
+asn1_error_code asn1_decode_kdc_req_body(asn1buf *buf, krb5_kdc_req *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_krb_safe_body(buf, val)
- asn1buf * buf;
- krb5_safe * val;
+asn1_error_code asn1_decode_krb_safe_body(asn1buf *buf, krb5_safe *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_host_address(buf, val)
- asn1buf * buf;
- krb5_address * val;
+asn1_error_code asn1_decode_host_address(asn1buf *buf, krb5_address *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_kdc_rep(buf, val)
- asn1buf * buf;
- krb5_kdc_rep * val;
+asn1_error_code asn1_decode_kdc_rep(asn1buf *buf, krb5_kdc_rep *val)
{
setup();
{ begin_structure();
cleanup()
-asn1_error_code asn1_decode_authorization_data(buf, val)
- asn1buf * buf;
- krb5_authdata *** val;
+asn1_error_code asn1_decode_authorization_data(asn1buf *buf, krb5_authdata ***val)
{
decode_array_body(krb5_authdata,asn1_decode_authdata_elt);
}
-asn1_error_code asn1_decode_authdata_elt(buf, val)
- asn1buf * buf;
- krb5_authdata * val;
+asn1_error_code asn1_decode_authdata_elt(asn1buf *buf, krb5_authdata *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_host_addresses(buf, val)
- asn1buf * buf;
- krb5_address *** val;
+asn1_error_code asn1_decode_host_addresses(asn1buf *buf, krb5_address ***val)
{
decode_array_body(krb5_address,asn1_decode_host_address);
}
-asn1_error_code asn1_decode_sequence_of_ticket(buf, val)
- asn1buf * buf;
- krb5_ticket *** val;
+asn1_error_code asn1_decode_sequence_of_ticket(asn1buf *buf, krb5_ticket ***val)
{
decode_array_body(krb5_ticket,asn1_decode_ticket);
}
-asn1_error_code asn1_decode_sequence_of_krb_cred_info(buf, val)
- asn1buf * buf;
- krb5_cred_info *** val;
+asn1_error_code asn1_decode_sequence_of_krb_cred_info(asn1buf *buf, krb5_cred_info ***val)
{
decode_array_body(krb5_cred_info,asn1_decode_krb_cred_info);
}
-asn1_error_code asn1_decode_krb_cred_info(buf, val)
- asn1buf * buf;
- krb5_cred_info * val;
+asn1_error_code asn1_decode_krb_cred_info(asn1buf *buf, krb5_cred_info *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_sequence_of_pa_data(buf, val)
- asn1buf * buf;
- krb5_pa_data *** val;
+asn1_error_code asn1_decode_sequence_of_pa_data(asn1buf *buf, krb5_pa_data ***val)
{
decode_array_body(krb5_pa_data,asn1_decode_pa_data);
}
-asn1_error_code asn1_decode_pa_data(buf, val)
- asn1buf * buf;
- krb5_pa_data * val;
+asn1_error_code asn1_decode_pa_data(asn1buf *buf, krb5_pa_data *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_last_req(buf, val)
- asn1buf * buf;
- krb5_last_req_entry *** val;
+asn1_error_code asn1_decode_last_req(asn1buf *buf, krb5_last_req_entry ***val)
{
decode_array_body(krb5_last_req_entry,asn1_decode_last_req_entry);
}
-asn1_error_code asn1_decode_last_req_entry(buf, val)
- asn1buf * buf;
- krb5_last_req_entry * val;
+asn1_error_code asn1_decode_last_req_entry(asn1buf *buf, krb5_last_req_entry *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_sequence_of_enctype(buf, num, val)
- asn1buf * buf;
- int * num;
- krb5_enctype ** val;
+asn1_error_code asn1_decode_sequence_of_enctype(asn1buf *buf, int *num, krb5_enctype **val)
{
asn1_error_code retval;
{ sequence_of(buf);
cleanup();
}
-asn1_error_code asn1_decode_etype_info_entry(buf, val)
- asn1buf * buf;
- krb5_etype_info_entry * val;
+asn1_error_code asn1_decode_etype_info_entry(asn1buf *buf, krb5_etype_info_entry *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_etype_info(buf, val)
- asn1buf * buf;
- krb5_etype_info_entry *** val;
+asn1_error_code asn1_decode_etype_info(asn1buf *buf, krb5_etype_info_entry ***val)
{
decode_array_body(krb5_etype_info_entry,asn1_decode_etype_info_entry);
}
-asn1_error_code asn1_decode_passwdsequence(buf, val)
- asn1buf * buf;
- passwd_phrase_element * val;
+asn1_error_code asn1_decode_passwdsequence(asn1buf *buf, passwd_phrase_element *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_sequence_of_passwdsequence(buf, val)
- asn1buf * buf;
- passwd_phrase_element *** val;
+asn1_error_code asn1_decode_sequence_of_passwdsequence(asn1buf *buf, passwd_phrase_element ***val)
{
decode_array_body(passwd_phrase_element,asn1_decode_passwdsequence);
}
-asn1_error_code asn1_decode_sam_flags(buf,val)
- asn1buf * buf;
- krb5_flags *val;
+asn1_error_code asn1_decode_sam_flags(asn1buf *buf, krb5_flags *val)
{ return asn1_decode_krb5_flags(buf,val); }
#define opt_string(val,n,fn) opt_lenfield((val).length,(val).data,n,fn)
get_field_body(var,decoder); }\
else var.length = 0
-asn1_error_code asn1_decode_sam_challenge(buf,val)
- asn1buf * buf;
- krb5_sam_challenge *val;
+asn1_error_code asn1_decode_sam_challenge(asn1buf *buf, krb5_sam_challenge *val)
{
setup();
{ begin_structure();
}
cleanup();
}
-asn1_error_code asn1_decode_enc_sam_key(buf, val)
- asn1buf * buf;
- krb5_sam_key * val;
+asn1_error_code asn1_decode_enc_sam_key(asn1buf *buf, krb5_sam_key *val)
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_enc_sam_response_enc(buf, val)
- asn1buf * buf;
- krb5_enc_sam_response_enc * val;
+asn1_error_code asn1_decode_enc_sam_response_enc(asn1buf *buf, krb5_enc_sam_response_enc *val)
{
setup();
{ begin_structure();
fld.ciphertext.length = 0;\
}
-asn1_error_code asn1_decode_sam_response(buf, val)
- asn1buf * buf;
- krb5_sam_response * val;
+asn1_error_code asn1_decode_sam_response(asn1buf *buf, krb5_sam_response *val)
{
setup();
{ begin_structure();
}
-asn1_error_code asn1_decode_predicted_sam_response(buf, val)
- asn1buf * buf;
- krb5_predicted_sam_response * val;
+asn1_error_code asn1_decode_predicted_sam_response(asn1buf *buf, krb5_predicted_sam_response *val)
{
setup();
{ begin_structure();
*retlen = sum;\
return 0
-asn1_error_code asn1_encode_ui_4(buf, val, retlen)
- asn1buf * buf;
- const krb5_ui_4 val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_ui_4(asn1buf *buf, const krb5_ui_4 val, unsigned int *retlen)
{
return asn1_encode_unsigned_integer(buf,val,retlen);
}
-asn1_error_code asn1_encode_realm(buf, val, retlen)
- asn1buf * buf;
- const krb5_principal val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_realm(asn1buf *buf, const krb5_principal val, unsigned int *retlen)
{
if (val == NULL ||
(val->realm.length && val->realm.data == NULL))
retlen);
}
-asn1_error_code asn1_encode_principal_name(buf, val, retlen)
- asn1buf * buf;
- const krb5_principal val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_principal_name(asn1buf *buf, const krb5_principal val, unsigned int *retlen)
{
asn1_setup();
int n;
asn1_cleanup();
}
-asn1_error_code asn1_encode_kerberos_time(buf, val, retlen)
- asn1buf * buf;
- const krb5_timestamp val;
- unsigned int * retlen;
-
+asn1_error_code asn1_encode_kerberos_time(asn1buf *buf, const krb5_timestamp val, unsigned int *retlen)
{
return asn1_encode_generaltime(buf,val,retlen);
}
-asn1_error_code asn1_encode_host_address(buf, val, retlen)
- asn1buf * buf;
- const krb5_address * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_host_address(asn1buf *buf, const krb5_address *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_host_addresses(buf, val, retlen)
- asn1buf * buf;
- const krb5_address ** val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_host_addresses(asn1buf *buf, const krb5_address **val, unsigned int *retlen)
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_encrypted_data(buf, val, retlen)
- asn1buf * buf;
- const krb5_enc_data * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_encrypted_data(asn1buf *buf, const krb5_enc_data *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_krb5_flags(buf, val, retlen)
- asn1buf * buf;
- const krb5_flags val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_krb5_flags(asn1buf *buf, const krb5_flags val, unsigned int *retlen)
{
asn1_setup();
krb5_flags valcopy = val;
return 0;
}
-asn1_error_code asn1_encode_ap_options(buf, val, retlen)
- asn1buf * buf;
- const krb5_flags val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_ap_options(asn1buf *buf, const krb5_flags val, unsigned int *retlen)
{
return asn1_encode_krb5_flags(buf,val,retlen);
}
-asn1_error_code asn1_encode_ticket_flags(buf, val, retlen)
- asn1buf * buf;
- const krb5_flags val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_ticket_flags(asn1buf *buf, const krb5_flags val, unsigned int *retlen)
{
return asn1_encode_krb5_flags(buf,val,retlen);
}
-asn1_error_code asn1_encode_kdc_options(buf, val, retlen)
- asn1buf * buf;
- const krb5_flags val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_kdc_options(asn1buf *buf, const krb5_flags val, unsigned int *retlen)
{
return asn1_encode_krb5_flags(buf,val,retlen);
}
-asn1_error_code asn1_encode_authorization_data(buf, val, retlen)
- asn1buf * buf;
- const krb5_authdata ** val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_authorization_data(asn1buf *buf, const krb5_authdata **val, unsigned int *retlen)
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_krb5_authdata_elt(buf, val, retlen)
- asn1buf * buf;
- const krb5_authdata * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_krb5_authdata_elt(asn1buf *buf, const krb5_authdata *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_kdc_rep(msg_type, buf, val, retlen)
- int msg_type;
- asn1buf * buf;
- const krb5_kdc_rep * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_kdc_rep(int msg_type, asn1buf *buf, const krb5_kdc_rep *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_enc_kdc_rep_part(buf, val, retlen)
- asn1buf * buf;
- const krb5_enc_kdc_rep_part * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_enc_kdc_rep_part(asn1buf *buf, const krb5_enc_kdc_rep_part *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_kdc_req_body(buf, rep, retlen)
- asn1buf * buf;
- const krb5_kdc_req * rep;
- unsigned int * retlen;
+asn1_error_code asn1_encode_kdc_req_body(asn1buf *buf, const krb5_kdc_req *rep, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_encryption_key(buf, val, retlen)
- asn1buf * buf;
- const krb5_keyblock * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_encryption_key(asn1buf *buf, const krb5_keyblock *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_checksum(buf, val, retlen)
- asn1buf * buf;
- const krb5_checksum * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_checksum(asn1buf *buf, const krb5_checksum *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_transited_encoding(buf, val, retlen)
- asn1buf * buf;
- const krb5_transited * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_transited_encoding(asn1buf *buf, const krb5_transited *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_last_req(buf, val, retlen)
- asn1buf * buf;
- const krb5_last_req_entry ** val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_last_req(asn1buf *buf, const krb5_last_req_entry **val, unsigned int *retlen)
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_last_req_entry(buf, val, retlen)
- asn1buf * buf;
- const krb5_last_req_entry * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_last_req_entry(asn1buf *buf, const krb5_last_req_entry *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_pa_data(buf, val, retlen)
- asn1buf * buf;
- const krb5_pa_data ** val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_sequence_of_pa_data(asn1buf *buf, const krb5_pa_data **val, unsigned int *retlen)
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_pa_data(buf, val, retlen)
- asn1buf * buf;
- const krb5_pa_data * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_pa_data(asn1buf *buf, const krb5_pa_data *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_ticket(buf, val, retlen)
- asn1buf * buf;
- const krb5_ticket ** val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_sequence_of_ticket(asn1buf *buf, const krb5_ticket **val, unsigned int *retlen)
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_ticket(buf, val, retlen)
- asn1buf * buf;
- const krb5_ticket * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_ticket(asn1buf *buf, const krb5_ticket *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_enctype(buf, len, val, retlen)
- asn1buf * buf;
- const int len;
- const krb5_enctype * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_sequence_of_enctype(asn1buf *buf, const int len, const krb5_enctype *val, unsigned int *retlen)
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_kdc_req(msg_type, buf, val, retlen)
- int msg_type;
- asn1buf * buf;
- const krb5_kdc_req * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_kdc_req(int msg_type, asn1buf *buf, const krb5_kdc_req *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_krb_safe_body(buf, val, retlen)
- asn1buf * buf;
- const krb5_safe * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_krb_safe_body(asn1buf *buf, const krb5_safe *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_krb_cred_info(buf, val, retlen)
- asn1buf * buf;
- const krb5_cred_info ** val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_sequence_of_krb_cred_info(asn1buf *buf, const krb5_cred_info **val, unsigned int *retlen)
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_krb_cred_info(buf, val, retlen)
- asn1buf * buf;
- const krb5_cred_info * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_krb_cred_info(asn1buf *buf, const krb5_cred_info *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_etype_info_entry(buf, val, retlen)
- asn1buf * buf;
- const krb5_etype_info_entry * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_etype_info_entry(asn1buf *buf, const krb5_etype_info_entry *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_etype_info(buf, val, retlen)
- asn1buf * buf;
- const krb5_etype_info_entry ** val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_etype_info(asn1buf *buf, const krb5_etype_info_entry **val, unsigned int *retlen)
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_passwdsequence(buf, val, retlen)
- asn1buf * buf;
- const passwd_phrase_element ** val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_sequence_of_passwdsequence(asn1buf *buf, const passwd_phrase_element **val, unsigned int *retlen)
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_passwdsequence(buf, val, retlen)
- asn1buf * buf;
- const passwd_phrase_element * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_passwdsequence(asn1buf *buf, const passwd_phrase_element *val, unsigned int *retlen)
{
asn1_setup();
asn1_addlenfield(val->phrase->length,val->phrase->data,1,asn1_encode_charstring);
asn1_cleanup();
}
-asn1_error_code asn1_encode_sam_flags(buf, val, retlen)
- asn1buf * buf;
- const krb5_flags val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_sam_flags(asn1buf *buf, const krb5_flags val, unsigned int *retlen)
{
return asn1_encode_krb5_flags(buf,val,retlen);
}
#define add_optstring(val,n,fn) \
if ((val).length >= 0) {asn1_addlenfield((val).length,(val).data,n,fn);}
-asn1_error_code asn1_encode_sam_challenge(buf, val, retlen)
- asn1buf * buf;
- const krb5_sam_challenge * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_sam_challenge(asn1buf *buf, const krb5_sam_challenge *val, unsigned int *retlen)
{
asn1_setup();
/* possibly wrong */
asn1_cleanup();
}
-asn1_error_code asn1_encode_sam_key(buf, val, retlen)
- asn1buf * buf;
- const krb5_sam_key * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_sam_key(asn1buf *buf, const krb5_sam_key *val, unsigned int *retlen)
{
asn1_setup();
asn1_addfield(&(val->sam_key),0,asn1_encode_encryption_key);
}
-asn1_error_code asn1_encode_enc_sam_response_enc(buf, val, retlen)
- asn1buf * buf;
- const krb5_enc_sam_response_enc * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_enc_sam_response_enc(asn1buf *buf, const krb5_enc_sam_response_enc *val, unsigned int *retlen)
{
asn1_setup();
add_optstring(val->sam_sad,3,asn1_encode_charstring);
asn1_cleanup();
}
-asn1_error_code asn1_encode_sam_response(buf, val, retlen)
- asn1buf * buf;
- const krb5_sam_response * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_sam_response(asn1buf *buf, const krb5_sam_response *val, unsigned int *retlen)
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_predicted_sam_response(buf, val, retlen)
- asn1buf * buf;
- const krb5_predicted_sam_response * val;
- unsigned int * retlen;
+asn1_error_code asn1_encode_predicted_sam_response(asn1buf *buf, const krb5_predicted_sam_response *val, unsigned int *retlen)
{
asn1_setup();
#include "asn1_make.h"
-asn1_error_code asn1_make_etag(buf, class, tagnum, in_len, retlen)
- asn1buf * buf;
- const asn1_class class;
- const asn1_tagnum tagnum;
- const unsigned int in_len;
- unsigned int * retlen;
+asn1_error_code asn1_make_etag(asn1buf *buf, asn1_class asn1class,
+ asn1_tagnum tagnum, unsigned int in_len,
+ unsigned int *retlen)
{
- return asn1_make_tag(buf,class,CONSTRUCTED,tagnum,in_len,retlen);
+ return asn1_make_tag(buf,asn1class,CONSTRUCTED,tagnum,in_len,retlen);
}
-asn1_error_code asn1_make_tag(buf, class, construction, tagnum, in_len, retlen)
- asn1buf * buf;
- const asn1_class class;
- const asn1_construction construction;
- const asn1_tagnum tagnum;
- const unsigned int in_len;
- unsigned int * retlen;
+asn1_error_code asn1_make_tag(asn1buf *buf, asn1_class asn1class,
+ asn1_construction construction,
+ asn1_tagnum tagnum, unsigned int in_len,
+ unsigned int *retlen)
{
asn1_error_code retval;
unsigned int sumlen=0, length;
retval = asn1_make_length(buf,in_len, &length);
if(retval) return retval;
sumlen += length;
- retval = asn1_make_id(buf,class,construction,tagnum,&length);
+ retval = asn1_make_id(buf,asn1class,construction,tagnum,&length);
if(retval) return retval;
sumlen += length;
return 0;
}
-asn1_error_code asn1_make_length(buf, in_len, retlen)
- asn1buf * buf;
- const unsigned int in_len;
- unsigned int * retlen;
+asn1_error_code asn1_make_length(asn1buf *buf, const unsigned int in_len, unsigned int *retlen)
{
asn1_error_code retval;
return 0;
}
-asn1_error_code asn1_make_id(buf, class, construction, tagnum, retlen)
- asn1buf * buf;
- const asn1_class class;
- const asn1_construction construction;
- const asn1_tagnum tagnum;
- unsigned int * retlen;
+asn1_error_code asn1_make_id(asn1buf *buf, asn1_class asn1class,
+ asn1_construction construction,
+ asn1_tagnum tagnum, unsigned int *retlen)
{
asn1_error_code retval;
if(tagnum < 31) {
- retval = asn1buf_insert_octet(buf, (asn1_octet) (class | construction |
- (asn1_octet)tagnum));
+ retval = asn1buf_insert_octet(buf, (asn1_octet) (asn1class | construction |
+ (asn1_octet)tagnum));
if(retval) return retval;
*retlen = 1;
}else{
length++;
}
- retval = asn1buf_insert_octet(buf, (asn1_octet) (class | construction | 0x1F));
+ retval = asn1buf_insert_octet(buf, (asn1_octet) (asn1class | construction | 0x1F));
if(retval) return retval;
length++;
*retlen = length;
return 0;
}
-asn1_error_code asn1_make_sequence(buf, seq_len, retlen)
- asn1buf * buf;
- const unsigned int seq_len;
- unsigned int * retlen;
+asn1_error_code asn1_make_sequence(asn1buf *buf, const unsigned int seq_len, unsigned int *retlen)
{
asn1_error_code retval;
unsigned int len, sum=0;
return 0;
}
-asn1_error_code asn1_make_set(buf, set_len, retlen)
- asn1buf * buf;
- const unsigned int set_len;
- unsigned int * retlen;
+asn1_error_code asn1_make_set(asn1buf *buf, const unsigned int set_len, unsigned int *retlen)
{
asn1_error_code retval;
unsigned int len, sum=0;
return 0;
}
-asn1_error_code asn1_make_string(buf, length, string, retlen)
- asn1buf * buf;
- const unsigned int length;
- const char * string;
- int * retlen;
+asn1_error_code asn1_make_string(asn1buf *buf, const unsigned int length, const char *string, int *retlen)
{
asn1_error_code retval;
asn1_error_code asn1_make_etag
(asn1buf *buf,
- const asn1_class class,
+ const asn1_class asn1class,
const asn1_tagnum tagnum,
const unsigned int in_len,
unsigned int *retlen);
/* requires *buf is allocated, in_len is the length of an ASN.1 encoding
which has just been inserted in *buf
modifies *buf, *retlen
- effects Inserts an explicit tag with class = class, id# = tag
+ effects Inserts an explicit tag with class = asn1class, id# = tag
length = in_len into *buf.
Returns the length of this encoding in *retlen.
Returns ENOMEM if memory runs out. */
asn1_error_code asn1_make_tag
- (asn1buf *buf, const asn1_class class,
+ (asn1buf *buf, const asn1_class asn1class,
const asn1_construction construction,
const asn1_tagnum tagnum,
const unsigned int in_len,
/* requires *buf is allocated, in_len is the length of an ASN.1 encoding
which has just been inserted in *buf
modifies *buf, *retlen
- effects Inserts the encoding of a tag with class = class,
+ effects Inserts the encoding of a tag with class = asn1class,
primitive/constructed staus = construction,
id# = tag and length = in_len into *buf.
Returns the length of this encoding in *retlen.
/* "helper" procedure for asn1_make_tag */
asn1_error_code asn1_make_id
(asn1buf *buf,
- const asn1_class class,
+ const asn1_class asn1class,
const asn1_construction construction,
const asn1_tagnum tagnum,
unsigned int *retlen);
-/* requires *buf is allocated, class and tagnum are appropriate for
+/* requires *buf is allocated, asn1class and tagnum are appropriate for
the ASN.1 encoding which has just been inserted in *buf
modifies *buf, *retlen
- effects Inserts id octet(s) of class class and tag number tagnum
+ effects Inserts id octet(s) of class asn1class and tag number tagnum
into *buf */
#endif
#include "asn1_misc.h"
-asn1_error_code asn1_krb5_realm_copy(target, source)
- krb5_principal target;
- krb5_principal source;
+asn1_error_code asn1_krb5_realm_copy(krb5_principal target, krb5_principal source)
{
target->realm.length = source->realm.length;
target->realm.data = (char*)malloc(target->realm.length); /* copy realm */
#define asn1_is_eoc(class, num, indef) \
((class) == UNIVERSAL && !(num) && !(indef))
-asn1_error_code asn1buf_create(buf)
- asn1buf ** buf;
+asn1_error_code asn1buf_create(asn1buf **buf)
{
*buf = (asn1buf*)malloc(sizeof(asn1buf));
if (*buf == NULL) return ENOMEM;
return 0;
}
-asn1_error_code asn1buf_wrap_data(buf, code)
- asn1buf * buf;
- const krb5_data * code;
+asn1_error_code asn1buf_wrap_data(asn1buf *buf, const krb5_data *code)
{
if(code == NULL || code->data == NULL) return ASN1_MISSING_FIELD;
buf->next = buf->base = code->data;
return 0;
}
-asn1_error_code asn1buf_imbed(subbuf, buf, length, indef)
- asn1buf * subbuf;
- const asn1buf * buf;
- const unsigned int length;
- const int indef;
+asn1_error_code asn1buf_imbed(asn1buf *subbuf, const asn1buf *buf, const unsigned int length, const int indef)
{
subbuf->base = subbuf->next = buf->next;
if (!indef) {
return 0;
}
-asn1_error_code asn1buf_sync(buf, subbuf, class, lasttag, length, indef, seqindef)
- asn1buf * buf;
- asn1buf * subbuf;
- const asn1_class class;
- const asn1_tagnum lasttag;
- const unsigned int length;
- const int indef;
- const int seqindef;
+asn1_error_code asn1buf_sync(asn1buf *buf, asn1buf *subbuf,
+ asn1_class asn1class, asn1_tagnum lasttag,
+ unsigned int length, int indef, int seqindef)
{
asn1_error_code retval;
if (!seqindef) {
/* sequence was encoded as definite length */
buf->next = subbuf->bound + 1;
- } else if (!asn1_is_eoc(class, lasttag, indef)) {
+ } else if (!asn1_is_eoc(asn1class, lasttag, indef)) {
retval = asn1buf_skiptail(subbuf, length, indef);
if (retval)
return retval;
return 0;
}
-asn1_error_code asn1buf_skiptail(buf, length, indef)
- asn1buf *buf;
- const unsigned int length;
- const int indef;
+asn1_error_code asn1buf_skiptail(asn1buf *buf, const unsigned int length, const int indef)
{
asn1_error_code retval;
- asn1_class class;
+ asn1_class asn1class;
asn1_construction construction;
asn1_tagnum tagnum;
unsigned int taglen;
return ASN1_OVERRUN;
}
while (nestlevel > 0) {
- retval = asn1_get_tag_indef(buf, &class, &construction, &tagnum,
+ retval = asn1_get_tag_indef(buf, &asn1class, &construction, &tagnum,
&taglen, &tagindef);
if (retval) return retval;
if (!tagindef) {
}
if (tagindef)
nestlevel++;
- if (asn1_is_eoc(class, tagnum, tagindef))
+ if (asn1_is_eoc(asn1class, tagnum, tagindef))
nestlevel--; /* got an EOC encoding */
}
return 0;
}
-asn1_error_code asn1buf_destroy(buf)
- asn1buf ** buf;
+asn1_error_code asn1buf_destroy(asn1buf **buf)
{
if (*buf != NULL) {
if ((*buf)->base != NULL) free((*buf)->base);
#ifdef asn1buf_insert_octet
#undef asn1buf_insert_octet
#endif
-asn1_error_code asn1buf_insert_octet(buf, o)
- asn1buf * buf;
- const int o;
+asn1_error_code asn1buf_insert_octet(asn1buf *buf, const int o)
{
asn1_error_code retval;
return 0;
}
-asn1_error_code asn1buf_insert_octetstring(buf, len, s)
- asn1buf * buf;
- const unsigned int len;
- const krb5_octet * s;
+asn1_error_code asn1buf_insert_octetstring(asn1buf *buf, const unsigned int len, const krb5_octet *s)
{
asn1_error_code retval;
int length;
return 0;
}
-asn1_error_code asn1buf_insert_charstring(buf, len, s)
- asn1buf * buf;
- const unsigned int len;
- const char * s;
+asn1_error_code asn1buf_insert_charstring(asn1buf *buf, const unsigned int len, const char *s)
{
asn1_error_code retval;
int length;
}
#undef asn1buf_remove_octet
-asn1_error_code asn1buf_remove_octet(buf, o)
- asn1buf * buf;
- asn1_octet * o;
+asn1_error_code asn1buf_remove_octet(asn1buf *buf, asn1_octet *o)
{
if(buf->next > buf->bound) return ASN1_OVERRUN;
*o = (asn1_octet)(*((buf->next)++));
return 0;
}
-asn1_error_code asn1buf_remove_octetstring(buf, len, s)
- asn1buf * buf;
- const unsigned int len;
- asn1_octet ** s;
+asn1_error_code asn1buf_remove_octetstring(asn1buf *buf, const unsigned int len, asn1_octet **s)
{
int i;
return 0;
}
-asn1_error_code asn1buf_remove_charstring(buf, len, s)
- asn1buf * buf;
- const unsigned int len;
- char ** s;
+asn1_error_code asn1buf_remove_charstring(asn1buf *buf, const unsigned int len, char **s)
{
int i;
return 0;
}
-int asn1buf_remains(buf, indef)
- asn1buf *buf;
- int indef;
+int asn1buf_remains(asn1buf *buf, int indef)
{
int remain;
if(buf == NULL || buf->base == NULL) return 0;
else return remain;
}
-asn1_error_code asn12krb5_buf(buf, code)
- const asn1buf * buf;
- krb5_data ** code;
+asn1_error_code asn12krb5_buf(const asn1buf *buf, krb5_data **code)
{
int i;
*code = (krb5_data*)calloc(1,sizeof(krb5_data));
/* These parse and unparse procedures should be moved out. They're
useful only for debugging and superfluous in the production version. */
-asn1_error_code asn1buf_unparse(buf, s)
- const asn1buf * buf;
- char ** s;
+asn1_error_code asn1buf_unparse(const asn1buf *buf, char **s)
{
if(*s != NULL) free(*s);
if(buf == NULL){
return 0;
}
-asn1_error_code asn1buf_hex_unparse(buf, s)
- const asn1buf * buf;
- char ** s;
+asn1_error_code asn1buf_hex_unparse(const asn1buf *buf, char **s)
{
#define hexchar(d) ((d)<=9 ? ('0'+(d)) :\
((d)<=15 ? ('A'+(d)-10) :\
/* Private Procedures */
#undef asn1buf_size
-int asn1buf_size(buf)
- const asn1buf * buf;
+int asn1buf_size(const asn1buf *buf)
{
if(buf == NULL || buf->base == NULL) return 0;
return buf->bound - buf->base + 1;
}
#undef asn1buf_free
-int asn1buf_free(buf)
- const asn1buf * buf;
+int asn1buf_free(const asn1buf *buf)
{
if(buf == NULL || buf->base == NULL) return 0;
else return buf->bound - buf->next + 1;
}
#undef asn1buf_ensure_space
-asn1_error_code asn1buf_ensure_space(buf, amount)
- asn1buf * buf;
- const unsigned int amount;
+asn1_error_code asn1buf_ensure_space(asn1buf *buf, const unsigned int amount)
{
int avail = asn1buf_free(buf);
if(avail < amount){
return 0;
}
-asn1_error_code asn1buf_expand(buf, inc)
- asn1buf * buf;
- unsigned int inc;
+asn1_error_code asn1buf_expand(asn1buf *buf, unsigned int inc)
{
#define STANDARD_INCREMENT 200
int next_offset = buf->next - buf->base;
}
#undef asn1buf_len
-int asn1buf_len(buf)
- const asn1buf * buf;
+int asn1buf_len(const asn1buf *buf)
{
return buf->next - buf->base;
}
position starts at the beginning of *subbuf. */
asn1_error_code asn1buf_sync
- (asn1buf *buf, asn1buf *subbuf, const asn1_class class,
+ (asn1buf *buf, asn1buf *subbuf, const asn1_class Class,
const asn1_tagnum lasttag,
const unsigned int length, const int indef,
const int seqindef);
effects Inserts o into the buffer *buf, expanding the buffer if
necessary. Returns ENOMEM memory is exhausted. */
#if ((__GNUC__ >= 2) && !defined(ASN1BUF_OMIT_INLINE_FUNCS))
-extern __inline__ asn1_error_code asn1buf_insert_octet(buf, o)
- asn1buf * buf;
- const int o;
+extern __inline__ asn1_error_code asn1buf_insert_octet(asn1buf *buf, const int o)
{
asn1_error_code retval;
if(retval) return retval
#define setup_no_tagnum()\
-asn1_class class;\
+asn1_class asn1class;\
asn1_construction construction;\
setup_buf_only()
/* process encoding header ***************************************/
/* decode tag and check that it == [APPLICATION tagnum] */
#define check_apptag(tagexpect)\
-retval = asn1_get_tag(&buf,&class,&construction,&tagnum,NULL);\
+retval = asn1_get_tag(&buf,&asn1class,&construction,&tagnum,NULL);\
if(retval) clean_return(retval);\
-if(class != APPLICATION || construction != CONSTRUCTED) \
+if(asn1class != APPLICATION || construction != CONSTRUCTED) \
clean_return(ASN1_BAD_ID);\
if(tagnum != (tagexpect)) clean_return(KRB5_BADMSGTYPE)
/* decode an explicit tag and place the number in tagnum */
#define next_tag()\
-retval = asn1_get_tag_indef(&subbuf,&class,&construction,&tagnum,NULL,&indef);\
+retval = asn1_get_tag_indef(&subbuf,&asn1class,&construction,&tagnum,NULL,&indef);\
if(retval) clean_return(retval)
#define get_eoc() \
-retval = asn1_get_tag_indef(&subbuf,&class,&construction, \
+retval = asn1_get_tag_indef(&subbuf,&asn1class,&construction, \
&tagnum,NULL,&indef); \
if(retval) return retval; \
-if(class != UNIVERSAL || tagnum || indef) \
+if(asn1class != UNIVERSAL || tagnum || indef) \
return ASN1_MISSING_EOC
/* decode sequence header and initialize tagnum with the first field */
next_tag()
#define end_structure()\
-retval = asn1buf_sync(&buf,&subbuf,class,tagnum,length,indef,seqindef);\
+retval = asn1buf_sync(&buf,&subbuf,asn1class,tagnum,length,indef,seqindef);\
if (retval) clean_return(retval)
/* process fields *******************************************/
#define get_field(var,tagexpect,decoder)\
if(tagnum > (tagexpect)) clean_return(ASN1_MISSING_FIELD);\
if(tagnum < (tagexpect)) clean_return(ASN1_MISPLACED_FIELD);\
-if(class != CONTEXT_SPECIFIC || construction != CONSTRUCTED)\
+if(asn1class != CONTEXT_SPECIFIC || construction != CONSTRUCTED)\
clean_return(ASN1_BAD_ID);\
get_field_body(var,decoder)
/* decode (or skip, if not present) an optional field */
#define opt_field(var,tagexpect,decoder)\
-if(class != CONTEXT_SPECIFIC || construction != CONSTRUCTED)\
+if(asn1class != CONTEXT_SPECIFIC || construction != CONSTRUCTED)\
clean_return(ASN1_BAD_ID);\
if(tagnum == (tagexpect)){ get_field_body(var,decoder); }
#define get_lenfield(len,var,tagexpect,decoder)\
if(tagnum > (tagexpect)) clean_return(ASN1_MISSING_FIELD);\
if(tagnum < (tagexpect)) clean_return(ASN1_MISPLACED_FIELD);\
-if(class != CONTEXT_SPECIFIC || construction != CONSTRUCTED)\
+if(asn1class != CONTEXT_SPECIFIC || construction != CONSTRUCTED)\
clean_return(ASN1_BAD_ID);\
get_lenfield_body(len,var,decoder)
/* decode an optional field w/ length */
#define opt_lenfield(len,var,tagexpect,decoder)\
-if(class != CONTEXT_SPECIFIC || construction != CONSTRUCTED)\
+if(asn1class != CONTEXT_SPECIFIC || construction != CONSTRUCTED)\
clean_return(ASN1_BAD_ID);\
if(tagnum == (tagexpect)){\
get_lenfield_body(len,var,decoder);\
#define free_field(rep,f) if ((rep)->f) free((rep)->f)
#define clear_field(rep,f) (*(rep))->f = 0
-krb5_error_code decode_krb5_authenticator(code, rep)
- const krb5_data * code;
- krb5_authenticator ** rep;
+krb5_error_code decode_krb5_authenticator(const krb5_data *code, krb5_authenticator **rep)
{
setup();
alloc_field(*rep,krb5_authenticator);
krb5_error_code
KRB5_CALLCONV
-krb5_decode_ticket(code, rep)
- const krb5_data * code;
- krb5_ticket ** rep;
+krb5_decode_ticket(const krb5_data *code, krb5_ticket **rep)
{
return decode_krb5_ticket(code, rep);
}
-krb5_error_code decode_krb5_ticket(code, rep)
- const krb5_data * code;
- krb5_ticket ** rep;
+krb5_error_code decode_krb5_ticket(const krb5_data *code, krb5_ticket **rep)
{
setup();
alloc_field(*rep,krb5_ticket);
return retval;
}
-krb5_error_code decode_krb5_encryption_key(code, rep)
- const krb5_data * code;
- krb5_keyblock ** rep;
+krb5_error_code decode_krb5_encryption_key(const krb5_data *code, krb5_keyblock **rep)
{
setup();
alloc_field(*rep,krb5_keyblock);
cleanup(free);
}
-krb5_error_code decode_krb5_enc_tkt_part(code, rep)
- const krb5_data * code;
- krb5_enc_tkt_part ** rep;
+krb5_error_code decode_krb5_enc_tkt_part(const krb5_data *code, krb5_enc_tkt_part **rep)
{
setup();
alloc_field(*rep,krb5_enc_tkt_part);
return retval;
}
-krb5_error_code decode_krb5_enc_kdc_rep_part(code, rep)
- const krb5_data * code;
- krb5_enc_kdc_rep_part ** rep;
+krb5_error_code decode_krb5_enc_kdc_rep_part(const krb5_data *code, krb5_enc_kdc_rep_part **rep)
{
setup_no_length();
alloc_field(*rep,krb5_enc_kdc_rep_part);
- retval = asn1_get_tag(&buf,&class,&construction,&tagnum,NULL);
+ retval = asn1_get_tag(&buf,&asn1class,&construction,&tagnum,NULL);
if(retval) clean_return(retval);
- if(class != APPLICATION || construction != CONSTRUCTED) clean_return(ASN1_BAD_ID);
+ if(asn1class != APPLICATION || construction != CONSTRUCTED) clean_return(ASN1_BAD_ID);
if(tagnum == 25) (*rep)->msg_type = KRB5_AS_REP;
else if(tagnum == 26) (*rep)->msg_type = KRB5_TGS_REP;
else clean_return(KRB5_BADMSGTYPE);
cleanup(free);
}
-krb5_error_code decode_krb5_as_rep(code, rep)
- const krb5_data * code;
- krb5_kdc_rep ** rep;
+krb5_error_code decode_krb5_as_rep(const krb5_data *code, krb5_kdc_rep **rep)
{
setup_no_length();
alloc_field(*rep,krb5_kdc_rep);
cleanup(free);
}
-krb5_error_code decode_krb5_tgs_rep(code, rep)
- const krb5_data * code;
- krb5_kdc_rep ** rep;
+krb5_error_code decode_krb5_tgs_rep(const krb5_data *code, krb5_kdc_rep **rep)
{
setup_no_length();
alloc_field(*rep,krb5_kdc_rep);
cleanup(free);
}
-krb5_error_code decode_krb5_ap_req(code, rep)
- const krb5_data * code;
- krb5_ap_req ** rep;
+krb5_error_code decode_krb5_ap_req(const krb5_data *code, krb5_ap_req **rep)
{
setup();
alloc_field(*rep,krb5_ap_req);
return retval;
}
-krb5_error_code decode_krb5_ap_rep(code, rep)
- const krb5_data * code;
- krb5_ap_rep ** rep;
+krb5_error_code decode_krb5_ap_rep(const krb5_data *code, krb5_ap_rep **rep)
{
setup();
alloc_field(*rep,krb5_ap_rep);
cleanup(free);
}
-krb5_error_code decode_krb5_ap_rep_enc_part(code, rep)
- const krb5_data * code;
- krb5_ap_rep_enc_part ** rep;
+krb5_error_code decode_krb5_ap_rep_enc_part(const krb5_data *code, krb5_ap_rep_enc_part **rep)
{
setup();
alloc_field(*rep,krb5_ap_rep_enc_part);
return retval;
}
-krb5_error_code decode_krb5_as_req(code, rep)
- const krb5_data * code;
- krb5_kdc_req ** rep;
+krb5_error_code decode_krb5_as_req(const krb5_data *code, krb5_kdc_req **rep)
{
setup_no_length();
alloc_field(*rep,krb5_kdc_req);
cleanup(free);
}
-krb5_error_code decode_krb5_tgs_req(code, rep)
- const krb5_data * code;
- krb5_kdc_req ** rep;
+krb5_error_code decode_krb5_tgs_req(const krb5_data *code, krb5_kdc_req **rep)
{
setup_no_length();
alloc_field(*rep,krb5_kdc_req);
cleanup(free);
}
-krb5_error_code decode_krb5_kdc_req_body(code, rep)
- const krb5_data * code;
- krb5_kdc_req ** rep;
+krb5_error_code decode_krb5_kdc_req_body(const krb5_data *code, krb5_kdc_req **rep)
{
setup_buf_only();
alloc_field(*rep,krb5_kdc_req);
cleanup(free);
}
-krb5_error_code decode_krb5_safe(code, rep)
- const krb5_data * code;
- krb5_safe ** rep;
+krb5_error_code decode_krb5_safe(const krb5_data *code, krb5_safe **rep)
{
setup();
alloc_field(*rep,krb5_safe);
return retval;
}
-krb5_error_code decode_krb5_priv(code, rep)
- const krb5_data * code;
- krb5_priv ** rep;
+krb5_error_code decode_krb5_priv(const krb5_data *code, krb5_priv **rep)
{
setup();
alloc_field(*rep,krb5_priv);
cleanup(free);
}
-krb5_error_code decode_krb5_enc_priv_part(code, rep)
- const krb5_data * code;
- krb5_priv_enc_part ** rep;
+krb5_error_code decode_krb5_enc_priv_part(const krb5_data *code, krb5_priv_enc_part **rep)
{
setup();
alloc_field(*rep,krb5_priv_enc_part);
return retval;
}
-krb5_error_code decode_krb5_cred(code, rep)
- const krb5_data * code;
- krb5_cred ** rep;
+krb5_error_code decode_krb5_cred(const krb5_data *code, krb5_cred **rep)
{
setup();
alloc_field(*rep,krb5_cred);
cleanup(free);
}
-krb5_error_code decode_krb5_enc_cred_part(code, rep)
- const krb5_data * code;
- krb5_cred_enc_part ** rep;
+krb5_error_code decode_krb5_enc_cred_part(const krb5_data *code, krb5_cred_enc_part **rep)
{
setup();
alloc_field(*rep,krb5_cred_enc_part);
}
-krb5_error_code decode_krb5_error(code, rep)
- const krb5_data * code;
- krb5_error ** rep;
+krb5_error_code decode_krb5_error(const krb5_data *code, krb5_error **rep)
{
setup();
alloc_field(*rep,krb5_error);
return retval;
}
-krb5_error_code decode_krb5_authdata(code, rep)
- const krb5_data * code;
- krb5_authdata *** rep;
+krb5_error_code decode_krb5_authdata(const krb5_data *code, krb5_authdata ***rep)
{
setup_buf_only();
*rep = 0;
cleanup_none(); /* we're not allocating anything here... */
}
-krb5_error_code decode_krb5_pwd_sequence(code, rep)
- const krb5_data * code;
- passwd_phrase_element ** rep;
+krb5_error_code decode_krb5_pwd_sequence(const krb5_data *code, passwd_phrase_element **rep)
{
setup_buf_only();
alloc_field(*rep,passwd_phrase_element);
cleanup(free);
}
-krb5_error_code decode_krb5_pwd_data(code, rep)
- const krb5_data * code;
- krb5_pwd_data ** rep;
+krb5_error_code decode_krb5_pwd_data(const krb5_data *code, krb5_pwd_data **rep)
{
setup();
alloc_field(*rep,krb5_pwd_data);
cleanup(free);
}
-krb5_error_code decode_krb5_padata_sequence(code, rep)
- const krb5_data * code;
- krb5_pa_data ***rep;
+krb5_error_code decode_krb5_padata_sequence(const krb5_data *code, krb5_pa_data ***rep)
{
setup_buf_only();
*rep = 0;
cleanup_none(); /* we're not allocating anything here */
}
-krb5_error_code decode_krb5_alt_method(code, rep)
- const krb5_data * code;
- krb5_alt_method ** rep;
+krb5_error_code decode_krb5_alt_method(const krb5_data *code, krb5_alt_method **rep)
{
setup();
alloc_field(*rep,krb5_alt_method);
cleanup(free);
}
-krb5_error_code decode_krb5_etype_info(code, rep)
- const krb5_data * code;
- krb5_etype_info_entry ***rep;
+krb5_error_code decode_krb5_etype_info(const krb5_data *code, krb5_etype_info_entry ***rep)
{
setup_buf_only();
*rep = 0;
cleanup_none(); /* we're not allocating anything here */
}
-krb5_error_code decode_krb5_enc_data(code, rep)
- const krb5_data * code;
- krb5_enc_data ** rep;
+krb5_error_code decode_krb5_enc_data(const krb5_data *code, krb5_enc_data **rep)
{
setup_buf_only();
alloc_field(*rep,krb5_enc_data);
cleanup(free);
}
-krb5_error_code decode_krb5_pa_enc_ts(code, rep)
- const krb5_data * code;
- krb5_pa_enc_ts ** rep;
+krb5_error_code decode_krb5_pa_enc_ts(const krb5_data *code, krb5_pa_enc_ts **rep)
{
setup();
alloc_field(*rep,krb5_pa_enc_ts);
cleanup(free);
}
-krb5_error_code decode_krb5_sam_challenge(code, rep)
- const krb5_data * code;
- krb5_sam_challenge **rep;
+krb5_error_code decode_krb5_sam_challenge(const krb5_data *code, krb5_sam_challenge **rep)
{
setup_buf_only();
alloc_field(*rep,krb5_sam_challenge);
cleanup(free);
}
-krb5_error_code decode_krb5_enc_sam_key(code, rep)
- const krb5_data * code;
- krb5_sam_key **rep;
+krb5_error_code decode_krb5_enc_sam_key(const krb5_data *code, krb5_sam_key **rep)
{
setup_buf_only();
alloc_field(*rep,krb5_sam_key);
cleanup(free);
}
-krb5_error_code decode_krb5_enc_sam_response_enc(code, rep)
- const krb5_data * code;
- krb5_enc_sam_response_enc **rep;
+krb5_error_code decode_krb5_enc_sam_response_enc(const krb5_data *code, krb5_enc_sam_response_enc **rep)
{
setup_buf_only();
alloc_field(*rep,krb5_enc_sam_response_enc);
cleanup(free);
}
-krb5_error_code decode_krb5_sam_response(code, rep)
- const krb5_data * code;
- krb5_sam_response **rep;
+krb5_error_code decode_krb5_sam_response(const krb5_data *code, krb5_sam_response **rep)
{
setup_buf_only();
alloc_field(*rep,krb5_sam_response);
cleanup(free);
}
-krb5_error_code decode_krb5_predicted_sam_response(code, rep)
- const krb5_data * code;
- krb5_predicted_sam_response **rep;
+krb5_error_code decode_krb5_predicted_sam_response(const krb5_data *code, krb5_predicted_sam_response **rep)
{
setup_buf_only(); /* preallocated */
alloc_field(*rep,krb5_predicted_sam_response);
\
return 0
-krb5_error_code encode_krb5_authenticator(rep, code)
- const krb5_authenticator * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_authenticator(const krb5_authenticator *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_ticket(rep, code)
- const krb5_ticket * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_ticket(const krb5_ticket *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_encryption_key(rep, code)
- const krb5_keyblock * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_encryption_key(const krb5_keyblock *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_enc_tkt_part(rep, code)
- const krb5_enc_tkt_part * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_enc_tkt_part(const krb5_enc_tkt_part *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_enc_kdc_rep_part(rep, code)
- const krb5_enc_kdc_rep_part * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_enc_kdc_rep_part(const krb5_enc_kdc_rep_part *rep, krb5_data **code)
{
asn1_error_code retval;
asn1buf *buf=NULL;
}
/* yes, the translation is identical to that used for KDC__REP */
-krb5_error_code encode_krb5_as_rep(rep, code)
- const krb5_kdc_rep * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_as_rep(const krb5_kdc_rep *rep, krb5_data **code)
{
krb5_setup();
}
/* yes, the translation is identical to that used for KDC__REP */
-krb5_error_code encode_krb5_tgs_rep( rep, code)
- const krb5_kdc_rep * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_tgs_rep(const krb5_kdc_rep *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_ap_req(rep, code)
- const krb5_ap_req * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_ap_req(const krb5_ap_req *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_ap_rep(rep, code)
- const krb5_ap_rep * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_ap_rep(const krb5_ap_rep *rep, krb5_data **code)
{
krb5_setup();
}
-krb5_error_code encode_krb5_ap_rep_enc_part(rep, code)
- const krb5_ap_rep_enc_part * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_ap_rep_enc_part(const krb5_ap_rep_enc_part *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_as_req(rep, code)
- const krb5_kdc_req * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_as_req(const krb5_kdc_req *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_tgs_req(rep, code)
- const krb5_kdc_req * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_tgs_req(const krb5_kdc_req *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_kdc_req_body(rep, code)
- const krb5_kdc_req * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_kdc_req_body(const krb5_kdc_req *rep, krb5_data **code)
{
krb5_setup();
}
-krb5_error_code encode_krb5_safe(rep, code)
- const krb5_safe * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_safe(const krb5_safe *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_priv(rep, code)
- const krb5_priv * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_priv(const krb5_priv *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_enc_priv_part(rep, code)
- const krb5_priv_enc_part * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_enc_priv_part(const krb5_priv_enc_part *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_cred(rep, code)
- const krb5_cred * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_cred(const krb5_cred *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_enc_cred_part(rep, code)
- const krb5_cred_enc_part * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_enc_cred_part(const krb5_cred_enc_part *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_error(rep, code)
- const krb5_error * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_error(const krb5_error *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_authdata(rep, code)
- const krb5_authdata ** rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_authdata(const krb5_authdata **rep, krb5_data **code)
{
asn1_error_code retval;
asn1buf *buf=NULL;
krb5_cleanup();
}
-krb5_error_code encode_krb5_alt_method(rep, code)
- const krb5_alt_method * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_alt_method(const krb5_alt_method *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_etype_info( rep, code)
- const krb5_etype_info_entry ** rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_etype_info(const krb5_etype_info_entry **rep, krb5_data **code)
{
krb5_setup();
retval = asn1_encode_etype_info(buf,rep,&length);
krb5_cleanup();
}
-krb5_error_code encode_krb5_enc_data(rep, code)
- const krb5_enc_data * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_enc_data(const krb5_enc_data *rep, krb5_data **code)
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_pa_enc_ts(rep, code)
- const krb5_pa_enc_ts * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_pa_enc_ts(const krb5_pa_enc_ts *rep, krb5_data **code)
{
krb5_setup();
}
/* Sandia Additions */
-krb5_error_code encode_krb5_pwd_sequence( rep, code)
- const passwd_phrase_element * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_pwd_sequence(const passwd_phrase_element *rep, krb5_data **code)
{
krb5_setup();
retval = asn1_encode_passwdsequence(buf,rep,&length);
krb5_cleanup();
}
-krb5_error_code encode_krb5_pwd_data(rep, code)
- const krb5_pwd_data * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_pwd_data(const krb5_pwd_data *rep, krb5_data **code)
{
krb5_setup();
krb5_addfield((const passwd_phrase_element**)rep->element,1,asn1_encode_sequence_of_passwdsequence);
krb5_cleanup();
}
-krb5_error_code encode_krb5_padata_sequence(rep, code)
- const krb5_pa_data ** rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_padata_sequence(const krb5_pa_data **rep, krb5_data **code)
{
krb5_setup();
}
/* sam preauth additions */
-krb5_error_code encode_krb5_sam_challenge(rep, code)
- const krb5_sam_challenge * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_sam_challenge(const krb5_sam_challenge *rep, krb5_data **code)
{
krb5_setup();
retval = asn1_encode_sam_challenge(buf,rep,&length);
krb5_cleanup();
}
-krb5_error_code encode_krb5_sam_key(rep, code)
- const krb5_sam_key * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_sam_key(const krb5_sam_key *rep, krb5_data **code)
{
krb5_setup();
retval = asn1_encode_sam_key(buf,rep,&length);
krb5_cleanup();
}
-krb5_error_code encode_krb5_enc_sam_response_enc(rep, code)
- const krb5_enc_sam_response_enc * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_enc_sam_response_enc(const krb5_enc_sam_response_enc *rep, krb5_data **code)
{
krb5_setup();
retval = asn1_encode_enc_sam_response_enc(buf,rep,&length);
krb5_cleanup();
}
-krb5_error_code encode_krb5_sam_response(rep, code)
- const krb5_sam_response * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_sam_response(const krb5_sam_response *rep, krb5_data **code)
{
krb5_setup();
retval = asn1_encode_sam_response(buf,rep,&length);
krb5_cleanup();
}
-krb5_error_code encode_krb5_predicted_sam_response(rep, code)
- const krb5_predicted_sam_response * rep;
- krb5_data ** code;
+krb5_error_code encode_krb5_predicted_sam_response(const krb5_predicted_sam_response *rep, krb5_data **code)
{
krb5_setup();
retval = asn1_encode_predicted_sam_response(buf,rep,&length);