diff options
author | Richard Basch <probe@mit.edu> | 1997-02-06 02:31:41 +0000 |
---|---|---|
committer | Richard Basch <probe@mit.edu> | 1997-02-06 02:31:41 +0000 |
commit | a0b9ce4bee60136363cfff7a93c4e42eab972c02 (patch) | |
tree | 400984337fe3766653ff4cc2cb6b7d3d7f87f3f4 /src/lib/krb5/krb | |
parent | a9266b1dec31de9f33b0d032b885edd377a23ee5 (diff) | |
download | krb5-a0b9ce4bee60136363cfff7a93c4e42eab972c02.zip krb5-a0b9ce4bee60136363cfff7a93c4e42eab972c02.tar.gz krb5-a0b9ce4bee60136363cfff7a93c4e42eab972c02.tar.bz2 |
Windows/NT integration (V1_0_WIN32_BRANCH merge)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9788 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb')
50 files changed, 504 insertions, 236 deletions
diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 025691f..1d6f06b 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,16 @@ +Sun Feb 2 20:57:15 1997 Richard Basch <basch@lehman.com> + + * serialize.c: Added FAR declarations to pointer arguments for + all functions declared as KRB5_DLLIMP. + +Thu Jan 30 21:44:37 1997 Richard Basch <basch@lehman.com> + + * crypto_glue.c: + Export more crypto-layer functions: + krb5_encrypt, krb5_decrypt, krb5_eblock_enctype, + krb5_process_key, krb5_finish_key, krb5_string_to_key, + krb5_init_random_key, krb5_finish_random_key, krb5_random_key + Mon Dec 23 17:20:03 1996 Theodore Y. Ts'o <tytso@mit.edu> * Makefile.in (SRCS): Add brand.c to the SRCS line so that the @@ -16,6 +29,20 @@ Sat Dec 21 01:26:11 1996 Theodore Y. Ts'o <tytso@mit.edu> code, which is returned to the user if the timebomb should be activated. +Thu Nov 21 14:55:16 EST 1996 Richard Basch <basch@lehman.com> + + * Makefile.in: win32 build + + * auth_con.c bld_pr_ext.c conv_princ.c copy_addrs.c copy_athctr.c + copy_auth.c copy_cksum.c copy_creds.c copy_data.c copy_key.c + copy_princ.c copy_tick.c cp_key_cnt.c decrypt_tk.c fwd_tgt.c + gc_via_tkt.c get_creds.c get_in_tkt.c in_tkt_ktb.c in_tkt_pwd.c + in_tkt_sky.c init_ctx.c mk_cred.c mk_error.c mk_priv.c mk_rep.c + mk_req.c mk_req_ext.c mk_safe.c parse.c princ_comp.c rd_cred.c + rd_error.c rd_priv.c rd_rep.c rd_req.c rd_safe.c recvauth.c + sendauth.c str_conv.c unparse.c valid_times.c + DLL export various functions (see lib/krb5.def for full list) + Thu Nov 21 13:54:01 1996 Ezra Peisach <epeisach@mit.edu> * recvauth.c (krb5_recvauth): If there is an error, and the server diff --git a/src/lib/krb5/krb/Makefile.in b/src/lib/krb5/krb/Makefile.in index 2ec9e93..8ee61e8 100644 --- a/src/lib/krb5/krb/Makefile.in +++ b/src/lib/krb5/krb/Makefile.in @@ -2,7 +2,9 @@ CFLAGS = $(CCOPTS) $(DEFS) RUN_SETUP = @KRB5_RUN_ENV@ ##DOSBUILDTOP = ..\..\.. -##DOSLIBNAME=..\krb5.lib +##DOSMYNAME=krb +##DOSOBJFILE=..\$(MYNAME).lst +##WIN16##LIBNAME=..\krb5.lib .c.o: $(CC) $(CFLAGS) -c $(srcdir)/$*.c @@ -26,6 +28,7 @@ OBJS= addr_comp.$(OBJEXT) \ copy_princ.$(OBJEXT) \ copy_tick.$(OBJEXT) \ cp_key_cnt.$(OBJEXT) \ + crypto_glue.$(OBJEXT) \ decode_kdc.$(OBJEXT) \ decrypt_tk.$(OBJEXT) \ encode_kdc.$(OBJEXT) \ @@ -100,6 +103,7 @@ SRCS= $(srcdir)/addr_comp.c \ $(srcdir)/copy_princ.c \ $(srcdir)/copy_tick.c \ $(srcdir)/cp_key_cnt.c \ + $(srcdir)/crypto_glue.c \ $(srcdir)/decode_kdc.c \ $(srcdir)/decrypt_tk.c \ $(srcdir)/encode_kdc.c \ @@ -157,7 +161,12 @@ SRCS= $(srcdir)/addr_comp.c \ all-unix:: shared $(OBJS) all-mac:: shared $(OBJS) -all-windows:: $(OBJS) +all-windows:: $(OBJFILE) + +##DOS$(OBJFILE): $(OBJS) +##DOS $(RM) $(OBJFILE) +##WIN16## $(CP) nul: $(OBJFILE) +##WIN32## $(LIBECHO) -p $(MYNAME)\ *.obj > $(OBJFILE) shared: mkdir shared @@ -222,3 +231,4 @@ clean-unix:: clean-mac:: $(RM) shared/* clean-windows:: + $(RM) $(OBJFILE) diff --git a/src/lib/krb5/krb/auth_con.c b/src/lib/krb5/krb/auth_con.c index ec89182..b258b0d 100644 --- a/src/lib/krb5/krb/auth_con.c +++ b/src/lib/krb5/krb/auth_con.c @@ -26,10 +26,10 @@ actx_copy_addr(context, inad, outad) return 0; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_auth_con_init(context, auth_context) krb5_context context; - krb5_auth_context * auth_context; + krb5_auth_context FAR * auth_context; { *auth_context = (krb5_auth_context)malloc(sizeof(struct _krb5_auth_context)); @@ -48,7 +48,7 @@ krb5_auth_con_init(context, auth_context) return 0; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_auth_con_free(context, auth_context) krb5_context context; krb5_auth_context auth_context; @@ -172,18 +172,18 @@ krb5_auth_con_setports(context, auth_context, local_port, remote_port) * Once decrypted this key is no longer necessary and is then overwritten * with the session key sent by the client. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_auth_con_setuseruserkey(context, auth_context, keyblock) krb5_context context; krb5_auth_context auth_context; - krb5_keyblock * keyblock; + krb5_keyblock FAR * keyblock; { if (auth_context->keyblock) krb5_free_keyblock(context, auth_context->keyblock); return(krb5_copy_keyblock(context, keyblock, &(auth_context->keyblock))); } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_auth_con_getkey(context, auth_context, keyblock) krb5_context context; krb5_auth_context auth_context; @@ -195,11 +195,11 @@ krb5_auth_con_getkey(context, auth_context, keyblock) return 0; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_auth_con_getlocalsubkey(context, auth_context, keyblock) krb5_context context; krb5_auth_context auth_context; - krb5_keyblock ** keyblock; + krb5_keyblock FAR * FAR * keyblock; { if (auth_context->local_subkey) return krb5_copy_keyblock(context,auth_context->local_subkey,keyblock); @@ -207,11 +207,11 @@ krb5_auth_con_getlocalsubkey(context, auth_context, keyblock) return 0; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_auth_con_getremotesubkey(context, auth_context, keyblock) krb5_context context; krb5_auth_context auth_context; - krb5_keyblock ** keyblock; + krb5_keyblock FAR * FAR * keyblock; { if (auth_context->remote_subkey) return krb5_copy_keyblock(context,auth_context->remote_subkey,keyblock); @@ -219,7 +219,7 @@ krb5_auth_con_getremotesubkey(context, auth_context, keyblock) return 0; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_auth_con_set_req_cksumtype(context, auth_context, cksumtype) krb5_context context; krb5_auth_context auth_context; @@ -239,7 +239,7 @@ krb5_auth_con_set_safe_cksumtype(context, auth_context, cksumtype) return 0; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_auth_con_getlocalseqnumber(context, auth_context, seqnumber) krb5_context context; krb5_auth_context auth_context; @@ -249,21 +249,21 @@ krb5_auth_con_getlocalseqnumber(context, auth_context, seqnumber) return 0; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_auth_con_getauthenticator(context, auth_context, authenticator) krb5_context context; krb5_auth_context auth_context; - krb5_authenticator ** authenticator; + krb5_authenticator FAR * FAR * authenticator; { return (krb5_copy_authenticator(context, auth_context->authentp, authenticator)); } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_auth_con_getremoteseqnumber(context, auth_context, seqnumber) krb5_context context; krb5_auth_context auth_context; - krb5_int32 * seqnumber; + krb5_int32 FAR * seqnumber; { *seqnumber = auth_context->remote_seq_number; return 0; @@ -307,7 +307,7 @@ krb5_auth_con_getivector(context, auth_context, ivector) return 0; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_auth_con_setflags(context, auth_context, flags) krb5_context context; krb5_auth_context auth_context; @@ -317,11 +317,11 @@ krb5_auth_con_setflags(context, auth_context, flags) return 0; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_auth_con_getflags(context, auth_context, flags) krb5_context context; krb5_auth_context auth_context; - krb5_int32 * flags; + krb5_int32 FAR * flags; { *flags = auth_context->auth_context_flags; return 0; diff --git a/src/lib/krb5/krb/bld_pr_ext.c b/src/lib/krb5/krb/bld_pr_ext.c index 85c62c5..8b20175 100644 --- a/src/lib/krb5/krb/bld_pr_ext.c +++ b/src/lib/krb5/krb/bld_pr_ext.c @@ -32,15 +32,15 @@ #include <varargs.h> #endif -krb5_error_code INTERFACE_C +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV_C #ifdef HAVE_STDARG_H -krb5_build_principal_ext(krb5_context context, krb5_principal * princ, int rlen, const char * realm, ...) +krb5_build_principal_ext(krb5_context context, krb5_principal FAR * princ, int rlen, const char FAR * realm, ...) #else krb5_build_principal_ext(context, princ, rlen, realm, va_alist) krb5_context context; - krb5_principal *princ; + krb5_principal FAR *princ; int rlen; - const char *realm; + const char FAR *realm; va_dcl #endif { diff --git a/src/lib/krb5/krb/bld_princ.c b/src/lib/krb5/krb/bld_princ.c index d78fea5..364c234 100644 --- a/src/lib/krb5/krb/bld_princ.c +++ b/src/lib/krb5/krb/bld_princ.c @@ -96,7 +96,7 @@ krb5_build_principal_va(context, princ, rlen, realm, ap) return 0; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV_C #ifdef HAVE_STDARG_H krb5_build_principal(krb5_context context, krb5_principal * princ, int rlen, const char * realm, ...) diff --git a/src/lib/krb5/krb/conv_princ.c b/src/lib/krb5/krb/conv_princ.c index d11fac3..6a72abc 100644 --- a/src/lib/krb5/krb/conv_princ.c +++ b/src/lib/krb5/krb/conv_princ.c @@ -102,13 +102,13 @@ static char *strnchr(s, c, n) /* XXX This calls for a new error code */ #define KRB5_INVALID_PRINCIPAL KRB5_LNAME_BADFORMAT -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_524_conv_principal(context, princ, name, inst, realm) krb5_context context; const krb5_principal princ; - char *name; - char *inst; - char *realm; + char FAR *name; + char FAR *inst; + char FAR *realm; { const struct krb_convert *p; krb5_data *compo; @@ -170,13 +170,13 @@ krb5_524_conv_principal(context, princ, name, inst, realm) return 0; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_425_conv_principal(context, name, instance, realm, princ) krb5_context context; - const char *name; - const char *instance; - const char *realm; - krb5_principal *princ; + const char FAR *name; + const char FAR *instance; + const char FAR *realm; + krb5_principal FAR *princ; { const struct krb_convert *p; char buf[256]; /* V4 instances are limited to 40 characters */ diff --git a/src/lib/krb5/krb/copy_addrs.c b/src/lib/krb5/krb/copy_addrs.c index 4d93ebf..596a126 100644 --- a/src/lib/krb5/krb/copy_addrs.c +++ b/src/lib/krb5/krb/copy_addrs.c @@ -26,11 +26,11 @@ #include "k5-int.h" -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_copy_addr(context, inad, outad) krb5_context context; -const krb5_address *inad; -krb5_address **outad; + const krb5_address FAR *inad; + krb5_address FAR * FAR *outad; { krb5_address *tmpad; @@ -53,11 +53,11 @@ krb5_address **outad; /* * Copy an address array, with fresh allocation. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_copy_addresses(context, inaddr, outaddr) krb5_context context; - krb5_address * const * inaddr; - krb5_address ***outaddr; + krb5_address FAR * const FAR * inaddr; + krb5_address FAR * FAR * FAR *outaddr; { krb5_error_code retval; krb5_address ** tempaddr; diff --git a/src/lib/krb5/krb/copy_athctr.c b/src/lib/krb5/krb/copy_athctr.c index d162fb2..e2bec67 100644 --- a/src/lib/krb5/krb/copy_athctr.c +++ b/src/lib/krb5/krb/copy_athctr.c @@ -26,11 +26,11 @@ #include "k5-int.h" -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_copy_authenticator(context, authfrom, authto) krb5_context context; -const krb5_authenticator *authfrom; -krb5_authenticator **authto; + const krb5_authenticator FAR *authfrom; + krb5_authenticator FAR *FAR *authto; { krb5_error_code retval; krb5_authenticator *tempto; diff --git a/src/lib/krb5/krb/copy_auth.c b/src/lib/krb5/krb/copy_auth.c index 759608c..7594b91 100644 --- a/src/lib/krb5/krb/copy_auth.c +++ b/src/lib/krb5/krb/copy_auth.c @@ -53,11 +53,11 @@ krb5_authdata **outad; /* * Copy an authdata array, with fresh allocation. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_copy_authdata(context, inauthdat, outauthdat) krb5_context context; -krb5_authdata * const * inauthdat; -krb5_authdata ***outauthdat; + krb5_authdata FAR * const FAR * inauthdat; + krb5_authdata FAR * FAR * FAR *outauthdat; { krb5_error_code retval; krb5_authdata ** tempauthdat; diff --git a/src/lib/krb5/krb/copy_cksum.c b/src/lib/krb5/krb/copy_cksum.c index c0bf8a2..8adc82a 100644 --- a/src/lib/krb5/krb/copy_cksum.c +++ b/src/lib/krb5/krb/copy_cksum.c @@ -26,11 +26,11 @@ #include "k5-int.h" -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_copy_checksum(context, ckfrom, ckto) krb5_context context; - const krb5_checksum *ckfrom; - krb5_checksum **ckto; + const krb5_checksum FAR *ckfrom; + krb5_checksum FAR * FAR *ckto; { krb5_checksum *tempto; diff --git a/src/lib/krb5/krb/copy_creds.c b/src/lib/krb5/krb/copy_creds.c index 712ca38..a8fea11 100644 --- a/src/lib/krb5/krb/copy_creds.c +++ b/src/lib/krb5/krb/copy_creds.c @@ -30,7 +30,7 @@ * Copy credentials, allocating fresh storage where needed. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_copy_creds(context, incred, outcred) krb5_context context; const krb5_creds *incred; diff --git a/src/lib/krb5/krb/copy_data.c b/src/lib/krb5/krb/copy_data.c index fb2e870..df4f783 100644 --- a/src/lib/krb5/krb/copy_data.c +++ b/src/lib/krb5/krb/copy_data.c @@ -29,11 +29,11 @@ /* * Copy a data structure, with fresh allocation. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_copy_data(context, indata, outdata) krb5_context context; - const krb5_data *indata; - krb5_data **outdata; + const krb5_data FAR *indata; + krb5_data FAR * FAR *outdata; { krb5_data *tempdata; diff --git a/src/lib/krb5/krb/copy_key.c b/src/lib/krb5/krb/copy_key.c index e71f399..39fcb7d 100644 --- a/src/lib/krb5/krb/copy_key.c +++ b/src/lib/krb5/krb/copy_key.c @@ -29,11 +29,11 @@ /* * Copy a keyblock, including alloc'ed storage. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_copy_keyblock(context, from, to) krb5_context context; - const krb5_keyblock *from; - krb5_keyblock **to; + const krb5_keyblock FAR *from; + krb5_keyblock FAR * FAR *to; { krb5_keyblock *new_key; diff --git a/src/lib/krb5/krb/copy_princ.c b/src/lib/krb5/krb/copy_princ.c index 4dbf44e..2a4025e 100644 --- a/src/lib/krb5/krb/copy_princ.c +++ b/src/lib/krb5/krb/copy_princ.c @@ -29,11 +29,11 @@ /* * Copy a principal structure, with fresh allocation. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_copy_principal(context, inprinc, outprinc) krb5_context context; krb5_const_principal inprinc; - krb5_principal *outprinc; + krb5_principal FAR *outprinc; { register krb5_principal tempprinc; register int i, nelems; diff --git a/src/lib/krb5/krb/copy_tick.c b/src/lib/krb5/krb/copy_tick.c index a4dbed4..9235db1 100644 --- a/src/lib/krb5/krb/copy_tick.c +++ b/src/lib/krb5/krb/copy_tick.c @@ -95,7 +95,7 @@ krb5_copy_enc_tkt_part(context, partfrom, partto) return 0; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_copy_ticket(context, from, pto) krb5_context context; const krb5_ticket *from; diff --git a/src/lib/krb5/krb/cp_key_cnt.c b/src/lib/krb5/krb/cp_key_cnt.c index fd32cae..6cc6ef8 100644 --- a/src/lib/krb5/krb/cp_key_cnt.c +++ b/src/lib/krb5/krb/cp_key_cnt.c @@ -29,11 +29,11 @@ /* * Copy a keyblock, including alloc'ed storage. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_copy_keyblock_contents(context, from, to) krb5_context context; - const krb5_keyblock *from; - krb5_keyblock *to; + const krb5_keyblock FAR *from; + krb5_keyblock FAR *to; { *to = *from; to->contents = (krb5_octet *)malloc(to->length); diff --git a/src/lib/krb5/krb/crypto_glue.c b/src/lib/krb5/krb/crypto_glue.c new file mode 100644 index 0000000..615adc6 --- /dev/null +++ b/src/lib/krb5/krb/crypto_glue.c @@ -0,0 +1,233 @@ +/* + * lib/krb5/krb/crypto_glue.c + * + * Copyright 1996 by the Massachusetts Institute of Technology. + * All Rights Reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + * + * Exported routines: + * krb5_use_enctype() + * krb5_checksum_size() + * krb5_encrypt_size() + * krb5_calculate_checksum() + * krb5_verify_checksum() + * krb5_encrypt() + * krb5_decrypt() + * krb5_process_key() + * krb5_finish_key() + * krb5_string_to_key() + * krb5_init_random_key() + * krb5_finish_random_key() + * krb5_random_key() + * krb5_eblock_enctype() + * + * Internal library routines: + * is_coll_proof_cksum() + * is_keyed_cksum() + * valid_cksumtype() + * valid_enctype() + */ + +#include "k5-int.h" + + +KRB5_DLLIMP size_t KRB5_CALLCONV +krb5_encrypt_size(length, crypto) + krb5_const size_t length; + krb5_const krb5_cryptosystem_entry FAR * crypto; +{ + return krb5_roundup(length + crypto->pad_minimum, crypto->block_length); +} + +krb5_boolean KRB5_CALLCONV +valid_enctype(ktype) + krb5_const krb5_enctype ktype; +{ + return ((ktype<=krb5_max_enctype) && (ktype>0) && krb5_enctype_array[ktype]); +} + +krb5_boolean KRB5_CALLCONV +valid_cksumtype(cktype) + krb5_const krb5_cksumtype cktype; +{ + return ((cktype<=krb5_max_cksum) && (cktype>0) && krb5_cksumarray[cktype]); +} + +krb5_boolean KRB5_CALLCONV +is_coll_proof_cksum(cktype) + krb5_const krb5_cksumtype cktype; +{ + return(krb5_cksumarray[cktype]->is_collision_proof); +} + +krb5_boolean KRB5_CALLCONV +is_keyed_cksum(cktype) + krb5_const krb5_cksumtype cktype; +{ + return (krb5_cksumarray[cktype]->uses_key); +} + +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_use_enctype(context, eblock, enctype) + krb5_context context; + krb5_encrypt_block FAR * eblock; + krb5_const krb5_enctype enctype; +{ + eblock->crypto_entry = krb5_enctype_array[(enctype)]->system; + return 0; +} + +KRB5_DLLIMP size_t KRB5_CALLCONV +krb5_checksum_size(context, cktype) + krb5_context context; + krb5_const krb5_cksumtype cktype; +{ + return krb5_cksumarray[cktype]->checksum_length; +} + +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_calculate_checksum(context, cktype, in, in_length, seed, seed_length, outcksum) + krb5_context context; + krb5_const krb5_cksumtype cktype; + krb5_pointer in; + krb5_const size_t in_length; + krb5_const krb5_pointer seed; + krb5_const size_t seed_length; + krb5_checksum FAR *outcksum; +{ + return krb5_x(((*krb5_cksumarray[cktype]->sum_func)), + (in, in_length, seed, seed_length, outcksum)); +} + +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_verify_checksum(context, cktype, cksum, in, in_length, seed, seed_length) + krb5_context context; + krb5_const krb5_cksumtype cktype; + krb5_const krb5_checksum FAR *cksum; + krb5_const krb5_pointer in; + krb5_const size_t in_length; + krb5_const krb5_pointer seed; + krb5_const size_t seed_length; +{ + return krb5_x((*krb5_cksumarray[cktype]->sum_verf_func), + (cksum, in, in_length, seed, seed_length)); +} + +KRB5_DLLIMP krb5_enctype KRB5_CALLCONV +krb5_eblock_enctype(context, eblock) + krb5_context context; + krb5_const krb5_encrypt_block FAR * eblock; +{ + return eblock->crypto_entry->proto_enctype; +} + +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_encrypt(context, inptr, outptr, size, eblock, ivec) + krb5_context context; + krb5_const krb5_pointer inptr; + krb5_pointer outptr; + krb5_const size_t size; + krb5_encrypt_block FAR * eblock; + krb5_pointer ivec; +{ + return krb5_x(eblock->crypto_entry->encrypt_func, + (inptr, outptr, size, eblock, ivec)); +} + + +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_decrypt(context, inptr, outptr, size, eblock, ivec) + krb5_context context; + krb5_const krb5_pointer inptr; + krb5_pointer outptr; + krb5_const size_t size; + krb5_encrypt_block FAR * eblock; + krb5_pointer ivec; +{ + return krb5_x(eblock->crypto_entry->decrypt_func, + (inptr, outptr, size, eblock, ivec)); +} + + +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_process_key(context, eblock, key) + krb5_context context; + krb5_encrypt_block FAR * eblock; + krb5_const krb5_keyblock FAR * key; +{ + return krb5_x(eblock->crypto_entry->process_key, + (eblock, key)); +} + +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_finish_key(context, eblock) + krb5_context context; + krb5_encrypt_block FAR * eblock; +{ + return krb5_x(eblock->crypto_entry->finish_key,(eblock)); +} + + +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_string_to_key(context, eblock, keyblock, data, princ) + krb5_context context; + krb5_const krb5_encrypt_block FAR * eblock; + krb5_keyblock FAR * keyblock; + krb5_const krb5_data FAR * data; + krb5_const krb5_data FAR * princ; +{ + return krb5_x(eblock->crypto_entry->string_to_key, + (eblock, keyblock, data, princ)); +} + + +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_init_random_key(context, eblock, keyblock, ptr) + krb5_context context; + krb5_const krb5_encrypt_block FAR * eblock; + krb5_const krb5_keyblock FAR * keyblock; + krb5_pointer FAR * ptr; +{ + return krb5_x(eblock->crypto_entry->init_random_key, + (eblock, keyblock, ptr)); +} + + +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_finish_random_key(context, eblock, ptr) + krb5_context context; + krb5_const krb5_encrypt_block FAR * eblock; + krb5_pointer FAR * ptr; +{ + return krb5_x(eblock->crypto_entry->finish_random_key, + (eblock, ptr)); +} + + +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_random_key(context, eblock, ptr, keyblock) + krb5_context context; + krb5_const krb5_encrypt_block FAR * eblock; + krb5_pointer ptr; + krb5_keyblock FAR * FAR * keyblock; +{ + return krb5_x(eblock->crypto_entry->random_key, + (eblock, ptr, keyblock)); +} + + diff --git a/src/lib/krb5/krb/decrypt_tk.c b/src/lib/krb5/krb/decrypt_tk.c index f8850b1..354a3f2 100644 --- a/src/lib/krb5/krb/decrypt_tk.c +++ b/src/lib/krb5/krb/decrypt_tk.c @@ -35,11 +35,11 @@ */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_decrypt_tkt_part(context, srv_key, ticket) krb5_context context; - const krb5_keyblock *srv_key; - register krb5_ticket *ticket; + const krb5_keyblock FAR *srv_key; + register krb5_ticket FAR *ticket; { krb5_enc_tkt_part *dec_tkt_part; krb5_encrypt_block eblock; diff --git a/src/lib/krb5/krb/encrypt_tk.c b/src/lib/krb5/krb/encrypt_tk.c index 6203b78..cb1fb28 100644 --- a/src/lib/krb5/krb/encrypt_tk.c +++ b/src/lib/krb5/krb/encrypt_tk.c @@ -57,7 +57,7 @@ krb5_encrypt_tkt_part(context, srv_key, dec_ticket) #define cleanup_scratch() { (void) memset(scratch->data, 0, scratch->length); \ krb5_free_data(context, scratch); } - krb5_use_enctype(kdc_context, &eblock, srv_key->enctype); + krb5_use_enctype(context, &eblock, srv_key->enctype); dec_ticket->enc_part.ciphertext.length = krb5_encrypt_size(scratch->length, eblock.crypto_entry); diff --git a/src/lib/krb5/krb/fwd_tgt.c b/src/lib/krb5/krb/fwd_tgt.c index 6e10ad2..ed95b75 100644 --- a/src/lib/krb5/krb/fwd_tgt.c +++ b/src/lib/krb5/krb/fwd_tgt.c @@ -29,17 +29,17 @@ #define flags2options(flags) (flags & KDC_TKT_COMMON_MASK) /* Get a TGT for use at the remote host */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_fwd_tgt_creds(context, auth_context, rhost, client, server, cc, forwardable, outbuf) krb5_context context; krb5_auth_context auth_context; - char *rhost; + char FAR *rhost; krb5_principal client; krb5_principal server; krb5_ccache cc; int forwardable; /* Should forwarded TGT also be forwardable? */ - krb5_data *outbuf; + krb5_data FAR *outbuf; { krb5_replay_data replaydata; krb5_data * scratch = 0; @@ -143,6 +143,3 @@ errout: krb5_free_cred_contents(context, &tgt); return retval; } - - - diff --git a/src/lib/krb5/krb/gc_via_tkt.c b/src/lib/krb5/krb/gc_via_tkt.c index 0ee9197..2ea4fc8 100644 --- a/src/lib/krb5/krb/gc_via_tkt.c +++ b/src/lib/krb5/krb/gc_via_tkt.c @@ -98,7 +98,7 @@ cleanup: return retval; } -krb5_error_code INTERFACE +krb5_error_code krb5_get_cred_via_tkt (context, tkt, kdcoptions, address, in_cred, out_cred) krb5_context context; krb5_creds * tkt; diff --git a/src/lib/krb5/krb/get_creds.c b/src/lib/krb5/krb/get_creds.c index 4ff62f1..3e2885d 100644 --- a/src/lib/krb5/krb/get_creds.c +++ b/src/lib/krb5/krb/get_creds.c @@ -87,13 +87,13 @@ krb5_get_credentials_core(context, options, ccache, in_creds, out_creds, return 0; } -krb5_error_code INTERFACE +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_get_credentials(context, options, ccache, in_creds, out_creds) krb5_context context; const krb5_flags options; krb5_ccache ccache; - krb5_creds *in_creds; - krb5_creds **out_creds; + krb5_creds FAR *in_creds; + krb5_creds FAR * FAR *out_creds; { krb5_error_code retval; krb5_creds mcreds; @@ -195,7 +195,7 @@ krb5_get_credentials_val_renew_core(context, options, ccache, return retval; } -krb5_error_code INTERFACE +krb5_error_code krb5_get_credentials_validate(context, options, ccache, in_creds, out_creds) krb5_context context; const krb5_flags options; @@ -208,7 +208,7 @@ krb5_get_credentials_validate(context, options, ccache, in_creds, out_creds) INT_GC_VALIDATE)); } -krb5_error_code INTERFACE +krb5_error_code krb5_get_credentials_renew(context, options, ccache, in_creds, out_creds) krb5_context context; const krb5_flags options; diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c index 048a56c..8d42b2d 100644 --- a/src/lib/krb5/krb/get_in_tkt.c +++ b/src/lib/krb5/krb/get_in_tkt.c @@ -361,21 +361,21 @@ make_preauth_list(context, ptypes, ret_list) #define MAX_IN_TKT_LOOPS 16 -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_get_in_tkt(context, options, addrs, ktypes, ptypes, key_proc, keyseed, decrypt_proc, decryptarg, creds, ccache, ret_as_reply) krb5_context context; const krb5_flags options; - krb5_address * const * addrs; - krb5_enctype * ktypes; - krb5_preauthtype * ptypes; + krb5_address FAR * const FAR * addrs; + krb5_enctype FAR * ktypes; + krb5_preauthtype FAR * ptypes; git_key_proc key_proc; krb5_const_pointer keyseed; git_decrypt_proc decrypt_proc; krb5_const_pointer decryptarg; - krb5_creds * creds; + krb5_creds FAR * creds; krb5_ccache ccache; - krb5_kdc_rep ** ret_as_reply; + krb5_kdc_rep FAR * FAR * ret_as_reply; { krb5_error_code retval; krb5_timestamp time_now; diff --git a/src/lib/krb5/krb/in_tkt_ktb.c b/src/lib/krb5/krb/in_tkt_ktb.c index 257ecce..0c901c1 100644 --- a/src/lib/krb5/krb/in_tkt_ktb.c +++ b/src/lib/krb5/krb/in_tkt_ktb.c @@ -105,18 +105,18 @@ cleanup: returns system errors, encryption errors */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_keytab(context, options, addrs, ktypes, pre_auth_types, keytab, ccache, creds, ret_as_reply) krb5_context context; const krb5_flags options; - krb5_address * const * addrs; - krb5_enctype * ktypes; - krb5_preauthtype * pre_auth_types; + krb5_address FAR * const FAR * addrs; + krb5_enctype FAR * ktypes; + krb5_preauthtype FAR * pre_auth_types; const krb5_keytab keytab; krb5_ccache ccache; - krb5_creds * creds; - krb5_kdc_rep ** ret_as_reply; + krb5_creds FAR * creds; + krb5_kdc_rep FAR *FAR * ret_as_reply; { struct keytab_keyproc_arg arg; diff --git a/src/lib/krb5/krb/in_tkt_pwd.c b/src/lib/krb5/krb/in_tkt_pwd.c index 52ef240..7373f62 100644 --- a/src/lib/krb5/krb/in_tkt_pwd.c +++ b/src/lib/krb5/krb/in_tkt_pwd.c @@ -97,18 +97,18 @@ pwd_keyproc(context, type, salt, keyseed, key) returns system errors, encryption errors */ -krb5_error_code INTERFACE +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_password(context, options, addrs, ktypes, pre_auth_types, password, ccache, creds, ret_as_reply) krb5_context context; const krb5_flags options; - krb5_address * const * addrs; - krb5_enctype * ktypes; - krb5_preauthtype * pre_auth_types; - const char * password; + krb5_address FAR * const FAR * addrs; + krb5_enctype FAR * ktypes; + krb5_preauthtype FAR * pre_auth_types; + const char FAR * password; krb5_ccache ccache; - krb5_creds * creds; - krb5_kdc_rep ** ret_as_reply; + krb5_creds FAR * creds; + krb5_kdc_rep FAR * FAR * ret_as_reply; { krb5_error_code retval; krb5_data data; diff --git a/src/lib/krb5/krb/in_tkt_sky.c b/src/lib/krb5/krb/in_tkt_sky.c index 9e4bea0..3c7a0cd 100644 --- a/src/lib/krb5/krb/in_tkt_sky.c +++ b/src/lib/krb5/krb/in_tkt_sky.c @@ -94,18 +94,18 @@ skey_keyproc(context, type, salt, keyseed, key) returns system errors, encryption errors */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_skey(context, options, addrs, ktypes, pre_auth_types, key, ccache, creds, ret_as_reply) krb5_context context; const krb5_flags options; - krb5_address * const * addrs; - krb5_enctype * ktypes; - krb5_preauthtype * pre_auth_types; - const krb5_keyblock * key; + krb5_address FAR * const FAR * addrs; + krb5_enctype FAR * ktypes; + krb5_preauthtype FAR * pre_auth_types; + const krb5_keyblock FAR * key; krb5_ccache ccache; - krb5_creds * creds; - krb5_kdc_rep ** ret_as_reply; + krb5_creds FAR * creds; + krb5_kdc_rep FAR * FAR * ret_as_reply; { if (key) diff --git a/src/lib/krb5/krb/init_ctx.c b/src/lib/krb5/krb/init_ctx.c index 9daa7f8..fe725af 100644 --- a/src/lib/krb5/krb/init_ctx.c +++ b/src/lib/krb5/krb/init_ctx.c @@ -31,7 +31,7 @@ extern krb5_error_code krb5_vercheck(); #endif -krb5_error_code INTERFACE +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_init_context(context) krb5_context *context; { @@ -139,7 +139,7 @@ cleanup: return retval; } -void +KRB5_DLLIMP void KRB5_CALLCONV krb5_free_context(ctx) krb5_context ctx; { diff --git a/src/lib/krb5/krb/mk_cred.c b/src/lib/krb5/krb/mk_cred.c index 11c6a1d..7640e7a 100644 --- a/src/lib/krb5/krb/mk_cred.c +++ b/src/lib/krb5/krb/mk_cred.c @@ -198,14 +198,14 @@ cleanup: * This functions takes as input an array of krb5_credentials, and * outputs an encoded KRB_CRED message suitable for krb5_rd_cred */ -krb5_error_code INTERFACE +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_mk_ncred(context, auth_context, ppcreds, ppdata, outdata) krb5_context context; krb5_auth_context auth_context; - krb5_creds ** ppcreds; - krb5_data ** ppdata; - krb5_replay_data * outdata; + krb5_creds FAR * FAR * ppcreds; + krb5_data FAR * FAR * ppdata; + krb5_replay_data FAR * outdata; { krb5_address * premote_fulladdr = NULL; krb5_address * plocal_fulladdr = NULL; @@ -346,13 +346,13 @@ error: /* * A convenience function that calls krb5_mk_ncred. */ -krb5_error_code INTERFACE +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_mk_1cred(context, auth_context, pcreds, ppdata, outdata) krb5_context context; krb5_auth_context auth_context; - krb5_creds * pcreds; - krb5_data ** ppdata; - krb5_replay_data * outdata; + krb5_creds FAR * pcreds; + krb5_data FAR * FAR * ppdata; + krb5_replay_data FAR * outdata; { krb5_error_code retval; krb5_creds **ppcreds; diff --git a/src/lib/krb5/krb/mk_error.c b/src/lib/krb5/krb/mk_error.c index 292ffea..77e502f 100644 --- a/src/lib/krb5/krb/mk_error.c +++ b/src/lib/krb5/krb/mk_error.c @@ -34,11 +34,11 @@ returns system errors */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_mk_error(context, dec_err, enc_err) krb5_context context; - const krb5_error *dec_err; - krb5_data *enc_err; + const krb5_error FAR *dec_err; + krb5_data FAR *enc_err; { krb5_error_code retval; krb5_data *new_enc_err; diff --git a/src/lib/krb5/krb/mk_priv.c b/src/lib/krb5/krb/mk_priv.c index dabfd8d..7986e18 100644 --- a/src/lib/krb5/krb/mk_priv.c +++ b/src/lib/krb5/krb/mk_priv.c @@ -133,13 +133,13 @@ clean_scratch: } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_mk_priv(context, auth_context, userdata, outbuf, outdata) krb5_context context; krb5_auth_context auth_context; - const krb5_data * userdata; - krb5_data * outbuf; - krb5_replay_data * outdata; + const krb5_data FAR * userdata; + krb5_data FAR * outbuf; + krb5_replay_data FAR * outdata; { krb5_error_code retval; krb5_keyblock * keyblock; diff --git a/src/lib/krb5/krb/mk_rep.c b/src/lib/krb5/krb/mk_rep.c index b1c17b6..4578428 100644 --- a/src/lib/krb5/krb/mk_rep.c +++ b/src/lib/krb5/krb/mk_rep.c @@ -36,11 +36,11 @@ returns system errors */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_mk_rep(context, auth_context, outbuf) krb5_context context; krb5_auth_context auth_context; - krb5_data * outbuf; + krb5_data FAR * outbuf; { krb5_error_code retval; krb5_enctype enctype; diff --git a/src/lib/krb5/krb/mk_req.c b/src/lib/krb5/krb/mk_req.c index e793b95..a454a57 100644 --- a/src/lib/krb5/krb/mk_req.c +++ b/src/lib/krb5/krb/mk_req.c @@ -46,17 +46,17 @@ returns system errors */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_mk_req(context, auth_context, ap_req_options, service, hostname, in_data, ccache, outbuf) krb5_context context; - krb5_auth_context * auth_context; + krb5_auth_context FAR * auth_context; const krb5_flags ap_req_options; - char * service; - char * hostname; - krb5_data * in_data; + char FAR * service; + char FAR * hostname; + krb5_data FAR * in_data; krb5_ccache ccache; - krb5_data * outbuf; + krb5_data FAR * outbuf; { krb5_error_code retval; krb5_principal server; diff --git a/src/lib/krb5/krb/mk_req_ext.c b/src/lib/krb5/krb/mk_req_ext.c index 733dd31..3bec52e 100644 --- a/src/lib/krb5/krb/mk_req_ext.c +++ b/src/lib/krb5/krb/mk_req_ext.c @@ -67,15 +67,15 @@ krb5_generate_authenticator PROTOTYPE((krb5_context, const krb5_checksum *, krb5_keyblock *, krb5_int32, krb5_authdata ** )); -krb5_error_code INTERFACE +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_mk_req_extended(context, auth_context, ap_req_options, in_data, in_creds, outbuf) krb5_context context; - krb5_auth_context * auth_context; + krb5_auth_context FAR * auth_context; const krb5_flags ap_req_options; - krb5_data * in_data; - krb5_creds * in_creds; - krb5_data * outbuf; + krb5_data FAR * in_data; + krb5_creds FAR * in_creds; + krb5_data FAR * outbuf; { krb5_error_code retval; krb5_checksum checksum; diff --git a/src/lib/krb5/krb/mk_safe.c b/src/lib/krb5/krb/mk_safe.c index dfa253a..1a44a75 100644 --- a/src/lib/krb5/krb/mk_safe.c +++ b/src/lib/krb5/krb/mk_safe.c @@ -119,13 +119,13 @@ cleanup_scratch: return retval; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_mk_safe(context, auth_context, userdata, outbuf, outdata) krb5_context context; krb5_auth_context auth_context; - const krb5_data * userdata; - krb5_data * outbuf; - krb5_replay_data * outdata; + const krb5_data FAR * userdata; + krb5_data FAR * outbuf; + krb5_replay_data FAR * outdata; { krb5_error_code retval; krb5_keyblock * keyblock; diff --git a/src/lib/krb5/krb/parse.c b/src/lib/krb5/krb/parse.c index 0b41a20..3b2305f 100644 --- a/src/lib/krb5/krb/parse.c +++ b/src/lib/krb5/krb/parse.c @@ -60,11 +60,11 @@ * May the fleas of a thousand camels infest the ISO, they who think * that arbitrarily large multi-component names are a Good Thing..... */ -krb5_error_code INTERFACE +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_parse_name(context, name, nprincipal) krb5_context context; - const char *name; - krb5_principal *nprincipal; + const char FAR *name; + krb5_principal FAR *nprincipal; { register const char *cp; register char *q; diff --git a/src/lib/krb5/krb/princ_comp.c b/src/lib/krb5/krb/princ_comp.c index 35c5847..635d22c 100644 --- a/src/lib/krb5/krb/princ_comp.c +++ b/src/lib/krb5/krb/princ_comp.c @@ -43,7 +43,7 @@ krb5_realm_compare(context, princ1, princ2) return TRUE; } -krb5_boolean +KRB5_DLLIMP krb5_boolean KRB5_CALLCONV krb5_principal_compare(context, princ1, princ2) krb5_context context; krb5_const_principal princ1; diff --git a/src/lib/krb5/krb/rd_cred.c b/src/lib/krb5/krb/rd_cred.c index 874960b..05eb7d7 100644 --- a/src/lib/krb5/krb/rd_cred.c +++ b/src/lib/krb5/krb/rd_cred.c @@ -225,13 +225,13 @@ cleanup_cred: * This functions takes as input an KRB_CRED message, validates it, and * outputs the nonce and an array of the forwarded credentials. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_rd_cred(context, auth_context, pcreddata, pppcreds, outdata) krb5_context context; krb5_auth_context auth_context; - krb5_data * pcreddata; - krb5_creds *** pppcreds; - krb5_replay_data * outdata; + krb5_data FAR * pcreddata; + krb5_creds FAR * FAR * FAR * pppcreds; + krb5_replay_data FAR * outdata; { krb5_error_code retval; krb5_keyblock * keyblock; diff --git a/src/lib/krb5/krb/rd_error.c b/src/lib/krb5/krb/rd_error.c index bf07539..7f8e422 100644 --- a/src/lib/krb5/krb/rd_error.c +++ b/src/lib/krb5/krb/rd_error.c @@ -36,11 +36,11 @@ * returns system errors */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_rd_error(context, enc_errbuf, dec_error) krb5_context context; - const krb5_data *enc_errbuf; - krb5_error **dec_error; + const krb5_data FAR *enc_errbuf; + krb5_error FAR * FAR *dec_error; { if (!krb5_is_krb_error(enc_errbuf)) return KRB5KRB_AP_ERR_MSG_TYPE; diff --git a/src/lib/krb5/krb/rd_priv.c b/src/lib/krb5/krb/rd_priv.c index 7acb6f3..e6c0fe3 100644 --- a/src/lib/krb5/krb/rd_priv.c +++ b/src/lib/krb5/krb/rd_priv.c @@ -170,13 +170,13 @@ cleanup_privmsg:; return retval; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_rd_priv(context, auth_context, inbuf, outbuf, outdata) krb5_context context; krb5_auth_context auth_context; - const krb5_data * inbuf; - krb5_data * outbuf; - krb5_replay_data * outdata; + const krb5_data FAR * inbuf; + krb5_data FAR * outbuf; + krb5_replay_data FAR * outdata; { krb5_error_code retval; krb5_keyblock * keyblock; diff --git a/src/lib/krb5/krb/rd_rep.c b/src/lib/krb5/krb/rd_rep.c index 13e8363..d4d559d 100644 --- a/src/lib/krb5/krb/rd_rep.c +++ b/src/lib/krb5/krb/rd_rep.c @@ -38,12 +38,12 @@ * returns system errors, encryption errors, replay errors */ -krb5_error_code INTERFACE +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_rd_rep(context, auth_context, inbuf, repl) krb5_context context; krb5_auth_context auth_context; - const krb5_data * inbuf; - krb5_ap_rep_enc_part **repl; + const krb5_data FAR * inbuf; + krb5_ap_rep_enc_part FAR * FAR *repl; { krb5_error_code retval; krb5_ap_rep * reply; diff --git a/src/lib/krb5/krb/rd_req.c b/src/lib/krb5/krb/rd_req.c index e46b3bd..7fbe172 100644 --- a/src/lib/krb5/krb/rd_req.c +++ b/src/lib/krb5/krb/rd_req.c @@ -42,16 +42,16 @@ * returns system errors, encryption errors, replay errors */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_rd_req(context, auth_context, inbuf, server, keytab, ap_req_options, ticket) krb5_context context; - krb5_auth_context * auth_context; - const krb5_data * inbuf; + krb5_auth_context FAR * auth_context; + const krb5_data FAR * inbuf; krb5_const_principal server; /* XXX do we really need this */ krb5_keytab keytab; - krb5_flags * ap_req_options; - krb5_ticket ** ticket; + krb5_flags FAR * ap_req_options; + krb5_ticket FAR *FAR * ticket; { krb5_error_code retval; krb5_ap_req * request; diff --git a/src/lib/krb5/krb/rd_safe.c b/src/lib/krb5/krb/rd_safe.c index 7298605..9f23ff3 100644 --- a/src/lib/krb5/krb/rd_safe.c +++ b/src/lib/krb5/krb/rd_safe.c @@ -147,13 +147,13 @@ cleanup: return retval; } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_rd_safe(context, auth_context, inbuf, outbuf, outdata) krb5_context context; krb5_auth_context auth_context; - const krb5_data * inbuf; - krb5_data * outbuf; - krb5_replay_data * outdata; + const krb5_data FAR * inbuf; + krb5_data FAR * outbuf; + krb5_replay_data FAR * outdata; { krb5_error_code retval; krb5_keyblock * keyblock; diff --git a/src/lib/krb5/krb/recvauth.c b/src/lib/krb5/krb/recvauth.c index d5e7b5f..5bde73a 100644 --- a/src/lib/krb5/krb/recvauth.c +++ b/src/lib/krb5/krb/recvauth.c @@ -34,20 +34,20 @@ static char *sendauth_version = "KRB5_SENDAUTH_V1.0"; -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_recvauth(context, auth_context, /* IN */ fd, appl_version, server, flags, keytab, /* OUT */ ticket) krb5_context context; - krb5_auth_context * auth_context; + krb5_auth_context FAR * auth_context; krb5_pointer fd; - char * appl_version; + char FAR * appl_version; krb5_principal server; krb5_int32 flags; krb5_keytab keytab; - krb5_ticket ** ticket; + krb5_ticket FAR * FAR * ticket; { krb5_auth_context new_auth_context; krb5_flags ap_option; diff --git a/src/lib/krb5/krb/sendauth.c b/src/lib/krb5/krb/sendauth.c index d77afdc..54a9ac0 100644 --- a/src/lib/krb5/krb/sendauth.c +++ b/src/lib/krb5/krb/sendauth.c @@ -35,7 +35,7 @@ static char *sendauth_version = "KRB5_SENDAUTH_V1.0"; -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_sendauth(context, auth_context, /* IN */ fd, appl_version, client, server, ap_req_options, in_data, @@ -45,18 +45,18 @@ krb5_sendauth(context, auth_context, /* OUT */ error, rep_result, out_creds) krb5_context context; - krb5_auth_context * auth_context; + krb5_auth_context FAR * auth_context; krb5_pointer fd; - char * appl_version; + char FAR * appl_version; krb5_principal client; krb5_principal server; krb5_flags ap_req_options; - krb5_data * in_data; - krb5_creds * in_creds; + krb5_data FAR * in_data; + krb5_creds FAR * in_creds; krb5_ccache ccache; - krb5_error ** error; - krb5_ap_rep_enc_part ** rep_result; - krb5_creds ** out_creds; + krb5_error FAR * FAR * error; + krb5_ap_rep_enc_part FAR * FAR * rep_result; + krb5_creds FAR * FAR * out_creds; { krb5_octet result; krb5_creds creds; diff --git a/src/lib/krb5/krb/ser_actx.c b/src/lib/krb5/krb/ser_actx.c index 8be618a..5705b71 100644 --- a/src/lib/krb5/krb/ser_actx.c +++ b/src/lib/krb5/krb/ser_actx.c @@ -541,7 +541,7 @@ krb5_auth_context_internalize(kcontext, argp, buffer, lenremain) /* * Register the auth_context serializer. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_ser_auth_context_init(kcontext) krb5_context kcontext; { diff --git a/src/lib/krb5/krb/ser_ctx.c b/src/lib/krb5/krb/ser_ctx.c index 2bdb1ad..13392a7 100644 --- a/src/lib/krb5/krb/ser_ctx.c +++ b/src/lib/krb5/krb/ser_ctx.c @@ -633,7 +633,7 @@ krb5_oscontext_internalize(kcontext, argp, buffer, lenremain) /* * Register the context serializers. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_ser_context_init(kcontext) krb5_context kcontext; { diff --git a/src/lib/krb5/krb/serialize.c b/src/lib/krb5/krb/serialize.c index 392caf4..084ecb6 100644 --- a/src/lib/krb5/krb/serialize.c +++ b/src/lib/krb5/krb/serialize.c @@ -91,7 +91,7 @@ krb5_register_serializer(kcontext, entry) * krb5_size_opaque() - Determine the size necessary to serialize a given * piece of opaque data. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_size_opaque(kcontext, odtype, arg, sizep) krb5_context kcontext; krb5_magic odtype; @@ -111,13 +111,13 @@ krb5_size_opaque(kcontext, odtype, arg, sizep) /* * krb5_externalize_opaque() - Externalize a piece of opaque data. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_externalize_opaque(kcontext, odtype, arg, bufpp, sizep) krb5_context kcontext; krb5_magic odtype; krb5_pointer arg; - krb5_octet **bufpp; - size_t *sizep; + krb5_octet FAR * FAR *bufpp; + size_t FAR *sizep; { krb5_error_code kret; krb5_ser_handle shandle; @@ -172,13 +172,13 @@ krb5_externalize_data(kcontext, arg, bufpp, sizep) * krb5_internalize_opaque() - Convert external representation into a data * structure. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_internalize_opaque(kcontext, odtype, argp, bufpp, sizep) krb5_context kcontext; krb5_magic odtype; - krb5_pointer *argp; - krb5_octet **bufpp; - size_t *sizep; + krb5_pointer FAR *argp; + krb5_octet FAR * FAR *bufpp; + size_t FAR *sizep; { krb5_error_code kret; krb5_ser_handle shandle; @@ -195,11 +195,11 @@ krb5_internalize_opaque(kcontext, odtype, argp, bufpp, sizep) * krb5_ser_pack_int32() - Pack a 4-byte integer if space is availble. * Update buffer pointer and remaining space. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_ser_pack_int32(iarg, bufp, remainp) krb5_int32 iarg; - krb5_octet **bufp; - size_t *remainp; + krb5_octet FAR * FAR *bufp; + size_t FAR *remainp; { if (*remainp >= sizeof(krb5_int32)) { (*bufp)[0] = (krb5_octet) ((iarg >> 24) & 0xff); @@ -217,12 +217,12 @@ krb5_ser_pack_int32(iarg, bufp, remainp) /* * krb5_ser_pack_bytes() - Pack a string of bytes. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_ser_pack_bytes(ostring, osize, bufp, remainp) - krb5_octet *ostring; + krb5_octet FAR *ostring; size_t osize; - krb5_octet **bufp; - size_t *remainp; + krb5_octet FAR * FAR *bufp; + size_t FAR *remainp; { if (*remainp >= osize) { memcpy(*bufp, ostring, osize); @@ -237,11 +237,11 @@ krb5_ser_pack_bytes(ostring, osize, bufp, remainp) /* * krb5_ser_unpack_int32() - Unpack a 4-byte integer if it's there. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_ser_unpack_int32(intp, bufp, remainp) - krb5_int32 *intp; - krb5_octet **bufp; - size_t *remainp; + krb5_int32 FAR *intp; + krb5_octet FAR * FAR *bufp; + size_t FAR *remainp; { if (*remainp >= sizeof(krb5_int32)) { *intp = (((krb5_int32) ((unsigned char) (*bufp)[0]) << 24) | @@ -259,12 +259,12 @@ krb5_ser_unpack_int32(intp, bufp, remainp) /* * krb5_ser_unpack_bytes() - Unpack a byte string if it's there. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_ser_unpack_bytes(istring, isize, bufp, remainp) - krb5_octet *istring; + krb5_octet FAR *istring; size_t isize; - krb5_octet **bufp; - size_t *remainp; + krb5_octet FAR * FAR *bufp; + size_t FAR *remainp; { if (*remainp >= isize) { memcpy(istring, *bufp, isize); diff --git a/src/lib/krb5/krb/str_conv.c b/src/lib/krb5/krb/str_conv.c index 76a79a8..d8b2e6d 100644 --- a/src/lib/krb5/krb/str_conv.c +++ b/src/lib/krb5/krb/str_conv.c @@ -367,10 +367,10 @@ strptime(buf, format, tm) * * These routines return 0 for success, EINVAL for invalid entry. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_string_to_enctype(string, enctypep) - char * string; - krb5_enctype * enctypep; + char FAR * string; + krb5_enctype FAR * enctypep; { int i; int found; @@ -386,10 +386,10 @@ krb5_string_to_enctype(string, enctypep) return((found) ? 0 : EINVAL); } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_string_to_salttype(string, salttypep) - char * string; - krb5_int32 * salttypep; + char FAR * string; + krb5_int32 FAR * salttypep; { int i; int found; @@ -405,10 +405,10 @@ krb5_string_to_salttype(string, salttypep) return((found) ? 0 : EINVAL); } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_string_to_cksumtype(string, cksumtypep) - char * string; - krb5_cksumtype * cksumtypep; + char FAR * string; + krb5_cksumtype FAR * cksumtypep; { int i; int found; @@ -424,10 +424,10 @@ krb5_string_to_cksumtype(string, cksumtypep) return((found) ? 0 : EINVAL); } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_string_to_timestamp(string, timestampp) - char * string; - krb5_timestamp * timestampp; + char FAR * string; + krb5_timestamp FAR * timestampp; { int i; int found; @@ -454,10 +454,10 @@ krb5_string_to_timestamp(string, timestampp) return((found) ? 0 : EINVAL); } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_string_to_deltat(string, deltatp) - char * string; - krb5_deltat * deltatp; + char FAR * string; + krb5_deltat FAR * deltatp; { int i; int found; @@ -502,10 +502,10 @@ krb5_string_to_deltat(string, deltatp) * These routines return 0 for success, EINVAL for invalid parameter, ENOMEM * if the supplied buffer/length will not contain the output. */ -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_enctype_to_string(enctype, buffer, buflen) krb5_enctype enctype; - char * buffer; + char FAR * buffer; size_t buflen; { int i; @@ -529,10 +529,10 @@ krb5_enctype_to_string(enctype, buffer, buflen) return(EINVAL); } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_salttype_to_string(salttype, buffer, buflen) krb5_int32 salttype; - char * buffer; + char FAR * buffer; size_t buflen; { int i; @@ -556,10 +556,10 @@ krb5_salttype_to_string(salttype, buffer, buflen) return(EINVAL); } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_cksumtype_to_string(cksumtype, buffer, buflen) krb5_cksumtype cksumtype; - char * buffer; + char FAR * buffer; size_t buflen; { int i; @@ -583,10 +583,10 @@ krb5_cksumtype_to_string(cksumtype, buffer, buflen) return(EINVAL); } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_timestamp_to_string(timestamp, buffer, buflen) krb5_timestamp timestamp; - char * buffer; + char FAR * buffer; size_t buflen; { #if HAVE_STRFTIME @@ -605,12 +605,12 @@ krb5_timestamp_to_string(timestamp, buffer, buflen) #endif /* HAVE_STRFTIME */ } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_timestamp_to_sfstring(timestamp, buffer, buflen, pad) krb5_timestamp timestamp; - char * buffer; + char FAR * buffer; size_t buflen; - char * pad; + char FAR * pad; { struct tm *tmp; size_t i; @@ -640,10 +640,10 @@ krb5_timestamp_to_sfstring(timestamp, buffer, buflen, pad) return((ndone) ? 0 : ENOMEM); } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_deltat_to_string(deltat, buffer, buflen) krb5_deltat deltat; - char * buffer; + char FAR * buffer; size_t buflen; { int days, hours, minutes, seconds; diff --git a/src/lib/krb5/krb/unparse.c b/src/lib/krb5/krb/unparse.c index 7247d9a..1f0c791 100644 --- a/src/lib/krb5/krb/unparse.c +++ b/src/lib/krb5/krb/unparse.c @@ -54,12 +54,12 @@ #define REALM_SEP '@' #define COMPONENT_SEP '/' -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_unparse_name_ext(context, principal, name, size) krb5_context context; krb5_const_principal principal; - register char **name; - int *size; + register char FAR * FAR *name; + int FAR *size; { register char *cp, *q; register int i,j; @@ -185,7 +185,7 @@ krb5_unparse_name_ext(context, principal, name, size) return 0; } -krb5_error_code INTERFACE +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_unparse_name(context, principal, name) krb5_context context; krb5_const_principal principal; diff --git a/src/lib/krb5/krb/valid_times.c b/src/lib/krb5/krb/valid_times.c index b1e26ce..ed377d1 100644 --- a/src/lib/krb5/krb/valid_times.c +++ b/src/lib/krb5/krb/valid_times.c @@ -33,7 +33,8 @@ * field in a krb5_ticket. */ -krb5_error_code krb5_validate_times(context, times) +krb5_error_code +krb5_validate_times(context, times) krb5_context context; krb5_ticket_times * times; { |