static krb5_error_code
- mit_des_crc_encrypt_func(DECLARG(krb5_const_pointer, in),
- DECLARG(krb5_pointer, out),
- DECLARG(const size_t, size),
- DECLARG(krb5_encrypt_block *, key),
- DECLARG(krb5_pointer, ivec))
-OLDDECLARG(krb5_const_pointer, in)
-OLDDECLARG(krb5_pointer, out)
-OLDDECLARG(const size_t, size)
-OLDDECLARG(krb5_encrypt_block *, key)
-OLDDECLARG(krb5_pointer, ivec)
+mit_des_crc_encrypt_func(in, out, size, key, ivec)
+ krb5_const_pointer in;
+ krb5_pointer out;
+ const size_t size;
+ krb5_encrypt_block * key;
+ krb5_pointer ivec;
{
krb5_checksum cksum;
krb5_octet contents[CRC32_CKSUM_LENGTH];
}
static krb5_error_code
- mit_des_crc_decrypt_func(DECLARG(krb5_const_pointer, in),
- DECLARG(krb5_pointer, out),
- DECLARG(const size_t, size),
- DECLARG(krb5_encrypt_block *, key),
- DECLARG(krb5_pointer, ivec))
-OLDDECLARG(krb5_const_pointer, in)
-OLDDECLARG(krb5_pointer, out)
-OLDDECLARG(const size_t, size)
-OLDDECLARG(krb5_encrypt_block *, key)
-OLDDECLARG(krb5_pointer, ivec)
+mit_des_crc_decrypt_func(in, out, size, key, ivec)
+ krb5_const_pointer in;
+ krb5_pointer out;
+ const size_t size;
+ krb5_encrypt_block * key;
+ krb5_pointer ivec;
{
krb5_checksum cksum;
krb5_octet contents_prd[CRC32_CKSUM_LENGTH];
static krb5_error_code
- mit_des_md5_encrypt_func(DECLARG(krb5_const_pointer, in),
- DECLARG(krb5_pointer, out),
- DECLARG(const size_t, size),
- DECLARG(krb5_encrypt_block *, key),
- DECLARG(krb5_pointer, ivec))
-OLDDECLARG(krb5_const_pointer, in)
-OLDDECLARG(krb5_pointer, out)
-OLDDECLARG(const size_t, size)
-OLDDECLARG(krb5_encrypt_block *, key)
-OLDDECLARG(krb5_pointer, ivec)
+mit_des_md5_encrypt_func(in, out, size, key, ivec)
+ krb5_const_pointer in;
+ krb5_pointer out;
+ const size_t size;
+ krb5_encrypt_block * key;
+ krb5_pointer ivec;
{
krb5_checksum cksum;
krb5_octet contents[RSA_MD5_CKSUM_LENGTH];
}
static krb5_error_code
- mit_des_md5_decrypt_func(DECLARG(krb5_const_pointer, in),
- DECLARG(krb5_pointer, out),
- DECLARG(const size_t, size),
- DECLARG(krb5_encrypt_block *, key),
- DECLARG(krb5_pointer, ivec))
-OLDDECLARG(krb5_const_pointer, in)
-OLDDECLARG(krb5_pointer, out)
-OLDDECLARG(const size_t, size)
-OLDDECLARG(krb5_encrypt_block *, key)
-OLDDECLARG(krb5_pointer, ivec)
+mit_des_md5_decrypt_func(in, out, size, key, ivec)
+ krb5_const_pointer in;
+ krb5_pointer out;
+ const size_t size;
+ krb5_encrypt_block * key;
+ krb5_pointer ivec;
{
krb5_checksum cksum;
krb5_octet contents_prd[RSA_MD5_CKSUM_LENGTH];
returns: errors
*/
-krb5_error_code mit_des_cbc_checksum(DECLARG(krb5_pointer, in),
- DECLARG(size_t, in_length),
- DECLARG(krb5_pointer, key),
- DECLARG(size_t, key_size),
- DECLARG(krb5_checksum *, cksum))
-OLDDECLARG(krb5_pointer, in)
-OLDDECLARG(size_t, in_length)
-OLDDECLARG(krb5_pointer, key)
-OLDDECLARG(size_t, key_size)
-OLDDECLARG(krb5_checksum *, cksum)
+krb5_error_code mit_des_cbc_checksum(in, in_length, key, key_size, cksum)
+ krb5_pointer in;
+ size_t in_length;
+ krb5_pointer key;
+ size_t key_size;
+ krb5_checksum * cksum;
{
struct mit_des_ks_struct *schedule; /* pointer to key schedules */
krb5_octet *contents;
krb5_encrypt_block eblock;
krb5_keyblock keyblock;
+ krb5_context context;
mit_des_cblock key, input, output, output2;
krb5_error_code retval;
int num = 0;
/* do some initialisation */
initialize_krb5_error_table();
- krb5_use_cstype(&eblock, ETYPE_DES_CBC_CRC);
+ krb5_use_cstype(context, &eblock, ETYPE_DES_CBC_CRC);
keyblock.magic = KV5M_KEYBLOCK;
keyblock.etype = ETYPE_DES_CBC_CRC;
keyblock.keytype = KEYTYPE_DES;
convert(block2, input);
convert(block3, output);
- if (retval = krb5_process_key(&eblock,&keyblock)) {
+ if (retval = krb5_process_key(context, &eblock,&keyblock)) {
com_err("des test", retval, "can't process key");
exit(-1);
}
error++;
}
- if (retval = krb5_finish_key(&eblock)) {
+ if (retval = krb5_finish_key(context, &eblock)) {
com_err("des verify", retval, "can't finish key");
exit(-1);
}
free any resources held by "seed" and assigned by init_random_key()
*/
-krb5_error_code mit_des_finish_random_key (DECLARG(krb5_pointer *, seed))
-OLDDECLARG(krb5_pointer *, seed)
+krb5_error_code mit_des_finish_random_key (seed)
+ krb5_pointer * seed;
{
memset((char *)*seed, 0, sizeof(mit_des_random_key_seed) );
krb5_xfree(*seed);
returns: errors
*/
-krb5_error_code mit_des_finish_key (DECLARG(krb5_encrypt_block *,eblock))
-OLDDECLARG(krb5_encrypt_block *,eblock)
+krb5_error_code mit_des_finish_key (eblock)
+ krb5_encrypt_block * eblock;
{
memset((char *)eblock->priv, 0, sizeof(mit_des_key_schedule));
free(eblock->priv);
sequence information.
*/
-krb5_error_code mit_des_init_random_key (DECLARG(const krb5_keyblock *,seedblock),
- DECLARG(krb5_pointer *,seed))
-OLDDECLARG(const krb5_keyblock *,seedblock)
-OLDDECLARG(krb5_pointer *,seed)
+krb5_error_code mit_des_init_random_key (seedblock, seed)
+ const krb5_keyblock * seedblock;
+ krb5_pointer * seed;
{
mit_des_random_key_seed * p_seed;
if (seedblock->keytype != KEYTYPE_DES)
mit_des_cblock new_key;
krb5_address **addrs = 0;
+ krb5_context context;
/*
* use a host id in generating the seed to ensure
* use a time stamp to ensure that a server started later does not reuse
* an old stream:
*/
- (void) krb5_us_timeofday(&timenow.seconds,
+ (void) krb5_us_timeofday(context, &timenow.seconds,
&timenow.microseconds); /* XXX return value */
mit_des_set_sequence_number((unsigned char *)&timenow, p_seed);
returns: errors
*/
-krb5_error_code mit_des_process_key (DECLARG(krb5_encrypt_block *, eblock),
- DECLARG(const krb5_keyblock *,keyblock))
-OLDDECLARG(krb5_encrypt_block *, eblock)
-OLDDECLARG(const krb5_keyblock *,keyblock)
+krb5_error_code mit_des_process_key (eblock, keyblock)
+ krb5_encrypt_block * eblock;
+ const krb5_keyblock * keyblock;
{
struct mit_des_ks_struct *schedule; /* pointer to key schedules */
filling in the keyblock address in *keyblock
*/
-krb5_error_code mit_des_random_key (DECLARG(const krb5_encrypt_block *, eblock),
- DECLARG(krb5_pointer, seed),
- DECLARG(krb5_keyblock **, keyblock))
-OLDDECLARG(const krb5_encrypt_block *, eblock)
-OLDDECLARG(krb5_pointer, seed)
-OLDDECLARG(krb5_keyblock **, keyblock)
+krb5_error_code mit_des_random_key (eblock, seed, keyblock)
+ const krb5_encrypt_block * eblock;
+ krb5_pointer seed;
+ krb5_keyblock ** keyblock;
{
krb5_keyblock *randkey;
returns: errors
*/
-krb5_error_code mit_des_string_to_key (DECLARG(const krb5_encrypt_block *, eblock),
- DECLARG(const krb5_keytype, keytype),
- DECLARG(krb5_keyblock *,keyblock),
- DECLARG(const krb5_data *,data),
- DECLARG(const krb5_data *, salt))
-OLDDECLARG(const krb5_encrypt_block *, eblock)
-OLDDECLARG(const krb5_keytype, keytype)
-OLDDECLARG(krb5_keyblock *,keyblock)
-OLDDECLARG(const krb5_data *,data)
-OLDDECLARG(const krb5_data *, salt)
+krb5_error_code mit_des_string_to_key (eblock, keytype, keyblock, data, salt)
+const krb5_encrypt_block * eblock;
+const krb5_keytype keytype;
+krb5_keyblock * keyblock;
+const krb5_data * data;
+const krb5_data * salt;
{
register char *str, *copystr;
register krb5_octet *key;
char *argv[];
{
/* Local Declarations */
+ krb5_context context;
int in_length;
void do_encrypt();
void do_decrypt();
/* do some initialisation */
initialize_krb5_error_table();
- krb5_use_cstype(&eblock, ETYPE_DES_CBC_CRC);
+ krb5_use_cstype(context, &eblock, ETYPE_DES_CBC_CRC);
keyblock.keytype = KEYTYPE_DES;
keyblock.length = sizeof (mit_des_cblock);
if (zflag) {
input = zero_text;
keyblock.contents = (krb5_octet *)zero_key;
- if (retval = krb5_process_key(&eblock,&keyblock)) {
+ if (retval = krb5_process_key(context, &eblock,&keyblock)) {
com_err("des verify", retval, "can't process zero key");
exit(-1);
}
printf("%02x ",cipher_text[j]);
printf("\n");
do_decrypt(output,cipher_text);
- if (retval = krb5_finish_key(&eblock)) {
+ if (retval = krb5_finish_key(context, &eblock)) {
com_err("des verify", retval, "can't finish zero key");
exit(-1);
}
if (mflag) {
input = msb_text;
keyblock.contents = (krb5_octet *)key3;
- if (retval = krb5_process_key(&eblock,&keyblock)) {
+ if (retval = krb5_process_key(context, &eblock,&keyblock)) {
com_err("des verify", retval, "can't process key3");
exit(-1);
}
}
printf("\n");
do_decrypt(output,cipher_text);
- if (retval = krb5_finish_key(&eblock)) {
+ if (retval = krb5_finish_key(context, &eblock)) {
com_err("des verify", retval, "can't finish key3");
exit(-1);
}
{
input = zero_text;
keyblock.contents = (krb5_octet *)key2;
- if (retval = krb5_process_key(&eblock,&keyblock)) {
+ if (retval = krb5_process_key(context, &eblock,&keyblock)) {
com_err("des verify", retval, "can't process key2");
exit(-1);
}
printf("%02x ",cipher_text[j]);
printf("\n\n");
do_decrypt(output,cipher_text);
- if (retval = krb5_finish_key(&eblock)) {
+ if (retval = krb5_finish_key(context, &eblock)) {
com_err("des verify", retval, "can't finish key2");
exit(-1);
}
/* ECB mode */
{
keyblock.contents = (krb5_octet *)default_key;
- if (retval = krb5_process_key(&eblock,&keyblock)) {
+ if (retval = krb5_process_key(context, &eblock,&keyblock)) {
com_err("des verify", retval, "can't process key2");
exit(-1);
}
for (j = 0; j<=7; j++)
printf("%02x ",cipher_text[j]);
printf("\n\n");
- if (retval = krb5_finish_key(&eblock)) {
+ if (retval = krb5_finish_key(context, &eblock)) {
com_err("des verify", retval, "can't finish key2");
exit(-1);
}
};
static krb5_error_code
- mit_raw_des_decrypt_func(DECLARG(krb5_const_pointer, in),
- DECLARG(krb5_pointer, out),
- DECLARG(const size_t, size),
- DECLARG(krb5_encrypt_block *, key),
- DECLARG(krb5_pointer, ivec))
-OLDDECLARG(krb5_const_pointer, in)
-OLDDECLARG(krb5_pointer, out)
-OLDDECLARG(const size_t, size)
-OLDDECLARG(krb5_encrypt_block *, key)
-OLDDECLARG(krb5_pointer, ivec)
+mit_raw_des_decrypt_func(in, out, size, key, ivec)
+ krb5_const_pointer in;
+ krb5_pointer out;
+ const size_t size;
+ krb5_encrypt_block * key;
+ krb5_pointer ivec;
{
return (mit_des_cbc_encrypt (in,
out,
}
static krb5_error_code
- mit_raw_des_encrypt_func(DECLARG(krb5_const_pointer, in),
- DECLARG(krb5_pointer, out),
- DECLARG(const size_t, size),
- DECLARG(krb5_encrypt_block *, key),
- DECLARG(krb5_pointer, ivec))
-OLDDECLARG(krb5_const_pointer, in)
-OLDDECLARG(krb5_pointer, out)
-OLDDECLARG(const size_t, size)
-OLDDECLARG(krb5_encrypt_block *, key)
-OLDDECLARG(krb5_pointer, ivec)
+mit_raw_des_encrypt_func(in, out, size, key, ivec)
+ krb5_const_pointer in;
+ krb5_pointer out;
+ const size_t size;
+ krb5_encrypt_block * key;
+ krb5_pointer ivec;
{
int sumsize;
#define cleanup()\
return 0
-asn1_error_code asn1_decode_integer(DECLARG(asn1buf *, buf),
- DECLARG(long *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(long *, val)
+asn1_error_code asn1_decode_integer(buf, val)
+ asn1buf * buf;
+ long * val;
{
setup();
asn1_octet o;
cleanup();
}
-asn1_error_code asn1_decode_unsigned_integer(DECLARG(asn1buf *, buf),
- DECLARG(unsigned long *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(unsigned long *, val)
+asn1_error_code asn1_decode_unsigned_integer(buf, val)
+ asn1buf * buf;
+ unsigned long * val;
{
setup();
asn1_octet o;
cleanup();
}
-asn1_error_code asn1_decode_octetstring(DECLARG(asn1buf *, buf),
- DECLARG(int *, retlen),
- DECLARG(asn1_octet **, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(int *, retlen)
- OLDDECLARG(asn1_octet **, val)
+asn1_error_code asn1_decode_octetstring(buf, retlen, val)
+ asn1buf * buf;
+ int * retlen;
+ asn1_octet ** val;
{
setup();
tag(ASN1_OCTETSTRING);
cleanup();
}
-asn1_error_code asn1_decode_charstring(DECLARG(asn1buf *, buf),
- DECLARG(int *, retlen),
- DECLARG(char **, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(int *, retlen)
- OLDDECLARG(char **, val)
+asn1_error_code asn1_decode_charstring(buf, retlen, val)
+ asn1buf * buf;
+ int * retlen;
+ char ** val;
{
setup();
tag(ASN1_OCTETSTRING);
}
-asn1_error_code asn1_decode_generalstring(DECLARG(asn1buf *, buf),
- DECLARG(int *, retlen),
- DECLARG(char **, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(int *, retlen)
- OLDDECLARG(char **, val)
+asn1_error_code asn1_decode_generalstring(buf, retlen, val)
+ asn1buf * buf;
+ int * retlen;
+ char ** val;
{
setup();
tag(ASN1_GENERALSTRING);
}
-asn1_error_code asn1_decode_null(DECLARG(asn1buf *, buf))
- OLDDECLARG(asn1buf *, buf)
+asn1_error_code asn1_decode_null(buf)
+ asn1buf * buf;
{
setup();
tag(ASN1_NULL);
cleanup();
}
-asn1_error_code asn1_decode_printablestring(DECLARG(asn1buf *, buf),
- DECLARG(int *, retlen),
- DECLARG(char **, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(int *, retlen)
- OLDDECLARG(char **, val)
+asn1_error_code asn1_decode_printablestring(buf, retlen, val)
+ asn1buf * buf;
+ int * retlen;
+ char ** val;
{
setup();
tag(ASN1_PRINTABLESTRING);
cleanup();
}
-asn1_error_code asn1_decode_ia5string(DECLARG(asn1buf *, buf),
- DECLARG(int *, retlen),
- DECLARG(char **, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(int *, retlen)
- OLDDECLARG(char **, val)
+asn1_error_code asn1_decode_ia5string(buf, retlen, val)
+ asn1buf * buf;
+ int * retlen;
+ char ** val;
{
setup();
tag(ASN1_IA5STRING);
cleanup();
}
-asn1_error_code asn1_decode_generaltime(DECLARG(asn1buf *, buf),
- DECLARG(time_t *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(time_t *, val)
+asn1_error_code asn1_decode_generaltime(buf, val)
+ asn1buf * buf;
+ time_t * val;
{
setup();
char *s;
/* scalars */
-asn1_error_code asn1_decode_kerberos_time(DECLARG(asn1buf *, buf),
- DECLARG(krb5_timestamp *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_timestamp *, val)
+asn1_error_code asn1_decode_kerberos_time(buf, val)
+ asn1buf * buf;
+ krb5_timestamp * val;
{
time_t t;
asn1_error_code retval;
}
#define integer_convert(fname,ktype)\
-asn1_error_code fname(DECLARG(asn1buf *, buf),\
- DECLARG(ktype *, val))\
- OLDDECLARG(asn1buf *, buf)\
- OLDDECLARG(ktype *, val)\
+asn1_error_code fname(buf, val)\
+ asn1buf * buf;\
+ ktype * val;\
{\
asn1_error_code retval;\
long n;\
return 0;\
}
#define unsigned_integer_convert(fname,ktype)\
-asn1_error_code fname(DECLARG(asn1buf *, buf),\
- DECLARG(ktype *, val))\
- OLDDECLARG(asn1buf *, buf)\
- OLDDECLARG(ktype *, val)\
+asn1_error_code fname(buf, val)\
+ 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(DECLARG(asn1buf *, buf),
- DECLARG(krb5_msgtype *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_msgtype *, val)
+asn1_error_code asn1_decode_msgtype(buf, val)
+ asn1buf * buf;
+ krb5_msgtype * val;
{
asn1_error_code retval;
unsigned long n;
/* structures */
-asn1_error_code asn1_decode_realm(DECLARG(asn1buf *, buf),
- DECLARG(krb5_principal *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_principal *, val)
+asn1_error_code asn1_decode_realm(buf, val)
+ asn1buf * buf;
+ krb5_principal * val;
{
return asn1_decode_generalstring(buf,
&((*val)->realm.length),
&((*val)->realm.data));
}
-asn1_error_code asn1_decode_principal_name(DECLARG(asn1buf *, buf),
- DECLARG(krb5_principal *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_principal *, val)
+asn1_error_code asn1_decode_principal_name(buf, val)
+ asn1buf * buf;
+ krb5_principal * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_checksum(DECLARG(asn1buf *, buf),
- DECLARG(krb5_checksum *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_checksum *, val)
+asn1_error_code asn1_decode_checksum(buf, val)
+ asn1buf * buf;
+ krb5_checksum * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_encryption_key(DECLARG(asn1buf *, buf),
- DECLARG(krb5_keyblock *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_keyblock *, val)
+asn1_error_code asn1_decode_encryption_key(buf, val)
+ asn1buf * buf;
+ krb5_keyblock * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_encrypted_data(DECLARG(asn1buf *, buf),
- DECLARG(krb5_enc_data *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_enc_data *, val)
+asn1_error_code asn1_decode_encrypted_data(buf, val)
+ asn1buf * buf;
+ krb5_enc_data * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_krb5_flags(DECLARG(asn1buf *, buf),
- DECLARG(krb5_flags *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_flags *, val)
+asn1_error_code asn1_decode_krb5_flags(buf, val)
+ asn1buf * buf;
+ krb5_flags * val;
{
setup();
asn1_octet o;
return 0;
}
-asn1_error_code asn1_decode_ticket_flags(DECLARG(asn1buf *, buf),
- DECLARG(krb5_flags *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_flags *, val)
+asn1_error_code asn1_decode_ticket_flags(buf, val)
+ asn1buf * buf;
+ krb5_flags * val;
{ return asn1_decode_krb5_flags(buf,val); }
-asn1_error_code asn1_decode_ap_options(DECLARG(asn1buf *, buf),
- DECLARG(krb5_flags *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_flags *, val)
+asn1_error_code asn1_decode_ap_options(buf, val)
+ asn1buf * buf;
+ krb5_flags * val;
{ return asn1_decode_krb5_flags(buf,val); }
-asn1_error_code asn1_decode_kdc_options(DECLARG(asn1buf *, buf),
- DECLARG(krb5_flags *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_flags *, val)
+asn1_error_code asn1_decode_kdc_options(buf, val)
+ asn1buf * buf;
+ krb5_flags * val;
{ return asn1_decode_krb5_flags(buf,val); }
-asn1_error_code asn1_decode_transited_encoding(DECLARG(asn1buf *, buf),
- DECLARG(krb5_transited *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_transited *, val)
+asn1_error_code asn1_decode_transited_encoding(buf, val)
+ asn1buf * buf;
+ krb5_transited * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_enc_kdc_rep_part(DECLARG(asn1buf *, buf),
- DECLARG(krb5_enc_kdc_rep_part *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_enc_kdc_rep_part *, val)
+asn1_error_code asn1_decode_enc_kdc_rep_part(buf, val)
+ asn1buf * buf;
+ krb5_enc_kdc_rep_part * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_ticket(DECLARG(asn1buf *, buf),
- DECLARG(krb5_ticket *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_ticket *, val)
+asn1_error_code asn1_decode_ticket(buf, val)
+ asn1buf * buf;
+ krb5_ticket * val;
{
setup();
apptag(1);
cleanup();
}
-asn1_error_code asn1_decode_kdc_req(DECLARG(asn1buf *, buf),
- DECLARG(krb5_kdc_req *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_kdc_req *, val)
+asn1_error_code asn1_decode_kdc_req(buf, val)
+ asn1buf * buf;
+ krb5_kdc_req * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_kdc_req_body(DECLARG(asn1buf *, buf),
- DECLARG(krb5_kdc_req *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_kdc_req *, val)
+asn1_error_code asn1_decode_kdc_req_body(buf, val)
+ asn1buf * buf;
+ krb5_kdc_req * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_krb_safe_body(DECLARG(asn1buf *, buf),
- DECLARG(krb5_safe *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_safe *, val)
+asn1_error_code asn1_decode_krb_safe_body(buf, val)
+ asn1buf * buf;
+ krb5_safe * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_host_address(DECLARG(asn1buf *, buf),
- DECLARG(krb5_address *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_address *, val)
+asn1_error_code asn1_decode_host_address(buf, val)
+ asn1buf * buf;
+ krb5_address * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_kdc_rep(DECLARG(asn1buf *, buf),
- DECLARG(krb5_kdc_rep *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_kdc_rep *, val)
+asn1_error_code asn1_decode_kdc_rep(buf, val)
+ asn1buf * buf;
+ krb5_kdc_rep * val;
{
setup();
{ begin_structure();
cleanup()
-asn1_error_code asn1_decode_authorization_data(DECLARG(asn1buf *, buf),
- DECLARG(krb5_authdata ***, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_authdata ***, val)
+asn1_error_code asn1_decode_authorization_data(buf, val)
+ asn1buf * buf;
+ krb5_authdata *** val;
{
decode_array_body(krb5_authdata,asn1_decode_authdata_elt);
}
-asn1_error_code asn1_decode_authdata_elt(DECLARG(asn1buf *, buf),
- DECLARG(krb5_authdata *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_authdata *, val)
+asn1_error_code asn1_decode_authdata_elt(buf, val)
+ asn1buf * buf;
+ krb5_authdata * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_host_addresses(DECLARG(asn1buf *, buf),
- DECLARG(krb5_address ***, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_address ***, val)
+asn1_error_code asn1_decode_host_addresses(buf, val)
+ asn1buf * buf;
+ krb5_address *** val;
{
decode_array_body(krb5_address,asn1_decode_host_address);
}
-asn1_error_code asn1_decode_sequence_of_ticket(DECLARG(asn1buf *, buf),
- DECLARG(krb5_ticket ***, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_ticket ***, val)
+asn1_error_code asn1_decode_sequence_of_ticket(buf, val)
+ asn1buf * buf;
+ krb5_ticket *** val;
{
decode_array_body(krb5_ticket,asn1_decode_ticket);
}
-asn1_error_code asn1_decode_sequence_of_krb_cred_info(DECLARG(asn1buf *, buf),
- DECLARG(krb5_cred_info ***, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_cred_info ***, val)
+asn1_error_code asn1_decode_sequence_of_krb_cred_info(buf, val)
+ 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(DECLARG(asn1buf *, buf),
- DECLARG(krb5_cred_info *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_cred_info *, val)
+asn1_error_code asn1_decode_krb_cred_info(buf, val)
+ asn1buf * buf;
+ krb5_cred_info * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_sequence_of_pa_data(DECLARG(asn1buf *, buf),
- DECLARG(krb5_pa_data ***, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_pa_data ***, val)
+asn1_error_code asn1_decode_sequence_of_pa_data(buf, val)
+ asn1buf * buf;
+ krb5_pa_data *** val;
{
decode_array_body(krb5_pa_data,asn1_decode_pa_data);
}
-asn1_error_code asn1_decode_pa_data(DECLARG(asn1buf *, buf),
- DECLARG(krb5_pa_data *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_pa_data *, val)
+asn1_error_code asn1_decode_pa_data(buf, val)
+ asn1buf * buf;
+ krb5_pa_data * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_last_req(DECLARG(asn1buf *, buf),
- DECLARG(krb5_last_req_entry ***, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_last_req_entry ***, val)
+asn1_error_code asn1_decode_last_req(buf, val)
+ 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(DECLARG(asn1buf *, buf),
- DECLARG(krb5_last_req_entry *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(krb5_last_req_entry *, val)
+asn1_error_code asn1_decode_last_req_entry(buf, val)
+ asn1buf * buf;
+ krb5_last_req_entry * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_sequence_of_enctype(DECLARG(asn1buf *, buf),
- DECLARG(int *, num),
- DECLARG(krb5_enctype **, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(int *, num)
- OLDDECLARG(krb5_enctype **, val)
+asn1_error_code asn1_decode_sequence_of_enctype(buf, num, val)
+ asn1buf * buf;
+ int * num;
+ krb5_enctype ** val;
{
asn1_error_code retval;
{ sequence_of(buf);
cleanup();
}
-asn1_error_code asn1_decode_passwdsequence(DECLARG(asn1buf *, buf),
- DECLARG(passwd_phrase_element *, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(passwd_phrase_element *, val)
+asn1_error_code asn1_decode_passwdsequence(buf, val)
+ asn1buf * buf;
+ passwd_phrase_element * val;
{
setup();
{ begin_structure();
cleanup();
}
-asn1_error_code asn1_decode_sequence_of_passwdsequence(DECLARG(asn1buf *, buf),
- DECLARG(passwd_phrase_element ***, val))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(passwd_phrase_element ***, val)
+asn1_error_code asn1_decode_sequence_of_passwdsequence(buf, val)
+ asn1buf * buf;
+ passwd_phrase_element *** val;
{
decode_array_body(passwd_phrase_element,asn1_decode_passwdsequence);
}
#include "asn1_encode.h"
#include "asn1_make.h"
-asn1_error_code asn1_encode_integer(DECLARG(asn1buf *, buf),
- DECLARG(const long , val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const long , val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_integer(buf, val, retlen)
+ asn1buf * buf;
+ const long val;
+ int * retlen;
{
asn1_error_code retval;
int length = 0, partlen;
return 0;
}
-asn1_error_code asn1_encode_unsigned_integer(DECLARG(asn1buf *, buf),
- DECLARG(const unsigned long , val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const unsigned long , val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_unsigned_integer(buf, val, retlen)
+ asn1buf * buf;
+ const unsigned long val;
+ int * retlen;
{
asn1_error_code retval;
int length = 0, partlen;
return 0;
}
-asn1_error_code asn1_encode_octetstring(DECLARG(asn1buf *, buf),
- DECLARG(const int , len),
- DECLARG(const asn1_octet *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , len)
- OLDDECLARG(const asn1_octet *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_octetstring(buf, len, val, retlen)
+ asn1buf * buf;
+ const int len;
+ const asn1_octet * val;
+ int * retlen;
{
asn1_error_code retval;
int length;
return 0;
}
-asn1_error_code asn1_encode_charstring(DECLARG(asn1buf *, buf),
- DECLARG(const int , len),
- DECLARG(const char *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , len)
- OLDDECLARG(const char *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_charstring(buf, len, val, retlen)
+ asn1buf * buf;
+ const int len;
+ const char * val;
+ int * retlen;
{
asn1_error_code retval;
int length;
return 0;
}
-asn1_encode_null(DECLARG(asn1buf *, buf),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(int *, retlen)
+asn1_encode_null(buf, retlen)
+ asn1buf * buf;
+ int * retlen;
{
asn1_error_code retval;
return 0;
}
-asn1_error_code asn1_encode_printablestring(DECLARG(asn1buf *, buf),
- DECLARG(const int , len),
- DECLARG(const char *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , len)
- OLDDECLARG(const char *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_printablestring(buf, len, val, retlen)
+ asn1buf * buf;
+ const int len;
+ const char * val;
+ int * retlen;
{
asn1_error_code retval;
int length;
return 0;
}
-asn1_error_code asn1_encode_ia5string(DECLARG(asn1buf *, buf),
- DECLARG(const int , len),
- DECLARG(const char *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , len)
- OLDDECLARG(const char *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_ia5string(buf, len, val, retlen)
+ asn1buf * buf;
+ const int len;
+ const char * val;
+ int * retlen;
{
asn1_error_code retval;
int length;
return 0;
}
-asn1_error_code asn1_encode_generaltime(DECLARG(asn1buf *, buf),
- DECLARG(const time_t , val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const time_t , val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_generaltime(buf, val, retlen)
+ asn1buf * buf;
+ const time_t val;
+ int * retlen;
{
asn1_error_code retval;
struct tm *gtime = gmtime(&val);
return 0;
}
-asn1_error_code asn1_encode_generalstring(DECLARG(asn1buf *, buf),
- DECLARG(const int , len),
- DECLARG(const char *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , len)
- OLDDECLARG(const char *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_generalstring(buf, len, val, retlen)
+ asn1buf * buf;
+ const int len;
+ const char * val;
+ int * retlen;
{
asn1_error_code retval;
int length;
}
-asn1_error_code asn1_encode_realm(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_principal, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_principal, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_realm(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_principal val;
+ int * retlen;
{
if(val == NULL || val->realm.data == NULL) return ASN1_MISSING_FIELD;
return asn1_encode_generalstring(buf,val->realm.length,val->realm.data,
retlen);
}
-asn1_error_code asn1_encode_principal_name(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_principal, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_principal, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_principal_name(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_principal val;
+ int * retlen;
{
asn1_setup();
int n;
asn1_cleanup();
}
-asn1_error_code asn1_encode_kerberos_time(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_timestamp, val),
- DECLARG(int *, retlen))
-
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_timestamp, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_kerberos_time(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_timestamp val;
+ int * retlen;
{
return asn1_encode_generaltime(buf,val,retlen);
}
-asn1_error_code asn1_encode_host_address(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_address *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_address *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_host_address(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_address * val;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_host_addresses(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_address **, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_address **, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_host_addresses(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_address ** val;
+ int * retlen;
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_encrypted_data(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_enc_data *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_enc_data *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_encrypted_data(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_enc_data * val;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_krb5_flags(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_flags, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_flags, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_krb5_flags(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_flags val;
+ int * retlen;
{
asn1_setup();
krb5_flags valcopy = val;
return 0;
}
-asn1_error_code asn1_encode_ap_options(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_flags, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_flags, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_ap_options(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_flags val;
+ int * retlen;
{
return asn1_encode_krb5_flags(buf,val,retlen);
}
-asn1_error_code asn1_encode_ticket_flags(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_flags, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_flags, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_ticket_flags(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_flags val;
+ int * retlen;
{
return asn1_encode_krb5_flags(buf,val,retlen);
}
-asn1_error_code asn1_encode_kdc_options(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_flags, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_flags, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_kdc_options(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_flags val;
+ int * retlen;
{
return asn1_encode_krb5_flags(buf,val,retlen);
}
-asn1_error_code asn1_encode_authorization_data(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_authdata **, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_authdata **, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_authorization_data(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_authdata ** val;
+ int * retlen;
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_krb5_authdata_elt(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_authdata *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_authdata *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_krb5_authdata_elt(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_authdata * val;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_kdc_rep(DECLARG(int, msg_type),
- DECLARG(asn1buf *, buf),
- DECLARG(const krb5_kdc_rep *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(int, msg_type)
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_kdc_rep *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_kdc_rep(msg_type, buf, val, retlen)
+ int msg_type;
+ asn1buf * buf;
+ const krb5_kdc_rep * val;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_enc_kdc_rep_part(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_enc_kdc_rep_part *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_enc_kdc_rep_part *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_enc_kdc_rep_part(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_enc_kdc_rep_part * val;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_kdc_req_body(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_kdc_req *, rep),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_kdc_req *, rep)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_kdc_req_body(buf, rep, retlen)
+ asn1buf * buf;
+ const krb5_kdc_req * rep;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_encryption_key(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_keyblock *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_keyblock *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_encryption_key(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_keyblock * val;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_checksum(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_checksum *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_checksum *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_checksum(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_checksum * val;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_transited_encoding(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_transited *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_transited *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_transited_encoding(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_transited * val;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_last_req(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_last_req_entry **, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_last_req_entry **, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_last_req(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_last_req_entry ** val;
+ int * retlen;
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_last_req_entry(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_last_req_entry *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_last_req_entry *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_last_req_entry(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_last_req_entry * val;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_pa_data(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_pa_data **, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_pa_data **, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_sequence_of_pa_data(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_pa_data ** val;
+ int * retlen;
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_pa_data(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_pa_data *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_pa_data *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_pa_data(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_pa_data * val;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_ticket(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_ticket **, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_ticket **, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_sequence_of_ticket(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_ticket ** val;
+ int * retlen;
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_ticket(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_ticket *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_ticket *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_ticket(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_ticket * val;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_enctype(DECLARG(asn1buf *, buf),
- DECLARG(const int, len),
- DECLARG(const krb5_enctype *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int, len)
- OLDDECLARG(const krb5_enctype *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_sequence_of_enctype(buf, len, val, retlen)
+ asn1buf * buf;
+ const int len;
+ const krb5_enctype * val;
+ int * retlen;
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_kdc_req(DECLARG(int, msg_type),
- DECLARG(asn1buf *, buf),
- DECLARG(const krb5_kdc_req *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(int, msg_type)
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_kdc_req *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_kdc_req(msg_type, buf, val, retlen)
+ int msg_type;
+ asn1buf * buf;
+ const krb5_kdc_req * val;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_krb_safe_body(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_safe *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_safe *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_krb_safe_body(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_safe * val;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_krb_cred_info(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_cred_info **, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_cred_info **, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_sequence_of_krb_cred_info(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_cred_info ** val;
+ int * retlen;
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_krb_cred_info(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_cred_info *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_cred_info *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_krb_cred_info(buf, val, retlen)
+ asn1buf * buf;
+ const krb5_cred_info * val;
+ int * retlen;
{
asn1_setup();
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_passwdsequence(DECLARG(asn1buf *, buf),
- DECLARG(const passwd_phrase_element **, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *,buf)
- OLDDECLARG(const passwd_phrase_element **, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_sequence_of_passwdsequence(buf, val, retlen)
+ asn1buf * buf;
+ const passwd_phrase_element ** val;
+ int * retlen;
{
asn1_setup();
int i;
asn1_cleanup();
}
-asn1_error_code asn1_encode_passwdsequence(DECLARG(asn1buf *, buf),
- DECLARG(const passwd_phrase_element *, val),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *,buf)
- OLDDECLARG(const passwd_phrase_element *, val)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_encode_passwdsequence(buf, val, retlen)
+ asn1buf * buf;
+ const passwd_phrase_element * val;
+ int * retlen;
{
asn1_setup();
asn1_addlenfield(val->phrase->length,val->phrase->data,1,asn1_encode_charstring);
#include "asn1_get.h"
-asn1_error_code asn1_get_tag(DECLARG(asn1buf *, buf),
- DECLARG(asn1_class *, class),
- DECLARG(asn1_construction *, construction),
- DECLARG(asn1_tagnum *, tagnum),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(asn1_class *, class)
- OLDDECLARG(asn1_construction *, construction)
- OLDDECLARG(asn1_tagnum *, tagnum)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_get_tag(buf, class, construction, tagnum, retlen)
+ asn1buf * buf;
+ asn1_class * class;
+ asn1_construction * construction;
+ asn1_tagnum * tagnum;
+ int * retlen;
{
asn1_error_code retval;
return 0;
}
-asn1_error_code asn1_get_sequence(DECLARG(asn1buf *, buf),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_get_sequence(buf, retlen)
+ asn1buf * buf;
+ int * retlen;
{
asn1_error_code retval;
asn1_class class;
/****************************************************************/
/* Private Procedures */
-asn1_error_code asn1_get_id(DECLARG(asn1buf *, buf),
- DECLARG(asn1_class *, class),
- DECLARG(asn1_construction *, construction),
- DECLARG(asn1_tagnum *, tagnum))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(asn1_class *, class)
- OLDDECLARG(asn1_construction *, construction)
- OLDDECLARG(asn1_tagnum *, tagnum)
+asn1_error_code asn1_get_id(buf, class, construction, tagnum)
+ asn1buf * buf;
+ asn1_class * class;
+ asn1_construction * construction;
+ asn1_tagnum * tagnum;
{
asn1_error_code retval;
asn1_tagnum tn=0;
return 0;
}
-asn1_error_code asn1_get_length(DECLARG(asn1buf *, buf),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_get_length(buf, retlen)
+ asn1buf * buf;
+ int * retlen;
{
asn1_error_code retval;
asn1_octet o;
#include "asn1_make.h"
-asn1_error_code asn1_make_etag(DECLARG(asn1buf *, buf),
- DECLARG(const asn1_class , class),
- DECLARG(const asn1_tagnum , tagnum),
- DECLARG(const int , in_len),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const asn1_class , class)
- OLDDECLARG(const asn1_tagnum , tagnum)
- OLDDECLARG(const int , in_len)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_make_etag(buf, class, tagnum, in_len, retlen)
+ asn1buf * buf;
+ const asn1_class class;
+ const asn1_tagnum tagnum;
+ const int in_len;
+ int * retlen;
{
return asn1_make_tag(buf,class,CONSTRUCTED,tagnum,in_len,retlen);
}
-asn1_error_code asn1_make_tag(DECLARG(asn1buf *, buf),
- DECLARG(const asn1_class , class),
- DECLARG(const asn1_construction , construction),
- DECLARG(const asn1_tagnum , tagnum),
- DECLARG(const int , in_len),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const asn1_class , class)
- OLDDECLARG(const asn1_construction , construction)
- OLDDECLARG(const asn1_tagnum , tagnum)
- OLDDECLARG(const int , in_len)
- OLDDECLARG(int *, 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 int in_len;
+ int * retlen;
{
asn1_error_code retval;
int sumlen=0, length;
return 0;
}
-asn1_error_code asn1_make_length(DECLARG(asn1buf *, buf),
- DECLARG(const int , in_len),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , in_len)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_make_length(buf, in_len, retlen)
+ asn1buf * buf;
+ const int in_len;
+ int * retlen;
{
asn1_error_code retval;
return 0;
}
-asn1_error_code asn1_make_id(DECLARG(asn1buf *, buf),
- DECLARG(const asn1_class , class),
- DECLARG(const asn1_construction , construction),
- DECLARG(const asn1_tagnum , tagnum),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const asn1_class , class)
- OLDDECLARG(const asn1_construction , construction)
- OLDDECLARG(const asn1_tagnum , tagnum)
- OLDDECLARG(int *, retlen)
+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;
+ int * retlen;
{
asn1_error_code retval;
return 0;
}
-asn1_error_code asn1_make_sequence(DECLARG(asn1buf *, buf),
- DECLARG(const int , seq_len),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , seq_len)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_make_sequence(buf, seq_len, retlen)
+ asn1buf * buf;
+ const int seq_len;
+ int * retlen;
{
asn1_error_code retval;
int len, sum=0;
return 0;
}
-asn1_error_code asn1_make_set(DECLARG(asn1buf *, buf),
- DECLARG(const int , set_len),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , set_len)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_make_set(buf, set_len, retlen)
+ asn1buf * buf;
+ const int set_len;
+ int * retlen;
{
asn1_error_code retval;
int len, sum=0;
return 0;
}
-asn1_error_code asn1_make_string(DECLARG(asn1buf *, buf),
- DECLARG(const int , length),
- DECLARG(const char *, string),
- DECLARG(int *, retlen))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , length)
- OLDDECLARG(const char *, string)
- OLDDECLARG(int *, retlen)
+asn1_error_code asn1_make_string(buf, length, string, retlen)
+ asn1buf * buf;
+ const int length;
+ const char * string;
+ int * retlen;
{
asn1_error_code retval;
#include "asn1_misc.h"
-asn1_error_code asn1_krb5_realm_copy(DECLARG(krb5_principal, target),
- DECLARG(krb5_principal, source))
- OLDDECLARG(krb5_principal, target)
- OLDDECLARG(krb5_principal, source)
+asn1_error_code asn1_krb5_realm_copy(target, source)
+ krb5_principal target;
+ krb5_principal source;
{
target->realm.length = source->realm.length;
target->realm.data = (char*)calloc(target->realm.length,
#include "asn1buf.h"
#include <stdio.h>
-asn1_error_code asn1buf_create(DECLARG(asn1buf **, buf))
- OLDDECLARG(asn1buf **, buf)
+asn1_error_code asn1buf_create(buf)
+ asn1buf ** buf;
{
*buf = (asn1buf*)calloc(1,sizeof(asn1buf));
if (*buf == NULL) return ENOMEM;
return 0;
}
-asn1_error_code asn1buf_wrap_data(DECLARG(asn1buf *, buf),
- DECLARG(const krb5_data *, code))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const krb5_data *, code)
+asn1_error_code asn1buf_wrap_data(buf, code)
+ 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(DECLARG(asn1buf *, subbuf),
- DECLARG(const asn1buf *, buf),
- DECLARG(const int , length))
- OLDDECLARG(asn1buf *, subbuf)
- OLDDECLARG(const asn1buf *, buf)
- OLDDECLARG(const int , length)
+asn1_error_code asn1buf_imbed(subbuf, buf, length)
+ asn1buf * subbuf;
+ const asn1buf * buf;
+ const int length;
{
subbuf->base = subbuf->next = buf->next;
subbuf->bound = subbuf->base + length - 1;
return 0;
}
-void asn1buf_sync(DECLARG(asn1buf *, buf),
- DECLARG(asn1buf *, subbuf))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(asn1buf *, subbuf)
+void asn1buf_sync(buf, subbuf)
+ asn1buf * buf;
+ asn1buf * subbuf;
{
buf->next = subbuf->next;
}
-asn1_error_code asn1buf_destroy(DECLARG(asn1buf **, buf))
- OLDDECLARG(asn1buf **, buf)
+asn1_error_code asn1buf_destroy(buf)
+ asn1buf ** buf;
{
if (*buf != NULL) {
if ((*buf)->base != NULL) free((*buf)->base);
return 0;
}
-asn1_error_code asn1buf_insert_octet(DECLARG(asn1buf *, buf),
- DECLARG(const asn1_octet , o))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const asn1_octet , o)
+asn1_error_code asn1buf_insert_octet(buf, o)
+ asn1buf * buf;
+ const asn1_octet o;
{
asn1_error_code retval;
return 0;
}
-asn1_error_code asn1buf_insert_octetstring(DECLARG(asn1buf *, buf),
- DECLARG(const int , len),
- DECLARG(const krb5_octet *, s))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , len)
- OLDDECLARG(const krb5_octet *, s)
+asn1_error_code asn1buf_insert_octetstring(buf, len, s)
+ asn1buf * buf;
+ const int len;
+ const krb5_octet * s;
{
asn1_error_code retval;
int length;
return 0;
}
-asn1_error_code asn1buf_insert_charstring(DECLARG(asn1buf *, buf),
- DECLARG(const int , len),
- DECLARG(const char *, s))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , len)
- OLDDECLARG(const char *, s)
+asn1_error_code asn1buf_insert_charstring(buf, len, s)
+ asn1buf * buf;
+ const int len;
+ const char * s;
{
asn1_error_code retval;
int length;
return 0;
}
-asn1_error_code asn1buf_remove_octet(DECLARG(asn1buf *, buf),
- DECLARG(asn1_octet *, o))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(asn1_octet *, o)
+asn1_error_code asn1buf_remove_octet(buf, o)
+ 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(DECLARG(asn1buf *, buf),
- DECLARG(const int , len),
- DECLARG(asn1_octet **, s))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , len)
- OLDDECLARG(asn1_octet **, s)
+asn1_error_code asn1buf_remove_octetstring(buf, len, s)
+ asn1buf * buf;
+ const int len;
+ asn1_octet ** s;
{
int i;
return 0;
}
-asn1_error_code asn1buf_remove_charstring(DECLARG(asn1buf *, buf),
- DECLARG(const int , len),
- DECLARG(char **, s))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , len)
- OLDDECLARG(char **, s)
+asn1_error_code asn1buf_remove_charstring(buf, len, s)
+ asn1buf * buf;
+ const int len;
+ char ** s;
{
int i;
return 0;
}
-int asn1buf_remains(DECLARG(const asn1buf *, buf))
- OLDDECLARG(const asn1buf *, buf)
+int asn1buf_remains(buf)
+ const asn1buf * buf;
{
if(buf == NULL || buf->base == NULL) return 0;
else return buf->bound - buf->next + 1;
}
-asn1_error_code asn12krb5_buf(DECLARG(const asn1buf *, buf),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const asn1buf *, buf)
- OLDDECLARG(krb5_data **, code)
+asn1_error_code asn12krb5_buf(buf, code)
+ 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(DECLARG(const asn1buf *, buf),
- DECLARG(char **, s))
- OLDDECLARG(const asn1buf *, buf)
- OLDDECLARG(char **, s)
+asn1_error_code asn1buf_unparse(buf, s)
+ const asn1buf * buf;
+ char ** s;
{
if(*s != NULL) free(*s);
if(buf == NULL){
*s = calloc(length+1, sizeof(char));
if(*s == NULL) return ENOMEM;
(*s)[length] = '\0';
- for(i=0; i<length; i++)
- OLDDECLARG( (*s)[i] = , (buf->base)[length-i-1])
+ for(i=0; i<length; i++) ;
+/* OLDDECLARG( (*s)[i] = , (buf->base)[length-i-1]) */
}
return 0;
}
-asn1_error_code asn1buf_hex_unparse(DECLARG(const asn1buf *, buf),
- DECLARG(char **, s))
- OLDDECLARG(const asn1buf *, buf)
- OLDDECLARG(char **, s)
+asn1_error_code asn1buf_hex_unparse(buf, s)
+ const asn1buf * buf;
+ char ** s;
{
#define hexchar(d) ((d)<=9 ? ('0'+(d)) :\
((d)<=15 ? ('A'+(d)-10) :\
/****************************************************************/
/* Private Procedures */
-int asn1buf_size(DECLARG(const asn1buf *, buf))
- OLDDECLARG(const asn1buf *, buf)
+int asn1buf_size(buf)
+ const asn1buf * buf;
{
if(buf == NULL || buf->base == NULL) return 0;
return buf->bound - buf->base + 1;
}
-int asn1buf_free(DECLARG(const asn1buf *, buf))
- OLDDECLARG(const asn1buf *, buf)
+int asn1buf_free(buf)
+ const asn1buf * buf;
{
if(buf == NULL || buf->base == NULL) return 0;
else return buf->bound - buf->next + 1;
}
-asn1_error_code asn1buf_ensure_space(DECLARG(asn1buf *, buf),
- DECLARG(const int , amount))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , amount)
+asn1_error_code asn1buf_ensure_space(buf, amount)
+ asn1buf * buf;
+ const int amount;
{
int free = asn1buf_free(buf);
if(free < amount){
return 0;
}
-asn1_error_code asn1buf_expand(DECLARG(asn1buf *, buf),
- DECLARG(const int , inc))
- OLDDECLARG(asn1buf *, buf)
- OLDDECLARG(const int , inc)
+asn1_error_code asn1buf_expand(buf, inc)
+ asn1buf * buf;
+ const int inc;
{
#define STANDARD_INCREMENT 200
int next_offset = buf->next - buf->base;
return 0;
}
-int asn1buf_len(DECLARG(const asn1buf *, buf))
- OLDDECLARG(const asn1buf *, buf)
+int asn1buf_len(buf)
+ const asn1buf * buf;
{
return buf->next - buf->base;
}
}
struct type_KRB5_TGS__REP *
-krb5_kdc_rep2KRB5_KDC__REP(DECLARG(register const krb5_kdc_rep *,val),
- DECLARG(register int *,error))
-OLDDECLARG(register const krb5_kdc_rep *,val)
-OLDDECLARG(register int *,error)
+krb5_kdc_rep2KRB5_KDC__REP(val, error)
+ register const krb5_kdc_rep * val;
+ register int * error;
{
register struct type_KRB5_TGS__REP *retval;
#define cleanup()\
return 0
-krb5_error_code decode_krb5_authenticator(DECLARG(const krb5_data *, code),
- DECLARG(krb5_authenticator **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_authenticator **, rep)
+krb5_error_code decode_krb5_authenticator(code, rep)
+ const krb5_data * code;
+ krb5_authenticator ** rep;
{
setup();
alloc_field(*rep,krb5_authenticator);
cleanup();
}
-krb5_error_code decode_krb5_ticket(DECLARG(const krb5_data *, code),
- DECLARG(krb5_ticket **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_ticket **, rep)
+krb5_error_code decode_krb5_ticket(code, rep)
+ const krb5_data * code;
+ krb5_ticket ** rep;
{
setup();
alloc_field(*rep,krb5_ticket);
cleanup();
}
-krb5_error_code decode_krb5_encryption_key(DECLARG(const krb5_data *, code),
- DECLARG(krb5_keyblock **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_keyblock **, rep)
+krb5_error_code decode_krb5_encryption_key(code, rep)
+ const krb5_data * code;
+ krb5_keyblock ** rep;
{
setup();
alloc_field(*rep,krb5_keyblock);
cleanup();
}
-krb5_error_code decode_krb5_enc_tkt_part(DECLARG(const krb5_data *, code),
- DECLARG(krb5_enc_tkt_part **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_enc_tkt_part **, rep)
+krb5_error_code decode_krb5_enc_tkt_part(code, rep)
+ const krb5_data * code;
+ krb5_enc_tkt_part ** rep;
{
setup();
alloc_field(*rep,krb5_enc_tkt_part);
cleanup();
}
-krb5_error_code decode_krb5_enc_kdc_rep_part(DECLARG(const krb5_data *, code),
- DECLARG(krb5_enc_kdc_rep_part **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_enc_kdc_rep_part **, rep)
+krb5_error_code decode_krb5_enc_kdc_rep_part(code, rep)
+ const krb5_data * code;
+ krb5_enc_kdc_rep_part ** rep;
{
setup_no_length();
alloc_field(*rep,krb5_enc_kdc_rep_part);
cleanup();
}
-krb5_error_code decode_krb5_as_rep(DECLARG(const krb5_data *, code),
- DECLARG(krb5_kdc_rep **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_kdc_rep **, rep)
+krb5_error_code decode_krb5_as_rep(code, rep)
+ const krb5_data * code;
+ krb5_kdc_rep ** rep;
{
setup_no_length();
alloc_field(*rep,krb5_kdc_rep);
cleanup();
}
-krb5_error_code decode_krb5_tgs_rep(DECLARG(const krb5_data *, code),
- DECLARG(krb5_kdc_rep **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_kdc_rep **, rep)
+krb5_error_code decode_krb5_tgs_rep(code, rep)
+ const krb5_data * code;
+ krb5_kdc_rep ** rep;
{
setup_no_length();
alloc_field(*rep,krb5_kdc_rep);
cleanup();
}
-krb5_error_code decode_krb5_ap_req(DECLARG(const krb5_data *, code),
- DECLARG(krb5_ap_req **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_ap_req **, rep)
+krb5_error_code decode_krb5_ap_req(code, rep)
+ const krb5_data * code;
+ krb5_ap_req ** rep;
{
setup();
alloc_field(*rep,krb5_ap_req);
cleanup();
}
-krb5_error_code decode_krb5_ap_rep(DECLARG(const krb5_data *, code),
- DECLARG(krb5_ap_rep **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_ap_rep **, rep)
+krb5_error_code decode_krb5_ap_rep(code, rep)
+ const krb5_data * code;
+ krb5_ap_rep ** rep;
{
setup();
alloc_field(*rep,krb5_ap_rep);
cleanup();
}
-krb5_error_code decode_krb5_ap_rep_enc_part(DECLARG(const krb5_data *, code),
- DECLARG(krb5_ap_rep_enc_part **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_ap_rep_enc_part **, rep)
+krb5_error_code decode_krb5_ap_rep_enc_part(code, rep)
+ const krb5_data * code;
+ krb5_ap_rep_enc_part ** rep;
{
setup();
alloc_field(*rep,krb5_ap_rep_enc_part);
cleanup();
}
-krb5_error_code decode_krb5_as_req(DECLARG(const krb5_data *, code),
- DECLARG(krb5_kdc_req **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_kdc_req **, rep)
+krb5_error_code decode_krb5_as_req(code, rep)
+ const krb5_data * code;
+ krb5_kdc_req ** rep;
{
setup_no_length();
alloc_field(*rep,krb5_kdc_req);
cleanup();
}
-krb5_error_code decode_krb5_tgs_req(DECLARG(const krb5_data *, code),
- DECLARG(krb5_kdc_req **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_kdc_req **, rep)
+krb5_error_code decode_krb5_tgs_req(code, rep)
+ const krb5_data * code;
+ krb5_kdc_req ** rep;
{
setup_no_length();
alloc_field(*rep,krb5_kdc_req);
cleanup();
}
-krb5_error_code decode_krb5_kdc_req_body(DECLARG(const krb5_data *, code),
- DECLARG(krb5_kdc_req **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_kdc_req **, rep)
+krb5_error_code decode_krb5_kdc_req_body(code, rep)
+ const krb5_data * code;
+ krb5_kdc_req ** rep;
{
setup_buf_only();
alloc_field(*rep,krb5_kdc_req);
cleanup();
}
-krb5_error_code decode_krb5_safe(DECLARG(const krb5_data *, code),
- DECLARG(krb5_safe **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_safe **, rep)
+krb5_error_code decode_krb5_safe(code, rep)
+ const krb5_data * code;
+ krb5_safe ** rep;
{
setup();
alloc_field(*rep,krb5_safe);
cleanup();
}
-krb5_error_code decode_krb5_priv(DECLARG(const krb5_data *, code),
- DECLARG(krb5_priv **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_priv **, rep)
+krb5_error_code decode_krb5_priv(code, rep)
+ const krb5_data * code;
+ krb5_priv ** rep;
{
setup();
alloc_field(*rep,krb5_priv);
cleanup();
}
-krb5_error_code decode_krb5_enc_priv_part(DECLARG(const krb5_data *, code),
- DECLARG(krb5_priv_enc_part **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_priv_enc_part **, rep)
+krb5_error_code decode_krb5_enc_priv_part(code, rep)
+ const krb5_data * code;
+ krb5_priv_enc_part ** rep;
{
setup();
alloc_field(*rep,krb5_priv_enc_part);
cleanup();
}
-krb5_error_code decode_krb5_cred(DECLARG(const krb5_data *, code),
- DECLARG(krb5_cred **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_cred **, rep)
+krb5_error_code decode_krb5_cred(code, rep)
+ const krb5_data * code;
+ krb5_cred ** rep;
{
setup();
alloc_field(*rep,krb5_cred);
cleanup();
}
-krb5_error_code decode_krb5_enc_cred_part(DECLARG(const krb5_data *, code),
- DECLARG(krb5_cred_enc_part **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_cred_enc_part **, rep)
+krb5_error_code decode_krb5_enc_cred_part(code, rep)
+ const krb5_data * code;
+ krb5_cred_enc_part ** rep;
{
setup();
alloc_field(*rep,krb5_cred_enc_part);
cleanup();
}
-krb5_error_code decode_krb5_error(DECLARG(const krb5_data *, code),
- DECLARG(krb5_error **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_error **, rep)
+krb5_error_code decode_krb5_error(code, rep)
+ const krb5_data * code;
+ krb5_error ** rep;
{
setup();
alloc_field(*rep,krb5_error);
cleanup();
}
-krb5_error_code decode_krb5_authdata(DECLARG(const krb5_data *, code),
- DECLARG(krb5_authdata ***, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_authdata ***, rep)
+krb5_error_code decode_krb5_authdata(code, rep)
+ const krb5_data * code;
+ krb5_authdata *** rep;
{
setup_buf_only();
*rep = 0;
cleanup();
}
-krb5_error_code decode_krb5_pwd_sequence(DECLARG(const krb5_data *, code),
- DECLARG(passwd_phrase_element **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(passwd_phrase_element **, rep)
+krb5_error_code decode_krb5_pwd_sequence(code, rep)
+ const krb5_data * code;
+ passwd_phrase_element ** rep;
{
setup_buf_only();
alloc_field(*rep,passwd_phrase_element);
cleanup();
}
-krb5_error_code decode_krb5_pwd_data(DECLARG(const krb5_data *, code),
- DECLARG(krb5_pwd_data **, rep))
- OLDDECLARG(const krb5_data *, code)
- OLDDECLARG(krb5_pwd_data **, rep)
+krb5_error_code decode_krb5_pwd_data(code, rep)
+ const krb5_data * code;
+ krb5_pwd_data ** rep;
{
setup();
alloc_field(*rep,krb5_pwd_data);
\
return 0
-krb5_error_code encode_krb5_authenticator(DECLARG(const krb5_authenticator *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_authenticator *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_authenticator(rep, code)
+ const krb5_authenticator * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_ticket(DECLARG(const krb5_ticket *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_ticket *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_ticket(rep, code)
+ const krb5_ticket * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_encryption_key(DECLARG(const krb5_keyblock *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_keyblock *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_encryption_key(rep, code)
+ const krb5_keyblock * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_enc_tkt_part(DECLARG(const krb5_enc_tkt_part *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_enc_tkt_part *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_enc_tkt_part(rep, code)
+ const krb5_enc_tkt_part * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_enc_kdc_rep_part(DECLARG(const krb5_enc_kdc_rep_part *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_enc_kdc_rep_part *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_enc_kdc_rep_part(rep, code)
+ 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(DECLARG(const krb5_kdc_rep *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_kdc_rep *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_as_rep(rep, code)
+ 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(DECLARG(const krb5_kdc_rep *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_kdc_rep *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_tgs_rep( rep, code)
+ const krb5_kdc_rep * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_ap_req(DECLARG(const krb5_ap_req *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_ap_req *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_ap_req(rep, code)
+ const krb5_ap_req * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_ap_rep(DECLARG(const krb5_ap_rep *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_ap_rep *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_ap_rep(rep, code)
+ const krb5_ap_rep * rep;
+ krb5_data ** code;
{
krb5_setup();
}
-krb5_error_code encode_krb5_ap_rep_enc_part(DECLARG(const krb5_ap_rep_enc_part *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_ap_rep_enc_part *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_ap_rep_enc_part(rep, code)
+ const krb5_ap_rep_enc_part * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_as_req(DECLARG(const krb5_kdc_req *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_kdc_req *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_as_req(rep, code)
+ const krb5_kdc_req * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_tgs_req(DECLARG(const krb5_kdc_req *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_kdc_req *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_tgs_req(rep, code)
+ const krb5_kdc_req * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_kdc_req_body(DECLARG(const krb5_kdc_req *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_kdc_req *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_kdc_req_body(rep, code)
+ const krb5_kdc_req * rep;
+ krb5_data ** code;
{
krb5_setup();
}
-krb5_error_code encode_krb5_safe(DECLARG(const krb5_safe *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_safe *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_safe(rep, code)
+ const krb5_safe * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_priv(DECLARG(const krb5_priv *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_priv *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_priv(rep, code)
+ const krb5_priv * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_enc_priv_part(DECLARG(const krb5_priv_enc_part *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_priv_enc_part *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_enc_priv_part(rep, code)
+ const krb5_priv_enc_part * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_cred(DECLARG(const krb5_cred *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_cred *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_cred(rep, code)
+ const krb5_cred * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_enc_cred_part(DECLARG(const krb5_cred_enc_part *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_cred_enc_part *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_enc_cred_part(rep, code)
+ const krb5_cred_enc_part * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_error(DECLARG(const krb5_error *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_error *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_error(rep, code)
+ const krb5_error * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_cleanup();
}
-krb5_error_code encode_krb5_authdata(DECLARG(const krb5_authdata **, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_authdata **, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_authdata(rep, code)
+ const krb5_authdata ** rep;
+ krb5_data ** code;
{
asn1_error_code retval;
asn1buf *buf=NULL;
}
/* Sandia Additions */
-krb5_error_code encode_krb5_pwd_sequence(DECLARG(const passwd_phrase_element *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const passwd_phrase_element *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_pwd_sequence( rep, code)
+ 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(DECLARG(const krb5_pwd_data *, rep),
- DECLARG(krb5_data **, code))
- OLDDECLARG(const krb5_pwd_data *, rep)
- OLDDECLARG(krb5_data **, code)
+krb5_error_code encode_krb5_pwd_data(rep, code)
+ const krb5_pwd_data * rep;
+ krb5_data ** code;
{
krb5_setup();
krb5_addfield((const passwd_phrase_element**)rep->element,1,asn1_encode_sequence_of_passwdsequence);
#include "ktfile.h"
krb5_error_code
-krb5_ktfile_add(id, entry)
-krb5_keytab id;
-krb5_keytab_entry *entry;
+krb5_ktfile_add(context, id, entry)
+ krb5_context context;
+ krb5_keytab id;
+ krb5_keytab_entry *entry;
{
krb5_error_code retval;
- if (retval = krb5_ktfileint_openw(id))
+ if (retval = krb5_ktfileint_openw(context, id))
return retval;
if (fseek(KTFILEP(id), 0, 2) == -1)
return KRB5_KT_END;
- retval = krb5_ktfileint_write_entry(id, entry);
- krb5_ktfileint_close(id);
+ retval = krb5_ktfileint_write_entry(context, id, entry);
+ krb5_ktfileint_close(context, id);
return retval;
}
#include "ktfile.h"
krb5_error_code
-krb5_ktfile_close(id)
+krb5_ktfile_close(context, id)
+ krb5_context context;
krb5_keytab id;
/*
* This routine is responsible for freeing all memory allocated
#include "ktfile.h"
krb5_error_code
-krb5_ktfile_end_get(id, cursor)
+krb5_ktfile_end_get(context, id, cursor)
+ krb5_context context;
krb5_keytab id;
krb5_kt_cursor *cursor;
{
krb5_xfree(*cursor);
- return krb5_ktfileint_close(id);
+ return krb5_ktfileint_close(context, id);
}
#include "ktfile.h"
krb5_error_code
-krb5_ktfile_get_entry(DECLARG(krb5_keytab, id),
- DECLARG(krb5_principal, principal),
- DECLARG(krb5_kvno, kvno),
- DECLARG(krb5_keytab_entry *, entry))
-OLDDECLARG(krb5_keytab, id)
-OLDDECLARG(krb5_principal, principal)
-OLDDECLARG(krb5_kvno, kvno)
-OLDDECLARG(krb5_keytab_entry *, entry)
+krb5_ktfile_get_entry(context, id, principal, kvno, entry)
+ krb5_context context;
+ krb5_keytab id;
+ krb5_principal principal;
+ krb5_kvno kvno;
+ krb5_keytab_entry * entry;
{
krb5_keytab_entry cur_entry, new_entry;
krb5_error_code kerror = 0;
/* Open the keyfile for reading */
- if (kerror = krb5_ktfileint_openr(id))
+ if (kerror = krb5_ktfileint_openr(context, id))
return(kerror);
/*
cur_entry.vno = 0;
cur_entry.key.contents = 0;
while (TRUE) {
- if (kerror = krb5_ktfileint_read_entry(id, &new_entry))
+ if (kerror = krb5_ktfileint_read_entry(context, id, &new_entry))
break;
- if (krb5_principal_compare(principal, new_entry.principal)) {
+ if (krb5_principal_compare(context, principal, new_entry.principal)) {
if (kvno == IGNORE_VNO) {
if (cur_entry.vno < new_entry.vno) {
- krb5_kt_free_entry(&cur_entry);
+ krb5_kt_free_entry(context, &cur_entry);
cur_entry = new_entry;
}
} else {
break;
}
} else {
- krb5_kt_free_entry(&new_entry);
+ krb5_kt_free_entry(context, &new_entry);
}
}
if (kerror == KRB5_KT_END)
kerror = cur_entry.principal ? 0 : KRB5_KT_NOTFOUND;
if (kerror) {
- (void) krb5_ktfileint_close(id);
- krb5_kt_free_entry(&cur_entry);
+ (void) krb5_ktfileint_close(context, id);
+ krb5_kt_free_entry(context, &cur_entry);
return kerror;
}
- if ((kerror = krb5_ktfileint_close(id)) != 0) {
- krb5_kt_free_entry(&cur_entry);
+ if ((kerror = krb5_ktfileint_close(context, id)) != 0) {
+ krb5_kt_free_entry(context, &cur_entry);
return kerror;
}
*entry = cur_entry;
#include "ktfile.h"
krb5_error_code
-krb5_ktfile_get_name(id, name, len)
+krb5_ktfile_get_name(context, id, name, len)
+ krb5_context context;
krb5_keytab id;
char *name;
int len;
#include "ktfile.h"
krb5_error_code
-krb5_ktfile_get_next(id, entry, cursor)
+krb5_ktfile_get_next(context, id, entry, cursor)
+ krb5_context context;
krb5_keytab id;
krb5_keytab_entry *entry;
krb5_kt_cursor *cursor;
if (fseek(KTFILEP(id), *fileoff, 0) == -1)
return KRB5_KT_END;
- if (kerror = krb5_ktfileint_read_entry(id, &cur_entry))
+ if (kerror = krb5_ktfileint_read_entry(context, id, &cur_entry))
return kerror;
*fileoff = ftell(KTFILEP(id));
*entry = cur_entry;
#include "ktfile.h"
krb5_error_code
-krb5_ktfile_remove(id, entry)
+krb5_ktfile_remove(context, id, entry)
+ krb5_context context;
krb5_keytab id;
krb5_keytab_entry *entry;
{
krb5_error_code kerror;
krb5_int32 delete_point;
- if (kerror = krb5_ktfileint_openw(id)) {
+ if (kerror = krb5_ktfileint_openw(context, id)) {
return kerror;
}
* is exited with a break statement.
*/
while (TRUE) {
- if (kerror = krb5_ktfileint_internal_read_entry(id, &cur_entry,
+ if (kerror = krb5_ktfileint_internal_read_entry(context, id, &cur_entry,
&delete_point))
break;
if ((entry->vno == cur_entry.vno) &&
(entry->key.keytype == cur_entry.key.keytype) &&
- krb5_principal_compare(entry->principal, cur_entry.principal)) {
+ krb5_principal_compare(context, entry->principal, cur_entry.principal)) {
/* found a match */
- krb5_kt_free_entry(&cur_entry);
+ krb5_kt_free_entry(context, &cur_entry);
break;
}
- krb5_kt_free_entry(&cur_entry);
+ krb5_kt_free_entry(context, &cur_entry);
}
if (kerror == KRB5_KT_END)
kerror = KRB5_KT_NOTFOUND;
if (kerror) {
- (void) krb5_ktfileint_close(id);
+ (void) krb5_ktfileint_close(context, id);
return kerror;
}
- kerror = krb5_ktfileint_delete_entry(id, delete_point);
+ kerror = krb5_ktfileint_delete_entry(context, id, delete_point);
if (kerror) {
- (void) krb5_ktfileint_close(id);
+ (void) krb5_ktfileint_close(context, id);
} else {
- kerror = krb5_ktfileint_close(id);
+ kerror = krb5_ktfileint_close(context, id);
}
return kerror;
#include "ktfile.h"
krb5_error_code
-krb5_ktfile_resolve(name, id)
+krb5_ktfile_resolve(context, name, id)
+ krb5_context context;
const char *name;
krb5_keytab *id;
{
#include "ktfile.h"
krb5_error_code
-krb5_ktfile_start_seq_get(id, cursorp)
+krb5_ktfile_start_seq_get(context, id, cursorp)
+ krb5_context context;
krb5_keytab id;
krb5_kt_cursor *cursorp;
{
krb5_error_code retval;
long *fileoff;
- if (retval = krb5_ktfileint_openr(id))
+ if (retval = krb5_ktfileint_openr(context, id))
return retval;
if (!(fileoff = (long *)malloc(sizeof(*fileoff)))) {
- krb5_ktfileint_close(id);
+ krb5_ktfileint_close(context, id);
return ENOMEM;
}
*fileoff = ftell(KTFILEP(id));
extern int errno;
static krb5_error_code
-krb5_ktfileint_open(id, mode)
+krb5_ktfileint_open(context, id, mode)
+ krb5_context context;
krb5_keytab id;
int mode;
{
if (!KTFILEP(id)) {
if ((mode == KRB5_LOCKMODE_EXCLUSIVE) && (errno == ENOENT)) {
/* try making it first time around */
- krb5_create_secure_file(KTFILENAME(id));
+ krb5_create_secure_file(context, KTFILENAME(id));
KTFILEP(id) = fopen(KTFILENAME(id), fopen_mode_rbplus);
if (!KTFILEP(id))
return errno;
} else /* some other error */
return errno;
}
- if (kerror = krb5_lock_file(KTFILEP(id), KTFILENAME(id),
+ if (kerror = krb5_lock_file(context, KTFILEP(id), KTFILENAME(id),
mode)) {
(void) fclose(KTFILEP(id));
KTFILEP(id) = 0;
KTVERSION(id) = krb5_kt_default_vno;
if (!xfwrite(&kt_vno, sizeof(kt_vno), 1, KTFILEP(id))) {
kerror = errno;
- (void) krb5_unlock_file(KTFILEP(id), KTFILENAME(id));
+ (void) krb5_unlock_file(context, KTFILEP(id), KTFILENAME(id));
(void) fclose(KTFILEP(id));
return kerror;
}
/* gotta verify it instead... */
if (!xfread(&kt_vno, sizeof(kt_vno), 1, KTFILEP(id))) {
kerror = errno;
- (void) krb5_unlock_file(KTFILEP(id), KTFILENAME(id));
+ (void) krb5_unlock_file(context, KTFILEP(id), KTFILENAME(id));
(void) fclose(KTFILEP(id));
return kerror;
}
kt_vno = KTVERSION(id) = ntohs(kt_vno);
if ((kt_vno != KRB5_KT_VNO) &&
(kt_vno != KRB5_KT_VNO_1)) {
- (void) krb5_unlock_file(KTFILEP(id), KTFILENAME(id));
+ (void) krb5_unlock_file(context, KTFILEP(id), KTFILENAME(id));
(void) fclose(KTFILEP(id));
return -1 /* KRB5_KEYTAB_BADVNO */;
}
}
krb5_error_code
-krb5_ktfileint_openr(id)
+krb5_ktfileint_openr(context, id)
+ krb5_context context;
krb5_keytab id;
{
- return krb5_ktfileint_open(id, KRB5_LOCKMODE_SHARED);
+ return krb5_ktfileint_open(context, id, KRB5_LOCKMODE_SHARED);
}
krb5_error_code
-krb5_ktfileint_openw(id)
+krb5_ktfileint_openw(context, id)
+ krb5_context context;
krb5_keytab id;
{
- return krb5_ktfileint_open(id, KRB5_LOCKMODE_EXCLUSIVE);
+ return krb5_ktfileint_open(context, id, KRB5_LOCKMODE_EXCLUSIVE);
}
krb5_error_code
-krb5_ktfileint_close(id)
+krb5_ktfileint_close(context, id)
+ krb5_context context;
krb5_keytab id;
{
krb5_error_code kerror;
if (!KTFILEP(id))
return 0;
- kerror = krb5_unlock_file(KTFILEP(id), KTFILENAME(id));
+ kerror = krb5_unlock_file(context, KTFILEP(id), KTFILENAME(id));
(void) fclose(KTFILEP(id));
KTFILEP(id) = 0;
return kerror;
}
krb5_error_code
-krb5_ktfileint_delete_entry(id, delete_point)
+krb5_ktfileint_delete_entry(context, id, delete_point)
+ krb5_context context;
krb5_keytab id;
krb5_int32 delete_point;
{
}
}
- return krb5_sync_disk_file(KTFILEP(id));
+ return krb5_sync_disk_file(context, KTFILEP(id));
}
return 0;
}
krb5_error_code
-krb5_ktfileint_internal_read_entry(id, ret_entry, delete_point)
+krb5_ktfileint_internal_read_entry(context, id, ret_entry, delete_point)
+ krb5_context context;
krb5_keytab id;
krb5_keytab_entry *ret_entry;
krb5_int32 *delete_point;
error = KRB5_KT_END;
goto fail;
}
- krb5_princ_set_realm_length(ret_entry->principal, princ_size);
+ krb5_princ_set_realm_length(context, ret_entry->principal, princ_size);
tmpdata = malloc(princ_size+1);
if (!tmpdata) {
error = ENOMEM;
tmpdata[princ_size] = 0; /* Some things might be expecting null */
/* termination... ``Be conservative in */
/* what you send out'' */
- krb5_princ_set_realm_data(ret_entry->principal, tmpdata);
+ krb5_princ_set_realm_data(context, ret_entry->principal, tmpdata);
for (i = 0; i < count; i++) {
- princ = krb5_princ_component(ret_entry->principal, i);
+ princ = krb5_princ_component(context, ret_entry->principal, i);
if (!xfread(&princ_size, sizeof(princ_size), 1, KTFILEP(id))) {
error = KRB5_KT_END;
goto fail;
fail:
for (i = 0; i < ret_entry->principal->length; i++) {
- princ = krb5_princ_component(ret_entry->principal, i);
+ princ = krb5_princ_component(context, ret_entry->principal, i);
if (princ->data)
free(princ->data);
}
}
krb5_error_code
-krb5_ktfileint_read_entry(id, entryp)
+krb5_ktfileint_read_entry(context, id, entryp)
+ krb5_context context;
krb5_keytab id;
krb5_keytab_entry *entryp;
{
krb5_int32 delete_point;
- return krb5_ktfileint_internal_read_entry(id, entryp, &delete_point);
+ return krb5_ktfileint_internal_read_entry(context, id, entryp, &delete_point);
}
krb5_error_code
-krb5_ktfileint_write_entry(id, entry)
+krb5_ktfileint_write_entry(context, id, entry)
+ krb5_context context;
krb5_keytab id;
krb5_keytab_entry *entry;
{
int i;
char iobuf[BUFSIZ];
- retval = krb5_ktfileint_size_entry(entry, &size_needed);
+ retval = krb5_ktfileint_size_entry(context, entry, &size_needed);
if (retval)
return retval;
- retval = krb5_ktfileint_find_slot(id, &size_needed, &commit_point);
+ retval = krb5_ktfileint_find_slot(context, id, &size_needed, &commit_point);
if (retval)
return retval;
setbuf(KTFILEP(id), 0);
return KRB5_KT_IOERR;
}
- size = krb5_princ_realm(entry->principal)->length;
+ size = krb5_princ_realm(context, entry->principal)->length;
if (KTVERSION(id) != KRB5_KT_VNO_1)
size = htons(size);
if (!xfwrite(&size, sizeof(size), 1, KTFILEP(id))) {
goto abend;
}
- if (!xfwrite(krb5_princ_realm(entry->principal)->data, sizeof(char),
- krb5_princ_realm(entry->principal)->length, KTFILEP(id))) {
+ if (!xfwrite(krb5_princ_realm(context, entry->principal)->data, sizeof(char),
+ krb5_princ_realm(context, entry->principal)->length, KTFILEP(id))) {
goto abend;
}
count = entry->principal->length;
for (i = 0; i < count; i++) {
- princ = krb5_princ_component(entry->principal, i);
+ princ = krb5_princ_component(context, entry->principal, i);
size = princ->length;
if (KTVERSION(id) != KRB5_KT_VNO_1)
size = htons(size);
* Write out the principal type
*/
if (KTVERSION(id) != KRB5_KT_VNO_1) {
- princ_type = htonl(krb5_princ_type(entry->principal));
+ princ_type = htonl(krb5_princ_type(context, entry->principal));
if (!xfwrite(&princ_type, sizeof(princ_type), 1, KTFILEP(id))) {
goto abend;
}
/*
* Fill in the time of day the entry was written to the keytab.
*/
- if (krb5_timeofday(&entry->timestamp)) {
+ if (krb5_timeofday(context, &entry->timestamp)) {
entry->timestamp = 0;
}
if (KTVERSION(id) == KRB5_KT_VNO_1)
return KRB5_KT_IOERR;
}
- retval = krb5_sync_disk_file(KTFILEP(id));
+ retval = krb5_sync_disk_file(context, KTFILEP(id));
(void) memset(iobuf, 0, sizeof(iobuf));
setbuf(KTFILEP(id), 0);
if (!xfwrite(&size_needed, sizeof(size_needed), 1, KTFILEP(id))) {
goto abend;
}
- retval = krb5_sync_disk_file(KTFILEP(id));
+ retval = krb5_sync_disk_file(context, KTFILEP(id));
return retval;
}
* keytab entry.
*/
krb5_error_code
-krb5_ktfileint_size_entry(entry, size_needed)
+krb5_ktfileint_size_entry(context, entry, size_needed)
+ krb5_context context;
krb5_keytab_entry *entry;
krb5_int32 *size_needed;
{
count = entry->principal->length;
total_size = sizeof(count);
- total_size += krb5_princ_realm(entry->principal)->length + (sizeof(size));
+ total_size += krb5_princ_realm(context, entry->principal)->length + (sizeof(size));
for (i = 0; i < count; i++) {
- total_size += krb5_princ_component(entry->principal,i)->length
+ total_size += krb5_princ_component(context, entry->principal,i)->length
+ (sizeof(size));
}
* block in the file rather than the size of the actual entry)
*/
krb5_error_code
-krb5_ktfileint_find_slot(id, size_needed, commit_point)
+krb5_ktfileint_find_slot(context, id, size_needed, commit_point)
+ krb5_context context;
krb5_keytab id;
krb5_int32 *size_needed;
krb5_int32 *commit_point;
#include "ktfile.h"
krb5_error_code
-krb5_ktfile_wresolve(name, id)
+krb5_ktfile_wresolve(context, name, id)
+ krb5_context context;
const char *name;
krb5_keytab *id;
{
/* widen prototypes, if needed */
#include <krb5/widen.h>
-krb5_error_code krb5_ktfile_resolve PROTOTYPE((const char *,
- krb5_keytab *));
-krb5_error_code krb5_ktfile_wresolve PROTOTYPE((const char *,
- krb5_keytab *));
-krb5_error_code krb5_ktfile_get_name PROTOTYPE((krb5_keytab,
- char *,
- int));
-krb5_error_code krb5_ktfile_close PROTOTYPE((krb5_keytab));
-krb5_error_code krb5_ktfile_get_entry PROTOTYPE((krb5_keytab,
- krb5_principal,
- krb5_kvno,
- krb5_keytab_entry *));
-krb5_error_code krb5_ktfile_start_seq_get PROTOTYPE((krb5_keytab,
- krb5_kt_cursor *));
-krb5_error_code krb5_ktfile_get_next PROTOTYPE((krb5_keytab,
- krb5_keytab_entry *,
- krb5_kt_cursor *));
-krb5_error_code krb5_ktfile_end_get PROTOTYPE((krb5_keytab,
- krb5_kt_cursor *));
+krb5_error_code krb5_ktfile_resolve
+ PROTOTYPE((krb5_context,
+ const char *,
+ krb5_keytab *));
+
+krb5_error_code krb5_ktfile_wresolve
+ PROTOTYPE((krb5_context,
+ const char *,
+ krb5_keytab *));
+
+krb5_error_code krb5_ktfile_get_name
+ PROTOTYPE((krb5_context,
+ krb5_keytab,
+ char *,
+ int));
+
+krb5_error_code krb5_ktfile_close
+ PROTOTYPE((krb5_context,
+ krb5_keytab));
+
+krb5_error_code krb5_ktfile_get_entry
+ PROTOTYPE((krb5_context,
+ krb5_keytab,
+ krb5_principal,
+ krb5_kvno,
+ krb5_keytab_entry *));
+
+krb5_error_code krb5_ktfile_start_seq_get
+ PROTOTYPE((krb5_context,
+ krb5_keytab,
+ krb5_kt_cursor *));
+
+krb5_error_code krb5_ktfile_get_next
+ PROTOTYPE((krb5_context,
+ krb5_keytab,
+ krb5_keytab_entry *,
+ krb5_kt_cursor *));
+
+krb5_error_code krb5_ktfile_end_get
+ PROTOTYPE((krb5_context,
+ krb5_keytab,
+ krb5_kt_cursor *));
+
/* routines to be included on extended version (write routines) */
-krb5_error_code krb5_ktfile_add PROTOTYPE((krb5_keytab,
- krb5_keytab_entry *));
-krb5_error_code krb5_ktfile_remove PROTOTYPE((krb5_keytab,
- krb5_keytab_entry *));
-
-krb5_error_code krb5_ktfileint_openr PROTOTYPE((krb5_keytab));
-krb5_error_code krb5_ktfileint_openw PROTOTYPE((krb5_keytab));
-krb5_error_code krb5_ktfileint_close PROTOTYPE((krb5_keytab));
-krb5_error_code krb5_ktfileint_read_entry PROTOTYPE((krb5_keytab,
- krb5_keytab_entry *));
-krb5_error_code krb5_ktfileint_write_entry PROTOTYPE((krb5_keytab,
- krb5_keytab_entry *));
-krb5_error_code krb5_ktfileint_delete_entry PROTOTYPE((krb5_keytab,
- krb5_int32));
-krb5_error_code krb5_ktfileint_internal_read_entry PROTOTYPE((krb5_keytab,
- krb5_keytab_entry *,
- krb5_int32 *));
-krb5_error_code krb5_ktfileint_size_entry PROTOTYPE((krb5_keytab_entry *,
- krb5_int32 *));
-krb5_error_code krb5_ktfileint_find_slot PROTOTYPE((krb5_keytab,
- krb5_int32 *,
- krb5_int32 *));
+krb5_error_code krb5_ktfile_add
+ PROTOTYPE((krb5_context,
+ krb5_keytab,
+ krb5_keytab_entry *));
+
+krb5_error_code krb5_ktfile_remove
+ PROTOTYPE((krb5_context,
+ krb5_keytab,
+ krb5_keytab_entry *));
+
+krb5_error_code krb5_ktfileint_openr
+ PROTOTYPE((krb5_context,
+ krb5_keytab));
+
+krb5_error_code krb5_ktfileint_openw
+ PROTOTYPE((krb5_context,
+ krb5_keytab));
+
+krb5_error_code krb5_ktfileint_close
+ PROTOTYPE((krb5_context,
+ krb5_keytab));
+
+krb5_error_code krb5_ktfileint_read_entry
+ PROTOTYPE((krb5_context,
+ krb5_keytab,
+ krb5_keytab_entry *));
+
+krb5_error_code krb5_ktfileint_write_entry
+ PROTOTYPE((krb5_context,
+ krb5_keytab,
+ krb5_keytab_entry *));
+
+krb5_error_code krb5_ktfileint_delete_entry
+ PROTOTYPE((krb5_context,
+ krb5_keytab,
+ krb5_int32));
+
+krb5_error_code krb5_ktfileint_internal_read_entry
+ PROTOTYPE((krb5_context,
+ krb5_keytab,
+ krb5_keytab_entry *,
+ krb5_int32 *));
+
+krb5_error_code krb5_ktfileint_size_entry
+ PROTOTYPE((krb5_context,
+ krb5_keytab_entry *,
+ krb5_int32 *));
+
+krb5_error_code krb5_ktfileint_find_slot
+ PROTOTYPE((krb5_context,
+ krb5_keytab,
+ krb5_int32 *,
+ krb5_int32 *));
+
/* and back to normal... */
#include <krb5/narrow.h>