From: Keith Vetter Date: Wed, 22 Feb 1995 03:08:52 +0000 (+0000) Subject: Converted krb5/des425 and krb5/asn.1 to the PC X-Git-Tag: krb5-1.0-beta5~692 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b71f3e8737fa16380f27deaafe5ef63c21cda99f;p=krb5.git Converted krb5/des425 and krb5/asn.1 to the PC git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4970 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/krb5/ChangeLog b/src/include/krb5/ChangeLog index cc7c71d9f..e06bf651d 100644 --- a/src/include/krb5/ChangeLog +++ b/src/include/krb5/ChangeLog @@ -1,10 +1,19 @@ +Tue Feb 21 17:31:06 1995 Keith Vetter (keithv@fusion.com) + + * config.h: added HAVE_ERRNO for the windows section + changed windows manifest constant from __windows__ + to _MSDOS so that DOS test programs will compile. + +Tue Feb 21 12:00:32 1995 Keith Vetter (keithv@fusion.com) + + * asn1.h: added windows INTERFACE keyword to all functions. + Tue Feb 21 17:49:41 1995 Mark Eichin (eichin@cygnus.com) * config.h: get krb5/autoconf.h. * Makefile.in (KRB5_HEADERS): add config.h, remove rsa-md4.h and crc-32.h which aren't here anymore. -======= Tue Feb 21 0:0:32 1995 Keith Vetter (keithv@fusion.com) * func-proto.h: added windows INTERFACE keyword to all functions. diff --git a/src/include/krb5/asn1.h b/src/include/krb5/asn1.h index 89efd4cda..f142179f8 100644 --- a/src/include/krb5/asn1.h +++ b/src/include/krb5/asn1.h @@ -115,72 +115,72 @@ Returns ENOMEM if memory runs out. */ -krb5_error_code encode_krb5_authenticator +krb5_error_code INTERFACE encode_krb5_authenticator PROTOTYPE((const krb5_authenticator *rep, krb5_data **code)); -krb5_error_code encode_krb5_ticket +krb5_error_code INTERFACE encode_krb5_ticket PROTOTYPE((const krb5_ticket *rep, krb5_data **code)); -krb5_error_code encode_krb5_encryption_key +krb5_error_code INTERFACE encode_krb5_encryption_key PROTOTYPE((const krb5_keyblock *rep, krb5_data **code)); -krb5_error_code encode_krb5_enc_tkt_part +krb5_error_code INTERFACE encode_krb5_enc_tkt_part PROTOTYPE((const krb5_enc_tkt_part *rep, krb5_data **code)); -krb5_error_code encode_krb5_enc_kdc_rep_part +krb5_error_code INTERFACE encode_krb5_enc_kdc_rep_part PROTOTYPE((const krb5_enc_kdc_rep_part *rep, krb5_data **code)); /* yes, the translation is identical to that used for KDC__REP */ -krb5_error_code encode_krb5_as_rep +krb5_error_code INTERFACE encode_krb5_as_rep PROTOTYPE((const krb5_kdc_rep *rep, krb5_data **code)); /* yes, the translation is identical to that used for KDC__REP */ -krb5_error_code encode_krb5_tgs_rep +krb5_error_code INTERFACE encode_krb5_tgs_rep PROTOTYPE((const krb5_kdc_rep *rep, krb5_data **code)); -krb5_error_code encode_krb5_ap_req +krb5_error_code INTERFACE encode_krb5_ap_req PROTOTYPE((const krb5_ap_req *rep, krb5_data **code)); -krb5_error_code encode_krb5_ap_rep +krb5_error_code INTERFACE encode_krb5_ap_rep PROTOTYPE((const krb5_ap_rep *rep, krb5_data **code)); -krb5_error_code encode_krb5_ap_rep_enc_part +krb5_error_code INTERFACE encode_krb5_ap_rep_enc_part PROTOTYPE((const krb5_ap_rep_enc_part *rep, krb5_data **code)); -krb5_error_code encode_krb5_as_req +krb5_error_code INTERFACE encode_krb5_as_req PROTOTYPE((const krb5_kdc_req *rep, krb5_data **code)); -krb5_error_code encode_krb5_tgs_req +krb5_error_code INTERFACE encode_krb5_tgs_req PROTOTYPE((const krb5_kdc_req *rep, krb5_data **code)); -krb5_error_code encode_krb5_kdc_req_body +krb5_error_code INTERFACE encode_krb5_kdc_req_body PROTOTYPE((const krb5_kdc_req *rep, krb5_data **code)); -krb5_error_code encode_krb5_safe +krb5_error_code INTERFACE encode_krb5_safe PROTOTYPE((const krb5_safe *rep, krb5_data **code)); -krb5_error_code encode_krb5_priv +krb5_error_code INTERFACE encode_krb5_priv PROTOTYPE((const krb5_priv *rep, krb5_data **code)); -krb5_error_code encode_krb5_enc_priv_part +krb5_error_code INTERFACE encode_krb5_enc_priv_part PROTOTYPE((const krb5_priv_enc_part *rep, krb5_data **code)); -krb5_error_code encode_krb5_cred +krb5_error_code INTERFACE encode_krb5_cred PROTOTYPE((const krb5_cred *rep, krb5_data **code)); -krb5_error_code encode_krb5_enc_cred_part +krb5_error_code INTERFACE encode_krb5_enc_cred_part PROTOTYPE((const krb5_cred_enc_part *rep, krb5_data **code)); -krb5_error_code encode_krb5_error +krb5_error_code INTERFACE encode_krb5_error PROTOTYPE((const krb5_error *rep, krb5_data **code)); -krb5_error_code encode_krb5_authdata +krb5_error_code INTERFACE encode_krb5_authdata PROTOTYPE((const krb5_authdata **rep, krb5_data **code)); -krb5_error_code encode_krb5_pwd_sequence +krb5_error_code INTERFACE encode_krb5_pwd_sequence PROTOTYPE((const passwd_phrase_element *rep, krb5_data **code)); -krb5_error_code encode_krb5_pwd_data +krb5_error_code INTERFACE encode_krb5_pwd_data PROTOTYPE((const krb5_pwd_data *rep, krb5_data **code)); /************************************************************************* @@ -203,70 +203,70 @@ krb5_error_code encode_krb5_pwd_data Returns asn1 and krb5 errors. */ -krb5_error_code decode_krb5_authenticator +krb5_error_code INTERFACE decode_krb5_authenticator PROTOTYPE((const krb5_data *code, krb5_authenticator **rep)); -krb5_error_code decode_krb5_ticket +krb5_error_code INTERFACE decode_krb5_ticket PROTOTYPE((const krb5_data *code, krb5_ticket **rep)); -krb5_error_code decode_krb5_encryption_key +krb5_error_code INTERFACE decode_krb5_encryption_key PROTOTYPE((const krb5_data *output, krb5_keyblock **rep)); -krb5_error_code decode_krb5_enc_tkt_part +krb5_error_code INTERFACE decode_krb5_enc_tkt_part PROTOTYPE((const krb5_data *output, krb5_enc_tkt_part **rep)); -krb5_error_code decode_krb5_enc_kdc_rep_part +krb5_error_code INTERFACE decode_krb5_enc_kdc_rep_part PROTOTYPE((const krb5_data *output, krb5_enc_kdc_rep_part **rep)); -krb5_error_code decode_krb5_as_rep +krb5_error_code INTERFACE decode_krb5_as_rep PROTOTYPE((const krb5_data *output, krb5_kdc_rep **rep)); -krb5_error_code decode_krb5_tgs_rep +krb5_error_code INTERFACE decode_krb5_tgs_rep PROTOTYPE((const krb5_data *output, krb5_kdc_rep **rep)); -krb5_error_code decode_krb5_ap_req +krb5_error_code INTERFACE decode_krb5_ap_req PROTOTYPE((const krb5_data *output, krb5_ap_req **rep)); -krb5_error_code decode_krb5_ap_rep +krb5_error_code INTERFACE decode_krb5_ap_rep PROTOTYPE((const krb5_data *output, krb5_ap_rep **rep)); -krb5_error_code decode_krb5_ap_rep_enc_part +krb5_error_code INTERFACE decode_krb5_ap_rep_enc_part PROTOTYPE((const krb5_data *output, krb5_ap_rep_enc_part **rep)); -krb5_error_code decode_krb5_as_req +krb5_error_code INTERFACE decode_krb5_as_req PROTOTYPE((const krb5_data *output, krb5_kdc_req **rep)); -krb5_error_code decode_krb5_tgs_req +krb5_error_code INTERFACE decode_krb5_tgs_req PROTOTYPE((const krb5_data *output, krb5_kdc_req **rep)); -krb5_error_code decode_krb5_kdc_req_body +krb5_error_code INTERFACE decode_krb5_kdc_req_body PROTOTYPE((const krb5_data *output, krb5_kdc_req **rep)); -krb5_error_code decode_krb5_safe +krb5_error_code INTERFACE decode_krb5_safe PROTOTYPE((const krb5_data *output, krb5_safe **rep)); -krb5_error_code decode_krb5_priv +krb5_error_code INTERFACE decode_krb5_priv PROTOTYPE((const krb5_data *output, krb5_priv **rep)); -krb5_error_code decode_krb5_enc_priv_part +krb5_error_code INTERFACE decode_krb5_enc_priv_part PROTOTYPE((const krb5_data *output, krb5_priv_enc_part **rep)); -krb5_error_code decode_krb5_cred +krb5_error_code INTERFACE decode_krb5_cred PROTOTYPE((const krb5_data *output, krb5_cred **rep)); -krb5_error_code decode_krb5_enc_cred_part +krb5_error_code INTERFACE decode_krb5_enc_cred_part PROTOTYPE((const krb5_data *output, krb5_cred_enc_part **rep)); -krb5_error_code decode_krb5_error +krb5_error_code INTERFACE decode_krb5_error PROTOTYPE((const krb5_data *output, krb5_error **rep)); -krb5_error_code decode_krb5_authdata +krb5_error_code INTERFACE decode_krb5_authdata PROTOTYPE((const krb5_data *output, krb5_authdata ***rep)); -krb5_error_code decode_krb5_pwd_sequence +krb5_error_code INTERFACE decode_krb5_pwd_sequence PROTOTYPE((const krb5_data *output, passwd_phrase_element **rep)); -krb5_error_code decode_krb5_pwd_data +krb5_error_code INTERFACE decode_krb5_pwd_data PROTOTYPE((const krb5_data *output, krb5_pwd_data **rep)); /************************************************************************* diff --git a/src/include/krb5/config.h b/src/include/krb5/config.h index e37decd26..039433969 100644 --- a/src/include/krb5/config.h +++ b/src/include/krb5/config.h @@ -25,7 +25,7 @@ #ifndef KRB5_CONFIG__ #define KRB5_CONFIG__ -#ifdef __windows__ +#ifdef _MSDOS /* * Machine-type definitions: PC Clone 386 running Microloss Windows */ @@ -41,6 +41,7 @@ #define USE_STRING_H #define HAVE_SRAND +#define HAVE_ERRNO #ifndef _SIZE_T_DEFINED typedef unsigned int size_t; diff --git a/src/lib/des425/ChangeLog b/src/lib/des425/ChangeLog index e5a298ccf..a9439e803 100644 --- a/src/lib/des425/ChangeLog +++ b/src/lib/des425/ChangeLog @@ -1,3 +1,10 @@ +Tue Feb 21 17:42:44 1995 Keith Vetter (keithv@fusion.com) + + * Makefile.in: made to work on the PC + * *.c, des.h: added windows INTERFACE keyword + * read_passwd.c: renamed a static variable to avoid compiler error + * quad_cksum.c: errno extern declaration removed on the PC + Fri Feb 3 17:23:45 1995 Theodore Y. Ts'o (tytso@dcl) * pcbc_encrypt.c: Add SIZEOF_FOO checks to properly define diff --git a/src/lib/des425/Makefile.in b/src/lib/des425/Makefile.in index 650c8dded..517100049 100644 --- a/src/lib/des425/Makefile.in +++ b/src/lib/des425/Makefile.in @@ -1,20 +1,22 @@ CFLAGS = $(CCOPTS) $(DEFS) -I$(srcdir)/../crypto/des LDFLAGS = -g -all:: $(OBJS) +##DOSBUILDTOP = ..\.. +##DOSLIBNAME=libdes425.lib +##DOS!include $(BUILDTOP)\config\windows.in -OBJS= cksum.o \ - des.o \ - enc_dec.o \ - key_parity.o \ - key_sched.o \ - new_rnd_key.o \ - pcbc_encrypt.o \ - quad_cksum.o \ - random_key.o \ - read_passwd.o \ - str_to_key.o \ - weak_key.o +OBJS= cksum.$(OBJEXT) \ + des.$(OBJEXT) \ + enc_dec.$(OBJEXT) \ + key_parity.$(OBJEXT) \ + key_sched.$(OBJEXT) \ + new_rnd_key.$(OBJEXT) \ + pcbc_encrypt.$(OBJEXT) \ + quad_cksum.$(OBJEXT) \ + random_key.$(OBJEXT) \ + read_passwd.$(OBJEXT) \ + str_to_key.$(OBJEXT) \ + weak_key.$(OBJEXT) SRCS= $(srcdir)/cksum.c \ $(srcdir)/des.c \ @@ -33,16 +35,22 @@ SRCS= $(srcdir)/cksum.c \ EXT_LIB= libdes425.a $(TOPLIBD)/libcrypto.a DEPKLIB= $(TOPLIBD)/libcrypto.a +all:: $(OBJS) + verify: verify.o libdes425.a $(DEPKLIB) $(CC) -o $@ verify.o $(LDFLAGS) $(EXT_LIB) -check:: verify +check:: check-$(WHAT) + +check-unix:: verify ./verify -z ./verify -m ./verify +check-windows:: + clean:: - $(RM) verify + $(RM) verify$(EXEEXT) libdes425.a: $(OBJS) $(RM) $@ @@ -57,5 +65,5 @@ install:: libdes425.a $(RANLIB) $(DESTDIR)$(KRB5_LIBDIR)/libdes425.a clean:: - $(RM) libdes425.a + $(RM) libdes425.$(LIBEXT) libdes425.bak diff --git a/src/lib/des425/cksum.c b/src/lib/des425/cksum.c index 54baae270..519b4ac4c 100644 --- a/src/lib/des425/cksum.c +++ b/src/lib/des425/cksum.c @@ -53,7 +53,7 @@ * multiple of eight bytes. */ -void +void INTERFACE des_cbc_cksum(in,out,length,key,iv) krb5_octet *in; /* >= length bytes of inputtext */ krb5_octet *out; /* >= length bytes of outputtext */ diff --git a/src/lib/des425/des.c b/src/lib/des425/des.c index 2ab8dad26..93e07e65a 100644 --- a/src/lib/des425/des.c +++ b/src/lib/des425/des.c @@ -52,7 +52,7 @@ #include "des.h" #include -int +int INTERFACE des_ecb_encrypt(clear, cipher, schedule, encrypt) unsigned long *clear; unsigned long *cipher; diff --git a/src/lib/des425/des.h b/src/lib/des425/des.h index 4f27ece2b..7d4f61599 100644 --- a/src/lib/des425/des.h +++ b/src/lib/des425/des.h @@ -63,4 +63,25 @@ typedef struct des_ks_struct bit_64; #define des_cblock_print(x) des_cblock_print_file(x, stdout) +/* + * Windows needs everything prototyped because we're exporting all the fuctions. + */ +void INTERFACE des_cbc_cksum(); +int INTERFACE des_ecb_encrypt(); +int INTERFACE des_cbc_encrypt(); +void INTERFACE des_fixup_key_parity(); +int INTERFACE des_check_key_parity(); +int INTERFACE des_key_sched(); +int INTERFACE des_new_random_key(); +void INTERFACE des_init_random_number_generator(); +void INTERFACE des_set_random_generator_seed(); +void INTERFACE des_set_sequence_number(); +void INTERFACE des_generate_random_block(); +int INTERFACE des_pcbc_encrypt(); +unsigned long INTERFACE des_quad_cksum(); +int INTERFACE des_random_key(); +int INTERFACE des_read_password(); +int INTERFACE des_string_to_key(); +int INTERFACE des_is_weak_key(); + #endif /* DES_DEFS */ diff --git a/src/lib/des425/enc_dec.c b/src/lib/des425/enc_dec.c index 65c3738bb..a221a3483 100644 --- a/src/lib/des425/enc_dec.c +++ b/src/lib/des425/enc_dec.c @@ -58,7 +58,7 @@ * cleartext. */ -int +int INTERFACE des_cbc_encrypt(in,out,length,key,iv,encrypt) krb5_octet *in; /* >= length bytes of input text */ krb5_octet *out; /* >= length bytes of output text */ diff --git a/src/lib/des425/key_parity.c b/src/lib/des425/key_parity.c index 4bb593425..910c099d3 100644 --- a/src/lib/des425/key_parity.c +++ b/src/lib/des425/key_parity.c @@ -39,7 +39,7 @@ * 8,16,...64 in des order, implies 0, 8, 16, ... * vax order. */ -void +void INTERFACE des_fixup_key_parity(key) register mit_des_cblock key; { @@ -51,7 +51,7 @@ des_fixup_key_parity(key) * See des_fix_key_parity for the definition of * correct des parity. */ -int +int INTERFACE des_check_key_parity(key) register mit_des_cblock key; { diff --git a/src/lib/des425/key_sched.c b/src/lib/des425/key_sched.c index f30ef01ed..c801f1344 100644 --- a/src/lib/des425/key_sched.c +++ b/src/lib/des425/key_sched.c @@ -53,7 +53,7 @@ typedef char key[64]; /* the following are really void but cc86 doesnt allow it */ static void make_key_sched PROTOTYPE((key, mit_des_key_schedule)); -int +int INTERFACE des_key_sched(k,schedule) register mit_des_cblock k; /* r11 */ mit_des_key_schedule schedule; diff --git a/src/lib/des425/new_rnd_key.c b/src/lib/des425/new_rnd_key.c index f6a442042..3ade2ce13 100644 --- a/src/lib/des425/new_rnd_key.c +++ b/src/lib/des425/new_rnd_key.c @@ -26,18 +26,16 @@ #include "des.h" -extern void mit_des_fixup_key_parity(); -extern int mit_des_is_weak_key(); -extern int mit_des_init_random_number_generator(); -extern void mit_des_set_random_generator_seed(); -extern void mit_des_set_sequence_number(); -extern void mit_des_generate_random_block(); -extern int mit_des_new_random_key(); -extern void mit_des_generate_random_block(); +extern int INTERFACE mit_des_init_random_number_generator(); +extern void INTERFACE mit_des_set_random_generator_seed(); +extern void INTERFACE mit_des_set_sequence_number(); +extern void INTERFACE mit_des_generate_random_block(); +extern int INTERFACE mit_des_new_random_key(); -void des_set_random_generator_seed(), des_set_sequence_number(); -void des_generate_random_block(); +void INTERFACE des_set_random_generator_seed(); +void INTERFACE des_set_sequence_number(); +void INTERFACE des_generate_random_block(); /* * The secret des key schedule and sequence number for the current @@ -55,7 +53,7 @@ static mit_des_random_key_seed random_sequence_state; * to be a weak des key. Des_generate_random_block is used to * provide the random bits. */ -int +int INTERFACE des_new_random_key(key) mit_des_cblock key; { @@ -76,7 +74,8 @@ des_new_random_key(key) * * Note: this routine calls des_set_random_generator_seed. */ -void des_init_random_number_generator(key) +void INTERFACE +des_init_random_number_generator(key) mit_des_cblock key; { mit_des_init_random_number_generator(key, &random_sequence_state); @@ -99,7 +98,7 @@ void des_init_random_number_generator(key) * Requires: key is a valid des key. I.e., has correct parity and is not a * weak des key. */ -void +void INTERFACE des_set_random_generator_seed(key) mit_des_cblock key; { @@ -115,7 +114,7 @@ des_set_random_generator_seed(key) * * Note that des_set_random_generator_seed resets the sequence number to 0. */ -void +void INTERFACE des_set_sequence_number(new_sequence_number) mit_des_cblock new_sequence_number; { @@ -130,7 +129,8 @@ des_set_sequence_number(new_sequence_number) * Requires: des_set_random_generator_seed must have been called at least once * before this routine is called. */ -void des_generate_random_block(block) +void INTERFACE +des_generate_random_block(block) mit_des_cblock block; { mit_des_generate_random_block(block, &random_sequence_state); diff --git a/src/lib/des425/pcbc_encrypt.c b/src/lib/des425/pcbc_encrypt.c index f0793355b..06258cf8b 100644 --- a/src/lib/des425/pcbc_encrypt.c +++ b/src/lib/des425/pcbc_encrypt.c @@ -18,7 +18,8 @@ /* * copy of include/des.h to avoid collision with local one */ -#include +#include +#include #include #ifndef KRB_INT32 @@ -71,7 +72,7 @@ typedef struct des_ks_struct bit_64; /* * des_pcbc_encrypt - {en,de}crypt a stream in PCBC mode */ -int +int INTERFACE des_pcbc_encrypt(in, out, length, schedule, ivec, encrypt) des_cblock *in; des_cblock *out; diff --git a/src/lib/des425/quad_cksum.c b/src/lib/des425/quad_cksum.c index b27b5424e..0a9628b48 100644 --- a/src/lib/des425/quad_cksum.c +++ b/src/lib/des425/quad_cksum.c @@ -100,12 +100,14 @@ /* Externals */ extern char *errmsg(); +#ifndef HAVE_ERRNO extern int errno; +#endif extern int des_debug; /*** Routines ***************************************************** */ -unsigned long +unsigned long INTERFACE des_quad_cksum(in,out,length,out_count,c_seed) mit_des_cblock *c_seed; /* secret seed, 8 bytes */ unsigned char *in; /* input block */ diff --git a/src/lib/des425/random_key.c b/src/lib/des425/random_key.c index d4f1f187b..498f8848d 100644 --- a/src/lib/des425/random_key.c +++ b/src/lib/des425/random_key.c @@ -27,7 +27,7 @@ #include "des.h" /* random_key */ -int +int INTERFACE des_random_key(key) mit_des_cblock *key; { diff --git a/src/lib/des425/read_passwd.c b/src/lib/des425/read_passwd.c index 533165061..d6f0c78fc 100644 --- a/src/lib/des425/read_passwd.c +++ b/src/lib/des425/read_passwd.c @@ -33,10 +33,10 @@ #include "des.h" -static krb5_context global_context = 0; +static krb5_context krb4_global_context = 0; /*** Routines ****************************************************** */ -int +int INTERFACE des_read_password/*_v4_compat_crock*/(k,prompt,verify) mit_des_cblock *k; char *prompt; @@ -48,8 +48,8 @@ des_read_password/*_v4_compat_crock*/(k,prompt,verify) char prompt2[BUFSIZ]; int string_size = sizeof(key_string); - if (!global_context) { - retval = krb5_init_context(&global_context); + if (!krb4_global_context) { + retval = krb5_init_context(&krb4_global_context); if (retval) return retval; } @@ -58,7 +58,7 @@ des_read_password/*_v4_compat_crock*/(k,prompt,verify) strcpy(prompt2, "Verifying, please re-enter "); strncat(prompt2, prompt, sizeof(prompt2)-(strlen(prompt2)+1)); } - ok = krb5_read_password(global_context, prompt, verify ? prompt2 : 0, + ok = krb5_read_password(krb4_global_context, prompt, verify ? prompt2 : 0, key_string, &string_size); if (ok == 0) diff --git a/src/lib/des425/str_to_key.c b/src/lib/des425/str_to_key.c index 5a8d6de6f..4330e44cd 100644 --- a/src/lib/des425/str_to_key.c +++ b/src/lib/des425/str_to_key.c @@ -44,13 +44,11 @@ /* #include "des_internal.h" */ extern int mit_des_debug; -extern int mit_des_debug_print(); -extern void mit_des_fixup_key_parity(); /* * convert an arbitrary length string to a DES key */ -int +int INTERFACE des_string_to_key(str,key) char *str; register mit_des_cblock *key; @@ -64,7 +62,7 @@ des_string_to_key(str,key) register char *p_char; static char k_char[64]; static mit_des_key_schedule key_sked; - extern unsigned long des_cbc_cksum(); + extern void INTERFACE des_cbc_cksum(); in_str = str; forward = 1; diff --git a/src/lib/des425/weak_key.c b/src/lib/des425/weak_key.c index 1e481525f..14f67eabd 100644 --- a/src/lib/des425/weak_key.c +++ b/src/lib/des425/weak_key.c @@ -38,7 +38,7 @@ * * Requires: key has correct odd parity. */ -int +int INTERFACE des_is_weak_key(key) mit_des_cblock key; { diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog index ccbbdeb80..04fd06e4d 100644 --- a/src/lib/krb5/asn.1/ChangeLog +++ b/src/lib/krb5/asn.1/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 21 12:00:00 1995 Keith Vetter (keithv@fusion.com) + + * Makefile.in: made to work for the PC + * *.c, *.h: added windows INTERFACE keyword to all functions + Tue Feb 21 20:11:30 1995 Theodore Y. Ts'o (tytso@dcl) * asn1_k_decode.h(asn1_decode_kvno, asn1_decode_krb_safe_body): diff --git a/src/lib/krb5/asn.1/Makefile.in b/src/lib/krb5/asn.1/Makefile.in index c2e807c05..71db34d22 100644 --- a/src/lib/krb5/asn.1/Makefile.in +++ b/src/lib/krb5/asn.1/Makefile.in @@ -8,6 +8,9 @@ LDFLAGS = -g RM = rm -f CP = cp +##DOSBUILDTOP = ..\..\.. +##DOSLIBNAME=..\libkrb5.lib +##DOS!include $(BUILDTOP)\config\windows.in PEPSY = @PEPSY@ PSYFLAGS = @PSYFLAGS@ @@ -16,8 +19,6 @@ KRB5ROOT = @KRB5ROOT@ KRB5_INCDIR = $(KRB5ROOT)/include -all:: $(OBJS) - SRCTOP=$(srcdir)/$(BUILDTOP) EHDRDIR=$(BUILDTOP)/include/krb5/asn.1 @@ -35,17 +36,23 @@ SRCS= \ $(srcdir)asn1_misc.c OBJS= \ - asn1_decode.o\ - asn1_k_decode.o\ - asn1_encode.o\ - asn1_get.o\ - asn1_make.o\ - asn1buf.o\ - krb5_decode.o\ - krb5_encode.o\ - asn1_k_encode.o\ - asn1_misc.o - -clean:: + asn1_decode.$(OBJEXT)\ + asn1_k_decode.$(OBJEXT)\ + asn1_encode.$(OBJEXT)\ + asn1_get.$(OBJEXT)\ + asn1_make.$(OBJEXT)\ + asn1buf.$(OBJEXT)\ + krb5_decode.$(OBJEXT)\ + krb5_encode.$(OBJEXT)\ + asn1_k_encode.$(OBJEXT)\ + asn1_misc.$(OBJEXT) + +all:: $(OBJS) + +clean:: clean-$(WHAT) + +clean-unix:: $(RM) $(OBJS) +clean-windows:: + $(RM) *.obj diff --git a/src/lib/krb5/asn.1/asn1_decode.c b/src/lib/krb5/asn.1/asn1_decode.c index 823f4cd53..7b033d200 100644 --- a/src/lib/krb5/asn.1/asn1_decode.c +++ b/src/lib/krb5/asn.1/asn1_decode.c @@ -50,7 +50,7 @@ if(class != UNIVERSAL || construction != PRIMITIVE || tagnum != type)\ #define cleanup()\ return 0 -asn1_error_code asn1_decode_integer(buf, val) +asn1_error_code INTERFACE asn1_decode_integer(buf, val) asn1buf * buf; long * val; { @@ -69,7 +69,7 @@ asn1_error_code asn1_decode_integer(buf, val) cleanup(); } -asn1_error_code asn1_decode_unsigned_integer(buf, val) +asn1_error_code INTERFACE asn1_decode_unsigned_integer(buf, val) asn1buf * buf; unsigned long * val; { @@ -88,7 +88,7 @@ asn1_error_code asn1_decode_unsigned_integer(buf, val) cleanup(); } -asn1_error_code asn1_decode_octetstring(buf, retlen, val) +asn1_error_code INTERFACE asn1_decode_octetstring(buf, retlen, val) asn1buf * buf; int * retlen; asn1_octet ** val; @@ -101,7 +101,7 @@ asn1_error_code asn1_decode_octetstring(buf, retlen, val) cleanup(); } -asn1_error_code asn1_decode_charstring(buf, retlen, val) +asn1_error_code INTERFACE asn1_decode_charstring(buf, retlen, val) asn1buf * buf; int * retlen; char ** val; @@ -115,7 +115,7 @@ asn1_error_code asn1_decode_charstring(buf, retlen, val) } -asn1_error_code asn1_decode_generalstring(buf, retlen, val) +asn1_error_code INTERFACE asn1_decode_generalstring(buf, retlen, val) asn1buf * buf; int * retlen; char ** val; @@ -129,7 +129,7 @@ asn1_error_code asn1_decode_generalstring(buf, retlen, val) } -asn1_error_code asn1_decode_null(buf) +asn1_error_code INTERFACE asn1_decode_null(buf) asn1buf * buf; { setup(); @@ -138,7 +138,7 @@ asn1_error_code asn1_decode_null(buf) cleanup(); } -asn1_error_code asn1_decode_printablestring(buf, retlen, val) +asn1_error_code INTERFACE asn1_decode_printablestring(buf, retlen, val) asn1buf * buf; int * retlen; char ** val; @@ -151,7 +151,7 @@ asn1_error_code asn1_decode_printablestring(buf, retlen, val) cleanup(); } -asn1_error_code asn1_decode_ia5string(buf, retlen, val) +asn1_error_code INTERFACE asn1_decode_ia5string(buf, retlen, val) asn1buf * buf; int * retlen; char ** val; @@ -164,7 +164,7 @@ asn1_error_code asn1_decode_ia5string(buf, retlen, val) cleanup(); } -asn1_error_code asn1_decode_generaltime(buf, val) +asn1_error_code INTERFACE asn1_decode_generaltime(buf, val) asn1buf * buf; time_t * val; { diff --git a/src/lib/krb5/asn.1/asn1_decode.h b/src/lib/krb5/asn.1/asn1_decode.h index c5b9b5308..d1bb85b3e 100644 --- a/src/lib/krb5/asn.1/asn1_decode.h +++ b/src/lib/krb5/asn.1/asn1_decode.h @@ -55,18 +55,18 @@ Returns ENOMEM if memory is exhausted. Returns asn1 errors. */ -asn1_error_code asn1_decode_integer +asn1_error_code INTERFACE asn1_decode_integer PROTOTYPE((asn1buf *buf, long *val)); -asn1_error_code asn1_decode_unsigned_integer +asn1_error_code INTERFACE asn1_decode_unsigned_integer PROTOTYPE((asn1buf *buf, unsigned long *val)); -asn1_error_code asn1_decode_null +asn1_error_code INTERFACE asn1_decode_null PROTOTYPE((asn1buf *buf)); -asn1_error_code asn1_decode_octetstring +asn1_error_code INTERFACE asn1_decode_octetstring PROTOTYPE((asn1buf *buf, int *retlen, asn1_octet **val)); -asn1_error_code asn1_decode_generalstring +asn1_error_code INTERFACE asn1_decode_generalstring PROTOTYPE((asn1buf *buf, int *retlen, char **val)); -asn1_error_code asn1_decode_charstring +asn1_error_code INTERFACE asn1_decode_charstring PROTOTYPE((asn1buf *buf, int *retlen, char **val)); /* Note: A charstring is a special hack to account for the fact that krb5 structures store some OCTET STRING values in krb5_octet @@ -74,12 +74,12 @@ asn1_error_code asn1_decode_charstring PROTOTYPE((which use char arrays). From the ASN.1 point of view, the two string types are the same, only the receptacles differ. */ -asn1_error_code asn1_decode_printablestring +asn1_error_code INTERFACE asn1_decode_printablestring PROTOTYPE((asn1buf *buf, int *retlen, char **val)); -asn1_error_code asn1_decode_ia5string +asn1_error_code INTERFACE asn1_decode_ia5string PROTOTYPE((asn1buf *buf, int *retlen, char **val)); -asn1_error_code asn1_decode_generaltime +asn1_error_code INTERFACE asn1_decode_generaltime PROTOTYPE((asn1buf *buf, time_t *val)); #endif diff --git a/src/lib/krb5/asn.1/asn1_encode.c b/src/lib/krb5/asn.1/asn1_encode.c index c03625e8c..c620d9f2d 100644 --- a/src/lib/krb5/asn.1/asn1_encode.c +++ b/src/lib/krb5/asn.1/asn1_encode.c @@ -26,7 +26,7 @@ #include "asn1_encode.h" #include "asn1_make.h" -asn1_error_code asn1_encode_integer(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_integer(buf, val, retlen) asn1buf * buf; const long val; int * retlen; @@ -39,7 +39,7 @@ asn1_error_code asn1_encode_integer(buf, val, retlen) valcopy = val; do { digit = valcopy&0xFF; - retval = asn1buf_insert_octet(buf,digit); + retval = asn1buf_insert_octet(buf,(asn1_octet) digit); if(retval) return retval; length++; valcopy = valcopy >> 8; @@ -63,7 +63,7 @@ asn1_error_code asn1_encode_integer(buf, val, retlen) return 0; } -asn1_error_code asn1_encode_unsigned_integer(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_unsigned_integer(buf, val, retlen) asn1buf * buf; const unsigned long val; int * retlen; @@ -76,7 +76,7 @@ asn1_error_code asn1_encode_unsigned_integer(buf, val, retlen) valcopy = val; do { digit = valcopy&0xFF; - retval = asn1buf_insert_octet(buf,digit); + retval = asn1buf_insert_octet(buf,(asn1_octet) digit); if(retval) return retval; length++; valcopy = valcopy >> 8; @@ -96,7 +96,7 @@ asn1_error_code asn1_encode_unsigned_integer(buf, val, retlen) return 0; } -asn1_error_code asn1_encode_octetstring(buf, len, val, retlen) +asn1_error_code INTERFACE asn1_encode_octetstring(buf, len, val, retlen) asn1buf * buf; const int len; const asn1_octet * val; @@ -114,7 +114,7 @@ asn1_error_code asn1_encode_octetstring(buf, len, val, retlen) return 0; } -asn1_error_code asn1_encode_charstring(buf, len, val, retlen) +asn1_error_code INTERFACE asn1_encode_charstring(buf, len, val, retlen) asn1buf * buf; const int len; const char * val; @@ -132,7 +132,7 @@ asn1_error_code asn1_encode_charstring(buf, len, val, retlen) return 0; } -asn1_encode_null(buf, retlen) +asn1_error_code INTERFACE asn1_encode_null(buf, retlen) asn1buf * buf; int * retlen; { @@ -147,7 +147,7 @@ asn1_encode_null(buf, retlen) return 0; } -asn1_error_code asn1_encode_printablestring(buf, len, val, retlen) +asn1_error_code INTERFACE asn1_encode_printablestring(buf, len, val, retlen) asn1buf * buf; const int len; const char * val; @@ -165,7 +165,7 @@ asn1_error_code asn1_encode_printablestring(buf, len, val, retlen) return 0; } -asn1_error_code asn1_encode_ia5string(buf, len, val, retlen) +asn1_error_code INTERFACE asn1_encode_ia5string(buf, len, val, retlen) asn1buf * buf; const int len; const char * val; @@ -183,7 +183,7 @@ asn1_error_code asn1_encode_ia5string(buf, len, val, retlen) return 0; } -asn1_error_code asn1_encode_generaltime(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_generaltime(buf, val, retlen) asn1buf * buf; const time_t val; int * retlen; @@ -210,7 +210,7 @@ asn1_error_code asn1_encode_generaltime(buf, val, retlen) return 0; } -asn1_error_code asn1_encode_generalstring(buf, len, val, retlen) +asn1_error_code INTERFACE asn1_encode_generalstring(buf, len, val, retlen) asn1buf * buf; const int len; const char * val; diff --git a/src/lib/krb5/asn.1/asn1_encode.h b/src/lib/krb5/asn.1/asn1_encode.h index 62d61dc3d..7da6a729f 100644 --- a/src/lib/krb5/asn.1/asn1_encode.h +++ b/src/lib/krb5/asn.1/asn1_encode.h @@ -46,7 +46,7 @@ asn1_encode_generalstring */ -asn1_error_code asn1_encode_integer +asn1_error_code INTERFACE asn1_encode_integer PROTOTYPE((asn1buf *buf, const long val, int *retlen)); /* requires *buf is allocated modifies *buf, *retlen @@ -55,7 +55,7 @@ asn1_error_code asn1_encode_integer Returns ENOMEM to signal an unsuccesful attempt to expand the buffer. */ -asn1_error_code asn1_encode_unsigned_integer +asn1_error_code INTERFACE asn1_encode_unsigned_integer PROTOTYPE((asn1buf *buf, const unsigned long val, int *retlen)); /* requires *buf is allocated modifies *buf, *retlen @@ -64,7 +64,7 @@ asn1_error_code asn1_encode_unsigned_integer Returns ENOMEM to signal an unsuccesful attempt to expand the buffer. */ -asn1_error_code asn1_encode_octetstring +asn1_error_code INTERFACE asn1_encode_octetstring PROTOTYPE((asn1buf *buf, const int len, const asn1_octet *val, int *retlen)); @@ -75,7 +75,7 @@ asn1_error_code asn1_encode_octetstring Returns ENOMEM to signal an unsuccesful attempt to expand the buffer. */ -asn1_error_code asn1_encode_charstring +asn1_error_code INTERFACE asn1_encode_charstring PROTOTYPE((asn1buf *buf, const int len, const char *val, int *retlen)); @@ -86,7 +86,7 @@ asn1_error_code asn1_encode_charstring Returns ENOMEM to signal an unsuccesful attempt to expand the buffer. */ -asn1_error_code asn1_encode_null +asn1_error_code INTERFACE asn1_encode_null PROTOTYPE((asn1buf *buf, int *retlen)); /* requires *buf is allocated modifies *buf, *retlen @@ -95,7 +95,7 @@ asn1_error_code asn1_encode_null Returns ENOMEM to signal an unsuccesful attempt to expand the buffer. */ -asn1_error_code asn1_encode_printablestring +asn1_error_code INTERFACE asn1_encode_printablestring PROTOTYPE((asn1buf *buf, const int len, const char *val, int *retlen)); @@ -106,7 +106,7 @@ asn1_error_code asn1_encode_printablestring Returns ENOMEM to signal an unsuccesful attempt to expand the buffer. */ -asn1_error_code asn1_encode_ia5string +asn1_error_code INTERFACE asn1_encode_ia5string PROTOTYPE((asn1buf *buf, const int len, const char *val, int *retlen)); @@ -117,7 +117,7 @@ asn1_error_code asn1_encode_ia5string Returns ENOMEM to signal an unsuccesful attempt to expand the buffer. */ -asn1_error_code asn1_encode_generaltime +asn1_error_code INTERFACE asn1_encode_generaltime PROTOTYPE((asn1buf *buf, const time_t val, int *retlen)); /* requires *buf is allocated modifies *buf, *retlen @@ -127,7 +127,7 @@ asn1_error_code asn1_encode_generaltime to expand the buffer. Note: The encoding of GeneralizedTime is YYYYMMDDhhmmZ */ -asn1_error_code asn1_encode_generalstring +asn1_error_code INTERFACE asn1_encode_generalstring PROTOTYPE((asn1buf *buf, const int len, const char *val, int *retlen)); diff --git a/src/lib/krb5/asn.1/asn1_get.c b/src/lib/krb5/asn.1/asn1_get.c index 12935e762..730d679e0 100644 --- a/src/lib/krb5/asn.1/asn1_get.c +++ b/src/lib/krb5/asn.1/asn1_get.c @@ -23,7 +23,7 @@ #include "asn1_get.h" -asn1_error_code asn1_get_tag(buf, class, construction, tagnum, retlen) +asn1_error_code INTERFACE asn1_get_tag(buf, class, construction, tagnum, retlen) asn1buf * buf; asn1_class * class; asn1_construction * construction; @@ -43,7 +43,7 @@ asn1_error_code asn1_get_tag(buf, class, construction, tagnum, retlen) return 0; } -asn1_error_code asn1_get_sequence(buf, retlen) +asn1_error_code INTERFACE asn1_get_sequence(buf, retlen) asn1buf * buf; int * retlen; { @@ -63,7 +63,7 @@ asn1_error_code asn1_get_sequence(buf, retlen) /****************************************************************/ /* Private Procedures */ -asn1_error_code asn1_get_id(buf, class, construction, tagnum) +asn1_error_code INTERFACE asn1_get_id(buf, class, construction, tagnum) asn1buf * buf; asn1_class * class; asn1_construction * construction; @@ -99,7 +99,7 @@ asn1_error_code asn1_get_id(buf, class, construction, tagnum) return 0; } -asn1_error_code asn1_get_length(buf, retlen) +asn1_error_code INTERFACE asn1_get_length(buf, retlen) asn1buf * buf; int * retlen; { diff --git a/src/lib/krb5/asn.1/asn1_get.h b/src/lib/krb5/asn.1/asn1_get.h index af3df7c8c..3e77c4a1a 100644 --- a/src/lib/krb5/asn.1/asn1_get.h +++ b/src/lib/krb5/asn.1/asn1_get.h @@ -30,7 +30,7 @@ #include "krbasn1.h" #include "asn1buf.h" -asn1_error_code asn1_get_tag +asn1_error_code INTERFACE asn1_get_tag PROTOTYPE((asn1buf *buf, asn1_class *class, asn1_construction *construction, @@ -45,7 +45,7 @@ asn1_error_code asn1_get_tag *tagnum is set to ASN1_TAGNUM_CEILING. Returns ASN1_OVERRUN if *buf is exhausted during the parse. */ -asn1_error_code asn1_get_sequence +asn1_error_code INTERFACE asn1_get_sequence PROTOTYPE((asn1buf *buf, int *retlen)); /* requires *buf is allocated effects Decodes a tag from *buf and returns ASN1_BAD_ID if it @@ -55,7 +55,7 @@ asn1_error_code asn1_get_sequence /****************************************************************/ /* Private Procedures */ -asn1_error_code asn1_get_id +asn1_error_code INTERFACE asn1_get_id PROTOTYPE((asn1buf *buf, asn1_class *class, asn1_construction *construction, @@ -67,7 +67,7 @@ asn1_error_code asn1_get_id are returned in *construction and *tagnum, respectively. Returns ASN1_OVERRUN if *buf is exhausted. */ -asn1_error_code asn1_get_length +asn1_error_code INTERFACE asn1_get_length PROTOTYPE((asn1buf *buf, int *retlen)); /* requires *buf is allocated effects Decodes the group of length octets at *buf's diff --git a/src/lib/krb5/asn.1/asn1_k_decode.c b/src/lib/krb5/asn.1/asn1_k_decode.c index 8ff4002d5..240489891 100644 --- a/src/lib/krb5/asn.1/asn1_k_decode.c +++ b/src/lib/krb5/asn.1/asn1_k_decode.c @@ -110,7 +110,7 @@ return 0 /* scalars */ -asn1_error_code asn1_decode_kerberos_time(buf, val) +asn1_error_code INTERFACE asn1_decode_kerberos_time(buf, val) asn1buf * buf; krb5_timestamp * val; { @@ -126,7 +126,7 @@ asn1_error_code asn1_decode_kerberos_time(buf, val) } #define integer_convert(fname,ktype)\ -asn1_error_code fname(buf, val)\ +asn1_error_code INTERFACE fname(buf, val)\ asn1buf * buf;\ ktype * val;\ {\ @@ -138,7 +138,7 @@ asn1_error_code fname(buf, val)\ return 0;\ } #define unsigned_integer_convert(fname,ktype)\ -asn1_error_code fname(buf, val)\ +asn1_error_code INTERFACE fname(buf, val)\ asn1buf * buf;\ ktype * val;\ {\ @@ -161,7 +161,7 @@ integer_convert(asn1_decode_authdatatype,krb5_authdatatype) 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) +asn1_error_code INTERFACE asn1_decode_msgtype(buf, val) asn1buf * buf; krb5_msgtype * val; { @@ -177,7 +177,7 @@ asn1_error_code asn1_decode_msgtype(buf, val) /* structures */ -asn1_error_code asn1_decode_realm(buf, val) +asn1_error_code INTERFACE asn1_decode_realm(buf, val) asn1buf * buf; krb5_principal * val; { @@ -186,7 +186,7 @@ asn1_error_code asn1_decode_realm(buf, val) &((*val)->realm.data)); } -asn1_error_code asn1_decode_principal_name(buf, val) +asn1_error_code INTERFACE asn1_decode_principal_name(buf, val) asn1buf * buf; krb5_principal * val; { @@ -217,7 +217,7 @@ asn1_error_code asn1_decode_principal_name(buf, val) cleanup(); } -asn1_error_code asn1_decode_checksum(buf, val) +asn1_error_code INTERFACE asn1_decode_checksum(buf, val) asn1buf * buf; krb5_checksum * val; { @@ -231,7 +231,7 @@ asn1_error_code asn1_decode_checksum(buf, val) cleanup(); } -asn1_error_code asn1_decode_encryption_key(buf, val) +asn1_error_code INTERFACE asn1_decode_encryption_key(buf, val) asn1buf * buf; krb5_keyblock * val; { @@ -246,7 +246,7 @@ asn1_error_code asn1_decode_encryption_key(buf, val) cleanup(); } -asn1_error_code asn1_decode_encrypted_data(buf, val) +asn1_error_code INTERFACE asn1_decode_encrypted_data(buf, val) asn1buf * buf; krb5_enc_data * val; { @@ -261,7 +261,7 @@ asn1_error_code asn1_decode_encrypted_data(buf, val) cleanup(); } -asn1_error_code asn1_decode_krb5_flags(buf, val) +asn1_error_code INTERFACE asn1_decode_krb5_flags(buf, val) asn1buf * buf; krb5_flags * val; { @@ -289,22 +289,22 @@ asn1_error_code asn1_decode_krb5_flags(buf, val) return 0; } -asn1_error_code asn1_decode_ticket_flags(buf, val) +asn1_error_code INTERFACE 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(buf, val) +asn1_error_code INTERFACE 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(buf, val) +asn1_error_code INTERFACE 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(buf, val) +asn1_error_code INTERFACE asn1_decode_transited_encoding(buf, val) asn1buf * buf; krb5_transited * val; { @@ -318,7 +318,7 @@ asn1_error_code asn1_decode_transited_encoding(buf, val) cleanup(); } -asn1_error_code asn1_decode_enc_kdc_rep_part(buf, val) +asn1_error_code INTERFACE asn1_decode_enc_kdc_rep_part(buf, val) asn1buf * buf; krb5_enc_kdc_rep_part * val; { @@ -344,7 +344,7 @@ asn1_error_code asn1_decode_enc_kdc_rep_part(buf, val) cleanup(); } -asn1_error_code asn1_decode_ticket(buf, val) +asn1_error_code INTERFACE asn1_decode_ticket(buf, val) asn1buf * buf; krb5_ticket * val; { @@ -364,7 +364,7 @@ asn1_error_code asn1_decode_ticket(buf, val) cleanup(); } -asn1_error_code asn1_decode_kdc_req(buf, val) +asn1_error_code INTERFACE asn1_decode_kdc_req(buf, val) asn1buf * buf; krb5_kdc_req * val; { @@ -382,7 +382,7 @@ asn1_error_code asn1_decode_kdc_req(buf, val) cleanup(); } -asn1_error_code asn1_decode_kdc_req_body(buf, val) +asn1_error_code INTERFACE asn1_decode_kdc_req_body(buf, val) asn1buf * buf; krb5_kdc_req * val; { @@ -419,7 +419,7 @@ asn1_error_code asn1_decode_kdc_req_body(buf, val) cleanup(); } -asn1_error_code asn1_decode_krb_safe_body(buf, val) +asn1_error_code INTERFACE asn1_decode_krb_safe_body(buf, val) asn1buf * buf; krb5_safe * val; { @@ -441,7 +441,7 @@ asn1_error_code asn1_decode_krb_safe_body(buf, val) cleanup(); } -asn1_error_code asn1_decode_host_address(buf, val) +asn1_error_code INTERFACE asn1_decode_host_address(buf, val) asn1buf * buf; krb5_address * val; { @@ -455,7 +455,7 @@ asn1_error_code asn1_decode_host_address(buf, val) cleanup(); } -asn1_error_code asn1_decode_kdc_rep(buf, val) +asn1_error_code INTERFACE asn1_decode_kdc_rep(buf, val) asn1buf * buf; krb5_kdc_rep * val; { @@ -510,14 +510,14 @@ if(*(array) == NULL) return ENOMEM;\ cleanup() -asn1_error_code asn1_decode_authorization_data(buf, val) +asn1_error_code INTERFACE 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(buf, val) +asn1_error_code INTERFACE asn1_decode_authdata_elt(buf, val) asn1buf * buf; krb5_authdata * val; { @@ -531,28 +531,28 @@ asn1_error_code asn1_decode_authdata_elt(buf, val) cleanup(); } -asn1_error_code asn1_decode_host_addresses(buf, val) +asn1_error_code INTERFACE 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(buf, val) +asn1_error_code INTERFACE 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(buf, val) +asn1_error_code INTERFACE 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(buf, val) +asn1_error_code INTERFACE asn1_decode_krb_cred_info(buf, val) asn1buf * buf; krb5_cred_info * val; { @@ -580,14 +580,14 @@ asn1_error_code asn1_decode_krb_cred_info(buf, val) cleanup(); } -asn1_error_code asn1_decode_sequence_of_pa_data(buf, val) +asn1_error_code INTERFACE 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(buf, val) +asn1_error_code INTERFACE asn1_decode_pa_data(buf, val) asn1buf * buf; krb5_pa_data * val; { @@ -601,14 +601,14 @@ asn1_error_code asn1_decode_pa_data(buf, val) cleanup(); } -asn1_error_code asn1_decode_last_req(buf, val) +asn1_error_code INTERFACE 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(buf, val) +asn1_error_code INTERFACE asn1_decode_last_req_entry(buf, val) asn1buf * buf; krb5_last_req_entry * val; { @@ -622,7 +622,7 @@ asn1_error_code asn1_decode_last_req_entry(buf, val) cleanup(); } -asn1_error_code asn1_decode_sequence_of_enctype(buf, num, val) +asn1_error_code INTERFACE asn1_decode_sequence_of_enctype(buf, num, val) asn1buf * buf; int * num; krb5_enctype ** val; @@ -645,7 +645,7 @@ asn1_error_code asn1_decode_sequence_of_enctype(buf, num, val) cleanup(); } -asn1_error_code asn1_decode_passwdsequence(buf, val) +asn1_error_code INTERFACE asn1_decode_passwdsequence(buf, val) asn1buf * buf; passwd_phrase_element * val; { @@ -662,7 +662,7 @@ asn1_error_code asn1_decode_passwdsequence(buf, val) cleanup(); } -asn1_error_code asn1_decode_sequence_of_passwdsequence(buf, val) +asn1_error_code INTERFACE asn1_decode_sequence_of_passwdsequence(buf, val) asn1buf * buf; passwd_phrase_element *** val; { diff --git a/src/lib/krb5/asn.1/asn1_k_decode.h b/src/lib/krb5/asn.1/asn1_k_decode.h index d6f8ec9e0..1b827536a 100644 --- a/src/lib/krb5/asn.1/asn1_k_decode.h +++ b/src/lib/krb5/asn.1/asn1_k_decode.h @@ -64,98 +64,98 @@ the bounds of *buf */ /* scalars */ -asn1_error_code asn1_decode_int +asn1_error_code INTERFACE asn1_decode_int PROTOTYPE((asn1buf *buf, int *val)); -asn1_error_code asn1_decode_int32 +asn1_error_code INTERFACE asn1_decode_int32 PROTOTYPE((asn1buf *buf, krb5_int32 *val)); -asn1_error_code asn1_decode_kvno +asn1_error_code INTERFACE asn1_decode_kvno PROTOTYPE((asn1buf *buf, krb5_kvno *val)); -asn1_error_code asn1_decode_keytype +asn1_error_code INTERFACE asn1_decode_keytype PROTOTYPE((asn1buf *buf, krb5_keytype *val)); -asn1_error_code asn1_decode_msgtype +asn1_error_code INTERFACE asn1_decode_msgtype PROTOTYPE((asn1buf *buf, krb5_msgtype *val)); -asn1_error_code asn1_decode_cksumtype +asn1_error_code INTERFACE asn1_decode_cksumtype PROTOTYPE((asn1buf *buf, krb5_cksumtype *val)); -asn1_error_code asn1_decode_enctype +asn1_error_code INTERFACE asn1_decode_enctype PROTOTYPE((asn1buf *buf, krb5_enctype *val)); -asn1_error_code asn1_decode_octet +asn1_error_code INTERFACE asn1_decode_octet PROTOTYPE((asn1buf *buf, krb5_octet *val)); -asn1_error_code asn1_decode_addrtype +asn1_error_code INTERFACE asn1_decode_addrtype PROTOTYPE((asn1buf *buf, krb5_addrtype *val)); -asn1_error_code asn1_decode_authdatatype +asn1_error_code INTERFACE asn1_decode_authdatatype PROTOTYPE((asn1buf *buf, krb5_authdatatype *val)); -asn1_error_code asn1_decode_ui_2 +asn1_error_code INTERFACE asn1_decode_ui_2 PROTOTYPE((asn1buf *buf, krb5_ui_2 *val)); -asn1_error_code asn1_decode_ui_4 +asn1_error_code INTERFACE asn1_decode_ui_4 PROTOTYPE((asn1buf *buf, krb5_ui_4 *val)); -asn1_error_code asn1_decode_kerberos_time +asn1_error_code INTERFACE asn1_decode_kerberos_time PROTOTYPE((asn1buf *buf, krb5_timestamp *val)); /* structures */ -asn1_error_code asn1_decode_realm +asn1_error_code INTERFACE asn1_decode_realm PROTOTYPE((asn1buf *buf, krb5_principal *val)); -asn1_error_code asn1_decode_principal_name +asn1_error_code INTERFACE asn1_decode_principal_name PROTOTYPE((asn1buf *buf, krb5_principal *val)); -asn1_error_code asn1_decode_checksum +asn1_error_code INTERFACE asn1_decode_checksum PROTOTYPE((asn1buf *buf, krb5_checksum *val)); -asn1_error_code asn1_decode_encryption_key +asn1_error_code INTERFACE asn1_decode_encryption_key PROTOTYPE((asn1buf *buf, krb5_keyblock *val)); -asn1_error_code asn1_decode_encrypted_data +asn1_error_code INTERFACE asn1_decode_encrypted_data PROTOTYPE((asn1buf *buf, krb5_enc_data *val)); -asn1_error_code asn1_decode_ticket_flags +asn1_error_code INTERFACE asn1_decode_ticket_flags PROTOTYPE((asn1buf *buf, krb5_flags *val)); -asn1_error_code asn1_decode_transited_encoding +asn1_error_code INTERFACE asn1_decode_transited_encoding PROTOTYPE((asn1buf *buf, krb5_transited *val)); -asn1_error_code asn1_decode_enc_kdc_rep_part +asn1_error_code INTERFACE asn1_decode_enc_kdc_rep_part PROTOTYPE((asn1buf *buf, krb5_enc_kdc_rep_part *val)); -asn1_error_code asn1_decode_krb5_flags +asn1_error_code INTERFACE asn1_decode_krb5_flags PROTOTYPE((asn1buf *buf, krb5_flags *val)); -asn1_error_code asn1_decode_ap_options +asn1_error_code INTERFACE asn1_decode_ap_options PROTOTYPE((asn1buf *buf, krb5_flags *val)); -asn1_error_code asn1_decode_kdc_options +asn1_error_code INTERFACE asn1_decode_kdc_options PROTOTYPE((asn1buf *buf, krb5_flags *val)); -asn1_error_code asn1_decode_ticket +asn1_error_code INTERFACE asn1_decode_ticket PROTOTYPE((asn1buf *buf, krb5_ticket *val)); -asn1_error_code asn1_decode_kdc_req +asn1_error_code INTERFACE asn1_decode_kdc_req PROTOTYPE((asn1buf *buf, krb5_kdc_req *val)); -asn1_error_code asn1_decode_kdc_req_body +asn1_error_code INTERFACE asn1_decode_kdc_req_body PROTOTYPE((asn1buf *buf, krb5_kdc_req *val)); -asn1_error_code asn1_decode_krb_safe_body +asn1_error_code INTERFACE asn1_decode_krb_safe_body PROTOTYPE((asn1buf *buf, krb5_safe *val)); -asn1_error_code asn1_decode_host_address +asn1_error_code INTERFACE asn1_decode_host_address PROTOTYPE((asn1buf *buf, krb5_address *val)); -asn1_error_code asn1_decode_kdc_rep +asn1_error_code INTERFACE asn1_decode_kdc_rep PROTOTYPE((asn1buf *buf, krb5_kdc_rep *val)); -asn1_error_code asn1_decode_last_req_entry +asn1_error_code INTERFACE asn1_decode_last_req_entry PROTOTYPE((asn1buf *buf, krb5_last_req_entry *val)); -asn1_error_code asn1_decode_authdata_elt +asn1_error_code INTERFACE asn1_decode_authdata_elt PROTOTYPE((asn1buf *buf, krb5_authdata *val)); -asn1_error_code asn1_decode_krb_cred_info +asn1_error_code INTERFACE asn1_decode_krb_cred_info PROTOTYPE((asn1buf *buf, krb5_cred_info *val)); -asn1_error_code asn1_decode_pa_data +asn1_error_code INTERFACE asn1_decode_pa_data PROTOTYPE((asn1buf *buf, krb5_pa_data *val)); -asn1_error_code asn1_decode_passwdsequence +asn1_error_code INTERFACE asn1_decode_passwdsequence PROTOTYPE((asn1buf *buf, passwd_phrase_element *val)); /* arrays */ -asn1_error_code asn1_decode_authorization_data +asn1_error_code INTERFACE asn1_decode_authorization_data PROTOTYPE((asn1buf *buf, krb5_authdata ***val)); -asn1_error_code asn1_decode_host_addresses +asn1_error_code INTERFACE asn1_decode_host_addresses PROTOTYPE((asn1buf *buf, krb5_address ***val)); -asn1_error_code asn1_decode_sequence_of_ticket +asn1_error_code INTERFACE asn1_decode_sequence_of_ticket PROTOTYPE((asn1buf *buf, krb5_ticket ***val)); -asn1_error_code asn1_decode_sequence_of_krb_cred_info +asn1_error_code INTERFACE asn1_decode_sequence_of_krb_cred_info PROTOTYPE((asn1buf *buf, krb5_cred_info ***val)); -asn1_error_code asn1_decode_sequence_of_pa_data +asn1_error_code INTERFACE asn1_decode_sequence_of_pa_data PROTOTYPE((asn1buf *buf, krb5_pa_data ***val)); -asn1_error_code asn1_decode_last_req +asn1_error_code INTERFACE asn1_decode_last_req PROTOTYPE((asn1buf *buf, krb5_last_req_entry ***val)); -asn1_error_code asn1_decode_sequence_of_enctype +asn1_error_code INTERFACE asn1_decode_sequence_of_enctype PROTOTYPE((asn1buf *buf, int *num, krb5_enctype **val)); -asn1_error_code asn1_decode_sequence_of_passwdsequence +asn1_error_code INTERFACE asn1_decode_sequence_of_passwdsequence PROTOTYPE((asn1buf *buf, passwd_phrase_element ***val)); diff --git a/src/lib/krb5/asn.1/asn1_k_encode.c b/src/lib/krb5/asn.1/asn1_k_encode.c index 3114a79fc..2cde64463 100644 --- a/src/lib/krb5/asn.1/asn1_k_encode.c +++ b/src/lib/krb5/asn.1/asn1_k_encode.c @@ -120,16 +120,16 @@ *retlen = sum;\ return 0 -asn1_error_code asn1_encode_ui_4(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_ui_4(buf, val, retlen) asn1buf * buf; - const /*krb5_ui_4*/int val; + const krb5_ui_4 val; int *retlen; { return asn1_encode_unsigned_integer(buf,val,retlen); } -asn1_error_code asn1_encode_realm(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_realm(buf, val, retlen) asn1buf * buf; const krb5_principal val; int * retlen; @@ -139,7 +139,7 @@ asn1_error_code asn1_encode_realm(buf, val, retlen) retlen); } -asn1_error_code asn1_encode_principal_name(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_principal_name(buf, val, retlen) asn1buf * buf; const krb5_principal val; int * retlen; @@ -170,7 +170,7 @@ asn1_error_code asn1_encode_principal_name(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_kerberos_time(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_kerberos_time(buf, val, retlen) asn1buf * buf; const krb5_timestamp val; int * retlen; @@ -179,7 +179,7 @@ asn1_error_code asn1_encode_kerberos_time(buf, val, retlen) return asn1_encode_generaltime(buf,val,retlen); } -asn1_error_code asn1_encode_host_address(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_host_address(buf, val, retlen) asn1buf * buf; const krb5_address * val; int * retlen; @@ -195,7 +195,7 @@ asn1_error_code asn1_encode_host_address(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_host_addresses(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_host_addresses(buf, val, retlen) asn1buf * buf; const krb5_address ** val; int * retlen; @@ -216,7 +216,7 @@ asn1_error_code asn1_encode_host_addresses(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_encrypted_data(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_encrypted_data(buf, val, retlen) asn1buf * buf; const krb5_enc_data * val; int * retlen; @@ -235,7 +235,7 @@ asn1_error_code asn1_encode_encrypted_data(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_krb5_flags(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_krb5_flags(buf, val, retlen) asn1buf * buf; const krb5_flags val; int * retlen; @@ -245,7 +245,7 @@ asn1_error_code asn1_encode_krb5_flags(buf, val, retlen) int i; for(i=0; i<4; i++){ - retval = asn1buf_insert_octet(buf,valcopy&0xFF); + retval = asn1buf_insert_octet(buf,(asn1_octet) (valcopy&0xFF)); if(retval) return retval; valcopy >>= 8; } @@ -262,7 +262,7 @@ asn1_error_code asn1_encode_krb5_flags(buf, val, retlen) return 0; } -asn1_error_code asn1_encode_ap_options(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_ap_options(buf, val, retlen) asn1buf * buf; const krb5_flags val; int * retlen; @@ -270,7 +270,7 @@ asn1_error_code asn1_encode_ap_options(buf, val, retlen) return asn1_encode_krb5_flags(buf,val,retlen); } -asn1_error_code asn1_encode_ticket_flags(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_ticket_flags(buf, val, retlen) asn1buf * buf; const krb5_flags val; int * retlen; @@ -278,7 +278,7 @@ asn1_error_code asn1_encode_ticket_flags(buf, val, retlen) return asn1_encode_krb5_flags(buf,val,retlen); } -asn1_error_code asn1_encode_kdc_options(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_kdc_options(buf, val, retlen) asn1buf * buf; const krb5_flags val; int * retlen; @@ -286,7 +286,7 @@ asn1_error_code asn1_encode_kdc_options(buf, val, retlen) return asn1_encode_krb5_flags(buf,val,retlen); } -asn1_error_code asn1_encode_authorization_data(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_authorization_data(buf, val, retlen) asn1buf * buf; const krb5_authdata ** val; int * retlen; @@ -307,7 +307,7 @@ asn1_error_code asn1_encode_authorization_data(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_krb5_authdata_elt(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_krb5_authdata_elt(buf, val, retlen) asn1buf * buf; const krb5_authdata * val; int * retlen; @@ -326,7 +326,7 @@ asn1_error_code asn1_encode_krb5_authdata_elt(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_kdc_rep(msg_type, buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_kdc_rep(msg_type, buf, val, retlen) int msg_type; asn1buf * buf; const krb5_kdc_rep * val; @@ -351,7 +351,7 @@ asn1_error_code asn1_encode_kdc_rep(msg_type, buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_enc_kdc_rep_part(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_enc_kdc_rep_part(buf, val, retlen) asn1buf * buf; const krb5_enc_kdc_rep_part * val; int * retlen; @@ -406,7 +406,7 @@ asn1_error_code asn1_encode_enc_kdc_rep_part(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_kdc_req_body(buf, rep, retlen) +asn1_error_code INTERFACE asn1_encode_kdc_req_body(buf, rep, retlen) asn1buf * buf; const krb5_kdc_req * rep; int * retlen; @@ -475,7 +475,7 @@ asn1_error_code asn1_encode_kdc_req_body(buf, rep, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_encryption_key(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_encryption_key(buf, val, retlen) asn1buf * buf; const krb5_keyblock * val; int * retlen; @@ -491,7 +491,7 @@ asn1_error_code asn1_encode_encryption_key(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_checksum(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_checksum(buf, val, retlen) asn1buf * buf; const krb5_checksum * val; int * retlen; @@ -507,7 +507,7 @@ asn1_error_code asn1_encode_checksum(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_transited_encoding(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_transited_encoding(buf, val, retlen) asn1buf * buf; const krb5_transited * val; int * retlen; @@ -526,7 +526,7 @@ asn1_error_code asn1_encode_transited_encoding(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_last_req(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_last_req(buf, val, retlen) asn1buf * buf; const krb5_last_req_entry ** val; int * retlen; @@ -547,7 +547,7 @@ asn1_error_code asn1_encode_last_req(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_last_req_entry(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_last_req_entry(buf, val, retlen) asn1buf * buf; const krb5_last_req_entry * val; int * retlen; @@ -563,7 +563,7 @@ asn1_error_code asn1_encode_last_req_entry(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_sequence_of_pa_data(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_sequence_of_pa_data(buf, val, retlen) asn1buf * buf; const krb5_pa_data ** val; int * retlen; @@ -584,7 +584,7 @@ asn1_error_code asn1_encode_sequence_of_pa_data(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_pa_data(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_pa_data(buf, val, retlen) asn1buf * buf; const krb5_pa_data * val; int * retlen; @@ -601,7 +601,7 @@ asn1_error_code asn1_encode_pa_data(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_sequence_of_ticket(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_sequence_of_ticket(buf, val, retlen) asn1buf * buf; const krb5_ticket ** val; int * retlen; @@ -622,7 +622,7 @@ asn1_error_code asn1_encode_sequence_of_ticket(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_ticket(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_ticket(buf, val, retlen) asn1buf * buf; const krb5_ticket * val; int * retlen; @@ -641,7 +641,7 @@ asn1_error_code asn1_encode_ticket(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_sequence_of_enctype(buf, len, val, retlen) +asn1_error_code INTERFACE asn1_encode_sequence_of_enctype(buf, len, val, retlen) asn1buf * buf; const int len; const krb5_enctype * val; @@ -662,7 +662,7 @@ asn1_error_code asn1_encode_sequence_of_enctype(buf, len, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_kdc_req(msg_type, buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_kdc_req(msg_type, buf, val, retlen) int msg_type; asn1buf * buf; const krb5_kdc_req * val; @@ -684,7 +684,7 @@ asn1_error_code asn1_encode_kdc_req(msg_type, buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_krb_safe_body(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_krb_safe_body(buf, val, retlen) asn1buf * buf; const krb5_safe * val; int * retlen; @@ -710,7 +710,7 @@ asn1_error_code asn1_encode_krb_safe_body(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_sequence_of_krb_cred_info(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_sequence_of_krb_cred_info(buf, val, retlen) asn1buf * buf; const krb5_cred_info ** val; int * retlen; @@ -731,7 +731,7 @@ asn1_error_code asn1_encode_sequence_of_krb_cred_info(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_krb_cred_info(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_krb_cred_info(buf, val, retlen) asn1buf * buf; const krb5_cred_info * val; int * retlen; @@ -767,7 +767,7 @@ asn1_error_code asn1_encode_krb_cred_info(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_sequence_of_passwdsequence(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_sequence_of_passwdsequence(buf, val, retlen) asn1buf * buf; const passwd_phrase_element ** val; int * retlen; @@ -787,7 +787,7 @@ asn1_error_code asn1_encode_sequence_of_passwdsequence(buf, val, retlen) asn1_cleanup(); } -asn1_error_code asn1_encode_passwdsequence(buf, val, retlen) +asn1_error_code INTERFACE asn1_encode_passwdsequence(buf, val, retlen) asn1buf * buf; const passwd_phrase_element * val; int * retlen; diff --git a/src/lib/krb5/asn.1/asn1_k_encode.h b/src/lib/krb5/asn.1/asn1_k_encode.h index 070dcb90e..cfba4bc1f 100644 --- a/src/lib/krb5/asn.1/asn1_k_encode.h +++ b/src/lib/krb5/asn.1/asn1_k_encode.h @@ -102,114 +102,114 @@ asn1_error_code asn1_encode_asn1_type(asn1buf *buf, Returns ENOMEM if memory runs out. */ -asn1_error_code asn1_encode_ui_4 PROTOTYPE((asn1buf *buf, - const /*krb5_ui_4*/int val, +asn1_error_code INTERFACE asn1_encode_ui_4 PROTOTYPE((asn1buf *buf, + const krb5_ui_4 val, int *retlen)); -asn1_error_code asn1_encode_msgtype PROTOTYPE((asn1buf *buf, +asn1_error_code INTERFACE asn1_encode_msgtype PROTOTYPE((asn1buf *buf, const /*krb5_msgtype*/int val, int *retlen)); -asn1_error_code asn1_encode_realm +asn1_error_code INTERFACE asn1_encode_realm PROTOTYPE((asn1buf *buf, const krb5_principal val, int *retlen)); -asn1_error_code asn1_encode_principal_name +asn1_error_code INTERFACE asn1_encode_principal_name PROTOTYPE((asn1buf *buf, const krb5_principal val, int *retlen)); -asn1_error_code asn1_encode_encrypted_data +asn1_error_code INTERFACE asn1_encode_encrypted_data PROTOTYPE((asn1buf *buf, const krb5_enc_data *val, int *retlen)); -asn1_error_code asn1_encode_krb5_flags +asn1_error_code INTERFACE asn1_encode_krb5_flags PROTOTYPE((asn1buf *buf, const krb5_flags val, int *retlen)); -asn1_error_code asn1_encode_ap_options +asn1_error_code INTERFACE asn1_encode_ap_options PROTOTYPE((asn1buf *buf, const krb5_flags val, int *retlen)); -asn1_error_code asn1_encode_ticket_flags +asn1_error_code INTERFACE asn1_encode_ticket_flags PROTOTYPE((asn1buf *buf, const krb5_flags val, int *retlen)); -asn1_error_code asn1_encode_kdc_options +asn1_error_code INTERFACE asn1_encode_kdc_options PROTOTYPE((asn1buf *buf, const krb5_flags val, int *retlen)); -asn1_error_code asn1_encode_authorization_data +asn1_error_code INTERFACE asn1_encode_authorization_data PROTOTYPE((asn1buf *buf, const krb5_authdata **val, int *retlen)); -asn1_error_code asn1_encode_krb5_authdata_elt +asn1_error_code INTERFACE asn1_encode_krb5_authdata_elt PROTOTYPE((asn1buf *buf, const krb5_authdata *val, int *retlen)); -asn1_error_code asn1_encode_kdc_rep +asn1_error_code INTERFACE asn1_encode_kdc_rep PROTOTYPE((int msg_type, asn1buf *buf, const krb5_kdc_rep *val, int *retlen)); -asn1_error_code asn1_encode_enc_kdc_rep_part +asn1_error_code INTERFACE asn1_encode_enc_kdc_rep_part PROTOTYPE((asn1buf *buf, const krb5_enc_kdc_rep_part *val, int *retlen)); -asn1_error_code asn1_encode_ticket +asn1_error_code INTERFACE asn1_encode_ticket PROTOTYPE((asn1buf *buf, const krb5_ticket *val, int *retlen)); -asn1_error_code asn1_encode_encryption_key +asn1_error_code INTERFACE asn1_encode_encryption_key PROTOTYPE((asn1buf *buf, const krb5_keyblock *val, int *retlen)); -asn1_error_code asn1_encode_kerberos_time +asn1_error_code INTERFACE asn1_encode_kerberos_time PROTOTYPE((asn1buf *buf, const krb5_timestamp val, int *retlen)); -asn1_error_code asn1_encode_checksum +asn1_error_code INTERFACE asn1_encode_checksum PROTOTYPE((asn1buf *buf, const krb5_checksum *val, int *retlen)); -asn1_error_code asn1_encode_host_address +asn1_error_code INTERFACE asn1_encode_host_address PROTOTYPE((asn1buf *buf, const krb5_address *val, int *retlen)); -asn1_error_code asn1_encode_host_addresses +asn1_error_code INTERFACE asn1_encode_host_addresses PROTOTYPE((asn1buf *buf, const krb5_address **val, int *retlen)); -asn1_error_code asn1_encode_transited_encoding +asn1_error_code INTERFACE asn1_encode_transited_encoding PROTOTYPE((asn1buf *buf, const krb5_transited *val, int *retlen)); -asn1_error_code asn1_encode_last_req +asn1_error_code INTERFACE asn1_encode_last_req PROTOTYPE((asn1buf *buf, const krb5_last_req_entry **val, int *retlen)); asn1_error_code asn1_encode_sequence_of_pa_data PROTOTYPE((asn1buf *buf, const krb5_pa_data **val, int *retlen)); -asn1_error_code asn1_encode_sequence_of_ticket +asn1_error_code INTERFACE asn1_encode_sequence_of_ticket PROTOTYPE((asn1buf *buf, const krb5_ticket **val, int *retlen)); -asn1_error_code asn1_encode_sequence_of_enctype +asn1_error_code INTERFACE asn1_encode_sequence_of_enctype PROTOTYPE((asn1buf *buf, const int len, const krb5_enctype *val, int *retlen)); -asn1_error_code asn1_encode_kdc_req +asn1_error_code INTERFACE asn1_encode_kdc_req PROTOTYPE((int msg_type, asn1buf *buf, const krb5_kdc_req *val, int *retlen)); -asn1_error_code asn1_encode_kdc_req_body +asn1_error_code INTERFACE asn1_encode_kdc_req_body PROTOTYPE((asn1buf *buf, const krb5_kdc_req *val, int *retlen)); -asn1_error_code asn1_encode_krb_safe_body +asn1_error_code INTERFACE asn1_encode_krb_safe_body PROTOTYPE((asn1buf *buf, const krb5_safe *val, int *retlen)); -asn1_error_code asn1_encode_sequence_of_krb_cred_info +asn1_error_code INTERFACE asn1_encode_sequence_of_krb_cred_info PROTOTYPE((asn1buf *buf, const krb5_cred_info **val, int *retlen)); -asn1_error_code asn1_encode_krb_cred_info +asn1_error_code INTERFACE asn1_encode_krb_cred_info PROTOTYPE((asn1buf *buf, const krb5_cred_info *val, int *retlen)); -asn1_error_code asn1_encode_last_req_entry +asn1_error_code INTERFACE asn1_encode_last_req_entry PROTOTYPE((asn1buf *buf, const krb5_last_req_entry *val, int *retlen)); -asn1_error_code asn1_encode_pa_data +asn1_error_code INTERFACE asn1_encode_pa_data PROTOTYPE((asn1buf *buf, const krb5_pa_data *val, int *retlen)); -asn1_error_code asn1_encode_passwdsequence +asn1_error_code INTERFACE asn1_encode_passwdsequence PROTOTYPE((asn1buf *buf, const passwd_phrase_element *val, int *retlen)); -asn1_error_code asn1_encode_sequence_of_passwdsequence +asn1_error_code INTERFACE asn1_encode_sequence_of_passwdsequence PROTOTYPE((asn1buf *buf, const passwd_phrase_element **val, int *retlen)); #endif diff --git a/src/lib/krb5/asn.1/asn1_make.c b/src/lib/krb5/asn.1/asn1_make.c index 09ca3d060..84d9f4e43 100644 --- a/src/lib/krb5/asn.1/asn1_make.c +++ b/src/lib/krb5/asn.1/asn1_make.c @@ -23,7 +23,7 @@ #include "asn1_make.h" -asn1_error_code asn1_make_etag(buf, class, tagnum, in_len, retlen) +asn1_error_code INTERFACE asn1_make_etag(buf, class, tagnum, in_len, retlen) asn1buf * buf; const asn1_class class; const asn1_tagnum tagnum; @@ -33,7 +33,7 @@ asn1_error_code asn1_make_etag(buf, class, tagnum, in_len, retlen) return asn1_make_tag(buf,class,CONSTRUCTED,tagnum,in_len,retlen); } -asn1_error_code asn1_make_tag(buf, class, construction, tagnum, in_len, retlen) +asn1_error_code INTERFACE asn1_make_tag(buf, class, construction, tagnum, in_len, retlen) asn1buf * buf; const asn1_class class; const asn1_construction construction; @@ -57,7 +57,7 @@ asn1_error_code asn1_make_tag(buf, class, construction, tagnum, in_len, retlen) return 0; } -asn1_error_code asn1_make_length(buf, in_len, retlen) +asn1_error_code INTERFACE asn1_make_length(buf, in_len, retlen) asn1buf * buf; const int in_len; int * retlen; @@ -77,7 +77,7 @@ asn1_error_code asn1_make_length(buf, in_len, retlen) in_copy = in_copy >> 8; length++; } - retval = asn1buf_insert_octet(buf, 0x80 | (asn1_octet)(length&0x7F)); + retval = asn1buf_insert_octet(buf, (asn1_octet) (0x80 | (asn1_octet)(length&0x7F))); if(retval) return retval; length++; *retlen = length; @@ -86,7 +86,7 @@ asn1_error_code asn1_make_length(buf, in_len, retlen) return 0; } -asn1_error_code asn1_make_id(buf, class, construction, tagnum, retlen) +asn1_error_code INTERFACE asn1_make_id(buf, class, construction, tagnum, retlen) asn1buf * buf; const asn1_class class; const asn1_construction construction; @@ -96,8 +96,8 @@ asn1_error_code asn1_make_id(buf, class, construction, tagnum, retlen) asn1_error_code retval; if(tagnum < 31) { - retval = asn1buf_insert_octet(buf, class | construction | - (asn1_octet)tagnum); + retval = asn1buf_insert_octet(buf, (asn1_octet) (class | construction | + (asn1_octet)tagnum)); if(retval) return retval; *retlen = 1; }else{ @@ -110,12 +110,12 @@ asn1_error_code asn1_make_id(buf, class, construction, tagnum, retlen) length++; for(; tagcopy != 0; tagcopy >>= 7){ - retval = asn1buf_insert_octet(buf, 0x80 | (asn1_octet)(tagcopy&0x7F)); + retval = asn1buf_insert_octet(buf, (asn1_octet) (0x80 | (asn1_octet)(tagcopy&0x7F))); if(retval) return retval; length++; } - retval = asn1buf_insert_octet(buf, class | construction | 0x1F); + retval = asn1buf_insert_octet(buf, (asn1_octet) (class | construction | 0x1F)); if(retval) return retval; length++; *retlen = length; @@ -124,7 +124,7 @@ asn1_error_code asn1_make_id(buf, class, construction, tagnum, retlen) return 0; } -asn1_error_code asn1_make_sequence(buf, seq_len, retlen) +asn1_error_code INTERFACE asn1_make_sequence(buf, seq_len, retlen) asn1buf * buf; const int seq_len; int * retlen; @@ -143,7 +143,7 @@ asn1_error_code asn1_make_sequence(buf, seq_len, retlen) return 0; } -asn1_error_code asn1_make_set(buf, set_len, retlen) +asn1_error_code INTERFACE asn1_make_set(buf, set_len, retlen) asn1buf * buf; const int set_len; int * retlen; @@ -162,7 +162,7 @@ asn1_error_code asn1_make_set(buf, set_len, retlen) return 0; } -asn1_error_code asn1_make_string(buf, length, string, retlen) +asn1_error_code INTERFACE asn1_make_string(buf, length, string, retlen) asn1buf * buf; const int length; const char * string; diff --git a/src/lib/krb5/asn.1/asn1_make.h b/src/lib/krb5/asn.1/asn1_make.h index fd85b97d6..2272d83e5 100644 --- a/src/lib/krb5/asn.1/asn1_make.h +++ b/src/lib/krb5/asn.1/asn1_make.h @@ -43,7 +43,7 @@ asn1_make_string */ -asn1_error_code asn1_make_etag +asn1_error_code INTERFACE asn1_make_etag PROTOTYPE((asn1buf *buf, const asn1_class class, const asn1_tagnum tagnum, @@ -57,7 +57,7 @@ asn1_error_code asn1_make_etag Returns the length of this encoding in *retlen. Returns ENOMEM if memory runs out. */ -asn1_error_code asn1_make_tag +asn1_error_code INTERFACE asn1_make_tag PROTOTYPE((asn1buf *buf, const asn1_class class, const asn1_construction construction, const asn1_tagnum tagnum, @@ -74,7 +74,7 @@ asn1_error_code asn1_make_tag Returns ASN1_OVERFLOW if tagnum exceeds the limits of the implementation. */ -asn1_error_code asn1_make_sequence +asn1_error_code INTERFACE asn1_make_sequence PROTOTYPE((asn1buf *buf, const int seq_len, int *len)); /* requires *buf is allocated, seq_len is the length of a series of sequence components which have just been inserted in *buf @@ -83,7 +83,7 @@ asn1_error_code asn1_make_sequence in *buf. Returns the length of this encoding in *retlen. Returns ENOMEM if memory runs out. */ -asn1_error_code asn1_make_set +asn1_error_code INTERFACE asn1_make_set PROTOTYPE((asn1buf *buf, const int set_len, int *retlen)); /* requires *buf is allocated, seq_len is the length of a series of sequence components which have just been inserted in *buf @@ -92,7 +92,7 @@ asn1_error_code asn1_make_set Returns the length of this encoding in *retlen. Returns ENOMEM if memory runs out. */ -asn1_error_code asn1_make_string +asn1_error_code INTERFACE asn1_make_string PROTOTYPE((asn1buf *buf, const int len, const char *string, int *retlen)); @@ -107,7 +107,7 @@ asn1_error_code asn1_make_string /* Private procedures */ /* "helper" procedure for asn1_make_tag */ -asn1_error_code asn1_make_length +asn1_error_code INTERFACE asn1_make_length PROTOTYPE((asn1buf *buf, const int in_len, int *retlen)); /* requires *buf is allocated, in_len is the length of an ASN.1 encoding which has just been inserted in *buf @@ -116,7 +116,7 @@ asn1_error_code asn1_make_length PROTOTYPE((s) for in_len into *buf */ /* "helper" procedure for asn1_make_tag */ -asn1_error_code asn1_make_id +asn1_error_code INTERFACE asn1_make_id PROTOTYPE((asn1buf *buf, const asn1_class class, const asn1_construction construction, diff --git a/src/lib/krb5/asn.1/asn1_misc.c b/src/lib/krb5/asn.1/asn1_misc.c index 83fbdbe62..ce6f7b534 100644 --- a/src/lib/krb5/asn.1/asn1_misc.c +++ b/src/lib/krb5/asn.1/asn1_misc.c @@ -23,7 +23,7 @@ #include "asn1_misc.h" -asn1_error_code asn1_krb5_realm_copy(target, source) +asn1_error_code INTERFACE asn1_krb5_realm_copy(target, source) krb5_principal target; krb5_principal source; { diff --git a/src/lib/krb5/asn.1/asn1_misc.h b/src/lib/krb5/asn.1/asn1_misc.h index 95a3b3977..f9c162d89 100644 --- a/src/lib/krb5/asn.1/asn1_misc.h +++ b/src/lib/krb5/asn.1/asn1_misc.h @@ -27,7 +27,7 @@ #include #include "krbasn1.h" -asn1_error_code asn1_krb5_realm_copy +asn1_error_code INTERFACE asn1_krb5_realm_copy PROTOTYPE((krb5_principal target, krb5_principal source)); /* requires target, source, and source->realm are allocated effects Copies source->realm into target->realm. diff --git a/src/lib/krb5/asn.1/asn1buf.c b/src/lib/krb5/asn.1/asn1buf.c index 61ddaad34..d831d785e 100644 --- a/src/lib/krb5/asn.1/asn1buf.c +++ b/src/lib/krb5/asn.1/asn1buf.c @@ -51,7 +51,7 @@ #include "asn1buf.h" #include -asn1_error_code asn1buf_create(buf) +asn1_error_code INTERFACE asn1buf_create(buf) asn1buf ** buf; { *buf = (asn1buf*)calloc(1,sizeof(asn1buf)); @@ -62,7 +62,7 @@ asn1_error_code asn1buf_create(buf) return 0; } -asn1_error_code asn1buf_wrap_data(buf, code) +asn1_error_code INTERFACE asn1buf_wrap_data(buf, code) asn1buf * buf; const krb5_data * code; { @@ -72,7 +72,7 @@ asn1_error_code asn1buf_wrap_data(buf, code) return 0; } -asn1_error_code asn1buf_imbed(subbuf, buf, length) +asn1_error_code INTERFACE asn1buf_imbed(subbuf, buf, length) asn1buf * subbuf; const asn1buf * buf; const int length; @@ -83,14 +83,14 @@ asn1_error_code asn1buf_imbed(subbuf, buf, length) return 0; } -void asn1buf_sync(buf, subbuf) +void INTERFACE asn1buf_sync(buf, subbuf) asn1buf * buf; asn1buf * subbuf; { buf->next = subbuf->next; } -asn1_error_code asn1buf_destroy(buf) +asn1_error_code INTERFACE asn1buf_destroy(buf) asn1buf ** buf; { if (*buf != NULL) { @@ -101,7 +101,7 @@ asn1_error_code asn1buf_destroy(buf) return 0; } -asn1_error_code asn1buf_insert_octet(buf, o) +asn1_error_code INTERFACE asn1buf_insert_octet(buf, o) asn1buf * buf; const asn1_octet o; { @@ -114,7 +114,7 @@ asn1_error_code asn1buf_insert_octet(buf, o) return 0; } -asn1_error_code asn1buf_insert_octetstring(buf, len, s) +asn1_error_code INTERFACE asn1buf_insert_octetstring(buf, len, s) asn1buf * buf; const int len; const krb5_octet * s; @@ -129,7 +129,7 @@ asn1_error_code asn1buf_insert_octetstring(buf, len, s) return 0; } -asn1_error_code asn1buf_insert_charstring(buf, len, s) +asn1_error_code INTERFACE asn1buf_insert_charstring(buf, len, s) asn1buf * buf; const int len; const char * s; @@ -144,7 +144,7 @@ asn1_error_code asn1buf_insert_charstring(buf, len, s) return 0; } -asn1_error_code asn1buf_remove_octet(buf, o) +asn1_error_code INTERFACE asn1buf_remove_octet(buf, o) asn1buf * buf; asn1_octet * o; { @@ -153,7 +153,7 @@ asn1_error_code asn1buf_remove_octet(buf, o) return 0; } -asn1_error_code asn1buf_remove_octetstring(buf, len, s) +asn1_error_code INTERFACE asn1buf_remove_octetstring(buf, len, s) asn1buf * buf; const int len; asn1_octet ** s; @@ -174,7 +174,7 @@ asn1_error_code asn1buf_remove_octetstring(buf, len, s) return 0; } -asn1_error_code asn1buf_remove_charstring(buf, len, s) +asn1_error_code INTERFACE asn1buf_remove_charstring(buf, len, s) asn1buf * buf; const int len; char ** s; @@ -194,14 +194,14 @@ asn1_error_code asn1buf_remove_charstring(buf, len, s) return 0; } -int asn1buf_remains(buf) +int INTERFACE 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(buf, code) +asn1_error_code INTERFACE asn12krb5_buf(buf, code) const asn1buf * buf; krb5_data ** code; { @@ -223,7 +223,7 @@ asn1_error_code asn12krb5_buf(buf, code) /* 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) +asn1_error_code INTERFACE asn1buf_unparse(buf, s) const asn1buf * buf; char ** s; { @@ -249,7 +249,7 @@ asn1_error_code asn1buf_unparse(buf, s) return 0; } -asn1_error_code asn1buf_hex_unparse(buf, s) +asn1_error_code INTERFACE asn1buf_hex_unparse(buf, s) const asn1buf * buf; char ** s; { @@ -286,21 +286,21 @@ asn1_error_code asn1buf_hex_unparse(buf, s) /****************************************************************/ /* Private Procedures */ -int asn1buf_size(buf) +int INTERFACE asn1buf_size(buf) const asn1buf * buf; { if(buf == NULL || buf->base == NULL) return 0; return buf->bound - buf->base + 1; } -int asn1buf_free(buf) +int INTERFACE 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(buf, amount) +asn1_error_code INTERFACE asn1buf_ensure_space(buf, amount) asn1buf * buf; const int amount; { @@ -312,7 +312,7 @@ asn1_error_code asn1buf_ensure_space(buf, amount) return 0; } -asn1_error_code asn1buf_expand(buf, inc) +asn1_error_code INTERFACE asn1buf_expand(buf, inc) asn1buf * buf; const int inc; { @@ -337,7 +337,7 @@ asn1_error_code asn1buf_expand(buf, inc) return 0; } -int asn1buf_len(buf) +int INTERFACE asn1buf_len(buf) const asn1buf * buf; { return buf->next - buf->base; diff --git a/src/lib/krb5/asn.1/asn1buf.h b/src/lib/krb5/asn.1/asn1buf.h index 3edda85d2..2c0ff17c5 100644 --- a/src/lib/krb5/asn.1/asn1buf.h +++ b/src/lib/krb5/asn.1/asn1buf.h @@ -47,12 +47,12 @@ typedef struct code_buffer_rep { (asn1buf_len) */ -asn1_error_code asn1buf_create +asn1_error_code INTERFACE asn1buf_create PROTOTYPE((asn1buf **buf)); /* effects Creates a new encoding buffer pointed to by *buf. Returns ENOMEM if the buffer can't be created. */ -asn1_error_code asn1buf_wrap_data +asn1_error_code INTERFACE asn1buf_wrap_data PROTOTYPE((asn1buf *buf, const krb5_data *code)); /* requires *buf has already been allocated effects Turns *buf into a "wrapper" for *code. i.e. *buf is set up @@ -60,7 +60,7 @@ asn1_error_code asn1buf_wrap_data is the top of *code. Returns ASN1_MISSING_FIELD if code is empty. */ -asn1_error_code asn1buf_imbed +asn1_error_code INTERFACE asn1buf_imbed PROTOTYPE((asn1buf *subbuf, const asn1buf *buf, const int length)); /* requires *subbuf and *buf are allocated effects *subbuf becomes a sub-buffer of *buf. *subbuf begins @@ -69,22 +69,22 @@ asn1_error_code asn1buf_imbed that case, ASN1_OVERRUN is returned) *subbuf's current position starts at the beginning of *subbuf. */ -void asn1buf_sync +void INTERFACE asn1buf_sync PROTOTYPE((asn1buf *buf, asn1buf *subbuf)); /* requires *subbuf is a sub-buffer of *buf, as created by asn1buf_imbed. effects Synchronizes *buf's current position to match that of *subbuf. */ -asn1_error_code asn1buf_destroy +asn1_error_code INTERFACE asn1buf_destroy PROTOTYPE((asn1buf **buf)); /* effects Deallocates **buf, sets *buf to NULL. */ -asn1_error_code asn1buf_insert_octet - PROTOTYPE((asn1buf *buf, const /*asn1_octet*/int o)); +asn1_error_code INTERFACE asn1buf_insert_octet + PROTOTYPE((asn1buf *buf, const asn1_octet o)); /* requires *buf is allocated effects Inserts o into the buffer *buf, expanding the buffer if necessary. Returns ENOMEM memory is exhausted. */ -asn1_error_code asn1buf_insert_octetstring +asn1_error_code INTERFACE asn1buf_insert_octetstring PROTOTYPE((asn1buf *buf, const int len, const asn1_octet *s)); /* requires *buf is allocated modifies *buf @@ -92,7 +92,7 @@ asn1_error_code asn1buf_insert_octetstring into the buffer *buf, expanding the buffer if necessary. Returns ENOMEM if memory is exhausted. */ -asn1_error_code asn1buf_insert_charstring +asn1_error_code INTERFACE asn1buf_insert_charstring PROTOTYPE((asn1buf *buf, const int len, const char *s)); /* requires *buf is allocated modifies *buf @@ -100,14 +100,14 @@ asn1_error_code asn1buf_insert_charstring into the buffer *buf, expanding the buffer if necessary. Returns ENOMEM if memory is exhuasted. */ -asn1_error_code asn1buf_remove_octet +asn1_error_code INTERFACE asn1buf_remove_octet PROTOTYPE((asn1buf *buf, asn1_octet *o)); /* requires *buf is allocated effects Returns *buf's current octet in *o and advances to the next octet. Returns ASN1_OVERRUN if *buf has already been exhuasted. */ -asn1_error_code asn1buf_remove_octetstring +asn1_error_code INTERFACE asn1buf_remove_octetstring PROTOTYPE((asn1buf *buf, const int len, asn1_octet **s)); /* requires *buf is allocated effects Removes the next len octets of *buf and returns them in **s. @@ -115,7 +115,7 @@ asn1_error_code asn1buf_remove_octetstring left in *buf. Returns ENOMEM if *s could not be allocated. */ -asn1_error_code asn1buf_remove_charstring +asn1_error_code INTERFACE asn1buf_remove_charstring PROTOTYPE((asn1buf *buf, const int len, char **s)); /* requires *buf is allocated @@ -124,43 +124,43 @@ asn1_error_code asn1buf_remove_charstring left in *buf. Returns ENOMEM if *s could not be allocated. */ -asn1_error_code asn1buf_unparse +asn1_error_code INTERFACE asn1buf_unparse PROTOTYPE((const asn1buf *buf, char **s)); /* modifies *s effects Returns a human-readable representation of *buf in *s, where each octet in *buf is represented by a character in *s. */ -asn1_error_code asn1buf_hex_unparse +asn1_error_code INTERFACE asn1buf_hex_unparse PROTOTYPE((const asn1buf *buf, char **s)); /* modifies *s effects Returns a human-readable representation of *buf in *s, where each octet in *buf is represented by a 2-digit hexadecimal number in *s. */ -asn1_error_code asn12krb5_buf +asn1_error_code INTERFACE asn12krb5_buf PROTOTYPE((const asn1buf *buf, krb5_data **code)); /* modifies *code effects Instantiates **code with the krb5_data representation of **buf. */ -int asn1buf_remains +int INTERFACE asn1buf_remains PROTOTYPE((const asn1buf *buf)); /* effects Returns the number of unprocessed octets remaining in *buf. */ /**************** Private Procedures ****************/ -int asn1buf_size +int INTERFACE asn1buf_size PROTOTYPE((const asn1buf *buf)); /* requires *buf has been created and not destroyed effects Returns the total size PROTOTYPE((in octets) of buf's octet buffer. */ -int asn1buf_free +int INTERFACE asn1buf_free PROTOTYPE((const asn1buf *buf)); /* requires *buf is allocated effects Returns the number of unused, allocated octets in *buf. */ -asn1_error_code asn1buf_ensure_space +asn1_error_code INTERFACE asn1buf_ensure_space PROTOTYPE((asn1buf *buf, const int amount)); /* requires *buf is allocated modifies *buf @@ -168,14 +168,14 @@ asn1_error_code asn1buf_ensure_space expanded to have at least amount octets of free space. Returns ENOMEM memory is exhausted. */ -asn1_error_code asn1buf_expand +asn1_error_code INTERFACE asn1buf_expand PROTOTYPE((asn1buf *buf, const int inc)); /* requires *buf is allocated modifies *buf effects Expands *buf by allocating space for inc more octets. Returns ENOMEM if memory is exhausted. */ -int asn1buf_len +int INTERFACE asn1buf_len PROTOTYPE((const asn1buf *buf)); /* requires *buf is allocated effects Returns the length of the encoding in *buf. */ diff --git a/src/lib/krb5/asn.1/krb5_decode.c b/src/lib/krb5/asn.1/krb5_decode.c index 69deb3ebb..f608a3c45 100644 --- a/src/lib/krb5/asn.1/krb5_decode.c +++ b/src/lib/krb5/asn.1/krb5_decode.c @@ -147,7 +147,7 @@ if(tagnum == (tagexpect)){\ #define cleanup()\ return 0 -krb5_error_code decode_krb5_authenticator(code, rep) +krb5_error_code INTERFACE decode_krb5_authenticator(code, rep) const krb5_data * code; krb5_authenticator ** rep; { @@ -176,7 +176,7 @@ krb5_error_code decode_krb5_authenticator(code, rep) cleanup(); } -krb5_error_code decode_krb5_ticket(code, rep) +krb5_error_code INTERFACE decode_krb5_ticket(code, rep) const krb5_data * code; krb5_ticket ** rep; { @@ -198,7 +198,7 @@ krb5_error_code decode_krb5_ticket(code, rep) cleanup(); } -krb5_error_code decode_krb5_encryption_key(code, rep) +krb5_error_code INTERFACE decode_krb5_encryption_key(code, rep) const krb5_data * code; krb5_keyblock ** rep; { @@ -215,7 +215,7 @@ krb5_error_code decode_krb5_encryption_key(code, rep) cleanup(); } -krb5_error_code decode_krb5_enc_tkt_part(code, rep) +krb5_error_code INTERFACE decode_krb5_enc_tkt_part(code, rep) const krb5_data * code; krb5_enc_tkt_part ** rep; { @@ -242,7 +242,7 @@ krb5_error_code decode_krb5_enc_tkt_part(code, rep) cleanup(); } -krb5_error_code decode_krb5_enc_kdc_rep_part(code, rep) +krb5_error_code INTERFACE decode_krb5_enc_kdc_rep_part(code, rep) const krb5_data * code; krb5_enc_kdc_rep_part ** rep; { @@ -262,7 +262,7 @@ krb5_error_code decode_krb5_enc_kdc_rep_part(code, rep) cleanup(); } -krb5_error_code decode_krb5_as_rep(code, rep) +krb5_error_code INTERFACE decode_krb5_as_rep(code, rep) const krb5_data * code; krb5_kdc_rep ** rep; { @@ -280,7 +280,7 @@ krb5_error_code decode_krb5_as_rep(code, rep) cleanup(); } -krb5_error_code decode_krb5_tgs_rep(code, rep) +krb5_error_code INTERFACE decode_krb5_tgs_rep(code, rep) const krb5_data * code; krb5_kdc_rep ** rep; { @@ -297,7 +297,7 @@ krb5_error_code decode_krb5_tgs_rep(code, rep) cleanup(); } -krb5_error_code decode_krb5_ap_req(code, rep) +krb5_error_code INTERFACE decode_krb5_ap_req(code, rep) const krb5_data * code; krb5_ap_req ** rep; { @@ -324,7 +324,7 @@ krb5_error_code decode_krb5_ap_req(code, rep) cleanup(); } -krb5_error_code decode_krb5_ap_rep(code, rep) +krb5_error_code INTERFACE decode_krb5_ap_rep(code, rep) const krb5_data * code; krb5_ap_rep ** rep; { @@ -348,7 +348,7 @@ krb5_error_code decode_krb5_ap_rep(code, rep) cleanup(); } -krb5_error_code decode_krb5_ap_rep_enc_part(code, rep) +krb5_error_code INTERFACE decode_krb5_ap_rep_enc_part(code, rep) const krb5_data * code; krb5_ap_rep_enc_part ** rep; { @@ -367,7 +367,7 @@ krb5_error_code decode_krb5_ap_rep_enc_part(code, rep) cleanup(); } -krb5_error_code decode_krb5_as_req(code, rep) +krb5_error_code INTERFACE decode_krb5_as_req(code, rep) const krb5_data * code; krb5_kdc_req ** rep; { @@ -384,7 +384,7 @@ krb5_error_code decode_krb5_as_req(code, rep) cleanup(); } -krb5_error_code decode_krb5_tgs_req(code, rep) +krb5_error_code INTERFACE decode_krb5_tgs_req(code, rep) const krb5_data * code; krb5_kdc_req ** rep; { @@ -401,7 +401,7 @@ krb5_error_code decode_krb5_tgs_req(code, rep) cleanup(); } -krb5_error_code decode_krb5_kdc_req_body(code, rep) +krb5_error_code INTERFACE decode_krb5_kdc_req_body(code, rep) const krb5_data * code; krb5_kdc_req ** rep; { @@ -414,7 +414,7 @@ krb5_error_code decode_krb5_kdc_req_body(code, rep) cleanup(); } -krb5_error_code decode_krb5_safe(code, rep) +krb5_error_code INTERFACE decode_krb5_safe(code, rep) const krb5_data * code; krb5_safe ** rep; { @@ -440,7 +440,7 @@ krb5_error_code decode_krb5_safe(code, rep) cleanup(); } -krb5_error_code decode_krb5_priv(code, rep) +krb5_error_code INTERFACE decode_krb5_priv(code, rep) const krb5_data * code; krb5_priv ** rep; { @@ -464,7 +464,7 @@ krb5_error_code decode_krb5_priv(code, rep) cleanup(); } -krb5_error_code decode_krb5_enc_priv_part(code, rep) +krb5_error_code INTERFACE decode_krb5_enc_priv_part(code, rep) const krb5_data * code; krb5_priv_enc_part ** rep; { @@ -486,7 +486,7 @@ krb5_error_code decode_krb5_enc_priv_part(code, rep) cleanup(); } -krb5_error_code decode_krb5_cred(code, rep) +krb5_error_code INTERFACE decode_krb5_cred(code, rep) const krb5_data * code; krb5_cred ** rep; { @@ -511,7 +511,7 @@ krb5_error_code decode_krb5_cred(code, rep) cleanup(); } -krb5_error_code decode_krb5_enc_cred_part(code, rep) +krb5_error_code INTERFACE decode_krb5_enc_cred_part(code, rep) const krb5_data * code; krb5_cred_enc_part ** rep; { @@ -533,7 +533,7 @@ krb5_error_code decode_krb5_enc_cred_part(code, rep) cleanup(); } -krb5_error_code decode_krb5_error(code, rep) +krb5_error_code INTERFACE decode_krb5_error(code, rep) const krb5_data * code; krb5_error ** rep; { @@ -569,7 +569,7 @@ krb5_error_code decode_krb5_error(code, rep) cleanup(); } -krb5_error_code decode_krb5_authdata(code, rep) +krb5_error_code INTERFACE decode_krb5_authdata(code, rep) const krb5_data * code; krb5_authdata *** rep; { @@ -580,7 +580,7 @@ krb5_error_code decode_krb5_authdata(code, rep) cleanup(); } -krb5_error_code decode_krb5_pwd_sequence(code, rep) +krb5_error_code INTERFACE decode_krb5_pwd_sequence(code, rep) const krb5_data * code; passwd_phrase_element ** rep; { @@ -591,7 +591,7 @@ krb5_error_code decode_krb5_pwd_sequence(code, rep) cleanup(); } -krb5_error_code decode_krb5_pwd_data(code, rep) +krb5_error_code INTERFACE decode_krb5_pwd_data(code, rep) const krb5_data * code; krb5_pwd_data ** rep; { diff --git a/src/lib/krb5/asn.1/krb5_encode.c b/src/lib/krb5/asn.1/krb5_encode.c index 46d969688..d865f0f08 100644 --- a/src/lib/krb5/asn.1/krb5_encode.c +++ b/src/lib/krb5/asn.1/krb5_encode.c @@ -141,7 +141,7 @@ \ return 0 -krb5_error_code encode_krb5_authenticator(rep, code) +krb5_error_code INTERFACE encode_krb5_authenticator(rep, code) const krb5_authenticator * rep; krb5_data ** code; { @@ -198,7 +198,7 @@ krb5_error_code encode_krb5_authenticator(rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_ticket(rep, code) +krb5_error_code INTERFACE encode_krb5_ticket(rep, code) const krb5_ticket * rep; krb5_data ** code; { @@ -223,7 +223,7 @@ krb5_error_code encode_krb5_ticket(rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_encryption_key(rep, code) +krb5_error_code INTERFACE encode_krb5_encryption_key(rep, code) const krb5_keyblock * rep; krb5_data ** code; { @@ -241,7 +241,7 @@ krb5_error_code encode_krb5_encryption_key(rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_enc_tkt_part(rep, code) +krb5_error_code INTERFACE encode_krb5_enc_tkt_part(rep, code) const krb5_enc_tkt_part * rep; krb5_data ** code; { @@ -293,7 +293,7 @@ krb5_error_code encode_krb5_enc_tkt_part(rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_enc_kdc_rep_part(rep, code) +krb5_error_code INTERFACE encode_krb5_enc_kdc_rep_part(rep, code) const krb5_enc_kdc_rep_part * rep; krb5_data ** code; { @@ -321,7 +321,7 @@ krb5_error_code encode_krb5_enc_kdc_rep_part(rep, code) } /* yes, the translation is identical to that used for KDC__REP */ -krb5_error_code encode_krb5_as_rep(rep, code) +krb5_error_code INTERFACE encode_krb5_as_rep(rep, code) const krb5_kdc_rep * rep; krb5_data ** code; { @@ -338,7 +338,7 @@ krb5_error_code encode_krb5_as_rep(rep, code) } /* yes, the translation is identical to that used for KDC__REP */ -krb5_error_code encode_krb5_tgs_rep( rep, code) +krb5_error_code INTERFACE encode_krb5_tgs_rep( rep, code) const krb5_kdc_rep * rep; krb5_data ** code; { @@ -354,7 +354,7 @@ krb5_error_code encode_krb5_tgs_rep( rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_ap_req(rep, code) +krb5_error_code INTERFACE encode_krb5_ap_req(rep, code) const krb5_ap_req * rep; krb5_data ** code; { @@ -382,7 +382,7 @@ krb5_error_code encode_krb5_ap_req(rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_ap_rep(rep, code) +krb5_error_code INTERFACE encode_krb5_ap_rep(rep, code) const krb5_ap_rep * rep; krb5_data ** code; { @@ -405,7 +405,7 @@ krb5_error_code encode_krb5_ap_rep(rep, code) } -krb5_error_code encode_krb5_ap_rep_enc_part(rep, code) +krb5_error_code INTERFACE encode_krb5_ap_rep_enc_part(rep, code) const krb5_ap_rep_enc_part * rep; krb5_data ** code; { @@ -432,7 +432,7 @@ krb5_error_code encode_krb5_ap_rep_enc_part(rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_as_req(rep, code) +krb5_error_code INTERFACE encode_krb5_as_req(rep, code) const krb5_kdc_req * rep; krb5_data ** code; { @@ -448,7 +448,7 @@ krb5_error_code encode_krb5_as_req(rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_tgs_req(rep, code) +krb5_error_code INTERFACE encode_krb5_tgs_req(rep, code) const krb5_kdc_req * rep; krb5_data ** code; { @@ -464,7 +464,7 @@ krb5_error_code encode_krb5_tgs_req(rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_kdc_req_body(rep, code) +krb5_error_code INTERFACE encode_krb5_kdc_req_body(rep, code) const krb5_kdc_req * rep; krb5_data ** code; { @@ -478,7 +478,7 @@ krb5_error_code encode_krb5_kdc_req_body(rep, code) } -krb5_error_code encode_krb5_safe(rep, code) +krb5_error_code INTERFACE encode_krb5_safe(rep, code) const krb5_safe * rep; krb5_data ** code; { @@ -503,7 +503,7 @@ krb5_error_code encode_krb5_safe(rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_priv(rep, code) +krb5_error_code INTERFACE encode_krb5_priv(rep, code) const krb5_priv * rep; krb5_data ** code; { @@ -525,7 +525,7 @@ krb5_error_code encode_krb5_priv(rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_enc_priv_part(rep, code) +krb5_error_code INTERFACE encode_krb5_enc_priv_part(rep, code) const krb5_priv_enc_part * rep; krb5_data ** code; { @@ -559,7 +559,7 @@ krb5_error_code encode_krb5_enc_priv_part(rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_cred(rep, code) +krb5_error_code INTERFACE encode_krb5_cred(rep, code) const krb5_cred * rep; krb5_data ** code; { @@ -584,7 +584,7 @@ krb5_error_code encode_krb5_cred(rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_enc_cred_part(rep, code) +krb5_error_code INTERFACE encode_krb5_enc_cred_part(rep, code) const krb5_cred_enc_part * rep; krb5_data ** code; { @@ -620,7 +620,7 @@ krb5_error_code encode_krb5_enc_cred_part(rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_error(rep, code) +krb5_error_code INTERFACE encode_krb5_error(rep, code) const krb5_error * rep; krb5_data ** code; { @@ -677,7 +677,7 @@ krb5_error_code encode_krb5_error(rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_authdata(rep, code) +krb5_error_code INTERFACE encode_krb5_authdata(rep, code) const krb5_authdata ** rep; krb5_data ** code; { @@ -698,7 +698,7 @@ krb5_error_code encode_krb5_authdata(rep, code) } /* Sandia Additions */ -krb5_error_code encode_krb5_pwd_sequence( rep, code) +krb5_error_code INTERFACE encode_krb5_pwd_sequence( rep, code) const passwd_phrase_element * rep; krb5_data ** code; { @@ -709,7 +709,7 @@ krb5_error_code encode_krb5_pwd_sequence( rep, code) krb5_cleanup(); } -krb5_error_code encode_krb5_pwd_data(rep, code) +krb5_error_code INTERFACE encode_krb5_pwd_data(rep, code) const krb5_pwd_data * rep; krb5_data ** code; {