From: Mark Eichin Date: Fri, 10 Jun 1994 19:13:21 +0000 (+0000) Subject: "downgrade" to classic C, tweak headers a bit, stamp out widen/narrow X-Git-Tag: krb5-1.0-beta4~137 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=53e2eedc986399e01884130da604a16d7dfb6954;p=krb5.git "downgrade" to classic C, tweak headers a bit, stamp out widen/narrow git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3716 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/krb5/accept_sec_context.c b/src/lib/gssapi/krb5/accept_sec_context.c index 36c4d936d..c9dac29f6 100644 --- a/src/lib/gssapi/krb5/accept_sec_context.c +++ b/src/lib/gssapi/krb5/accept_sec_context.c @@ -28,15 +28,11 @@ * $Id$ */ -/* XXXX This widen/narrow stuff is bletcherous, but it seems to be - necessary. Perhaps there is a "better" way, but I don't know what it - is */ - -#include -static krb5_error_code -rd_req_keyproc(krb5_pointer keyprocarg, krb5_principal server, - krb5_kvno kvno, krb5_keyblock **keyblock) -#include +static krb5_error_code rd_req_keyproc(keyprocarg, server, kvno, keyblock) + krb5_pointer keyprocarg; + krb5_principal server; + krb5_kvno kvno; + krb5_keyblock **keyblock; { krb5_error_code code; krb5_keytab_entry ktentry; @@ -52,11 +48,11 @@ rd_req_keyproc(krb5_pointer keyprocarg, krb5_principal server, return(code); } -static krb5_error_code -make_ap_rep(krb5_tkt_authent *authdat, - krb5_keyblock *subkey, - krb5_int32 *seq_send, - gss_buffer_t token) +static krb5_error_code make_ap_rep(authdat, subkey, seq_send, token) + krb5_tkt_authent *authdat; + krb5_keyblock *subkey; + krb5_int32 *seq_send; + gss_buffer_t token; { krb5_error_code code; krb5_ap_rep_enc_part ap_rep_data; @@ -110,18 +106,22 @@ make_ap_rep(krb5_tkt_authent *authdat, return(0); } -OM_uint32 -krb5_gss_accept_sec_context(OM_uint32 *minor_status, - gss_ctx_id_t *context_handle, - gss_cred_id_t verifier_cred_handle, - gss_buffer_t input_token, - gss_channel_bindings_t input_chan_bindings, - gss_name_t *src_name, - gss_OID *mech_type, - gss_buffer_t output_token, - int *ret_flags, - OM_uint32 *time_rec, - gss_cred_id_t *delegated_cred_handle) +OM_uint32 krb5_gss_accept_sec_context(minor_status, context_handle, + verifier_cred_handle, input_token, + input_chan_bindings, src_name, mech_type, + output_token, ret_flags, time_rec, + delegated_cred_handle) + OM_uint32 *minor_status; + gss_ctx_id_t *context_handle; + gss_cred_id_t verifier_cred_handle; + gss_buffer_t input_token; + gss_channel_bindings_t input_chan_bindings; + gss_name_t *src_name; + gss_OID *mech_type; + gss_buffer_t output_token; + int *ret_flags; + OM_uint32 *time_rec; + gss_cred_id_t *delegated_cred_handle; { unsigned char *ptr, *ptr2; long tmp; @@ -193,7 +193,7 @@ krb5_gss_accept_sec_context(OM_uint32 *minor_status, return(GSS_S_DEFECTIVE_TOKEN); } - TREAD_STR(ptr, (unsigned char *) ap_req.data, ap_req.length); + TREAD_STR(ptr, ap_req.data, ap_req.length); /* construct the sender_addr */ diff --git a/src/lib/gssapi/krb5/acquire_cred.c b/src/lib/gssapi/krb5/acquire_cred.c index d09c70809..9418a278d 100644 --- a/src/lib/gssapi/krb5/acquire_cred.c +++ b/src/lib/gssapi/krb5/acquire_cred.c @@ -33,11 +33,12 @@ If successful, set the keytab-specific fields in cred */ -static OM_uint32 -acquire_accept_cred(OM_uint32 *minor_status, - gss_name_t desired_name, - krb5_principal *output_princ, - krb5_gss_cred_id_rec *cred) +static OM_uint32 acquire_accept_cred(minor_status, desired_name, output_princ, + cred) + OM_uint32 *minor_status; + gss_name_t desired_name; + krb5_principal *output_princ; + krb5_gss_cred_id_rec *cred; { krb5_error_code code; krb5_principal princ; @@ -116,11 +117,12 @@ acquire_accept_cred(OM_uint32 *minor_status, If successful, set the ccache-specific fields in cred. */ -static OM_uint32 -acquire_init_cred(OM_uint32 *minor_status, - gss_name_t desired_name, - krb5_principal *output_princ, - krb5_gss_cred_id_rec *cred) +static OM_uint32 acquire_init_cred(minor_status, desired_name, output_princ, + cred) + OM_uint32 *minor_status; + gss_name_t desired_name; + krb5_principal *output_princ; + krb5_gss_cred_id_rec *cred; { krb5_error_code code; krb5_ccache ccache; @@ -232,15 +234,17 @@ acquire_init_cred(OM_uint32 *minor_status, } /*ARGSUSED*/ -OM_uint32 -krb5_gss_acquire_cred(OM_uint32 *minor_status, - gss_name_t desired_name, - OM_uint32 time_req, - gss_OID_set desired_mechs, - int cred_usage, - gss_cred_id_t *output_cred_handle, - gss_OID_set *actual_mechs, - OM_uint32 *time_rec) +OM_uint32 krb5_gss_acquire_cred(minor_status, desired_name, time_req, + desired_mechs, cred_usage, output_cred_handle, + actual_mechs, time_rec) + OM_uint32 *minor_status; + gss_name_t desired_name; + OM_uint32 time_req; + gss_OID_set desired_mechs; + int cred_usage; + gss_cred_id_t *output_cred_handle; + gss_OID_set *actual_mechs; + OM_uint32 *time_rec; { int i; krb5_gss_cred_id_t cred; @@ -323,7 +327,7 @@ krb5_gss_acquire_cred(OM_uint32 *minor_status, (cred_usage == GSS_C_BOTH)) if ((ret = acquire_init_cred(minor_status, - cred->princ?cred->princ:desired_name, + cred->princ?(gss_name_t)cred->princ:desired_name, &(cred->princ), cred)) != GSS_S_COMPLETE) { if (cred->keytab) diff --git a/src/lib/gssapi/krb5/compare_name.c b/src/lib/gssapi/krb5/compare_name.c index 455bd6ddd..a9a4d9878 100644 --- a/src/lib/gssapi/krb5/compare_name.c +++ b/src/lib/gssapi/krb5/compare_name.c @@ -27,10 +27,11 @@ #include "gssapiP_krb5.h" OM_uint32 -krb5_gss_compare_name(OM_uint32 *minor_status, - gss_name_t name1, - gss_name_t name2, - int *name_equal) +krb5_gss_compare_name(minor_status, name1, name2, name_equal) + OM_uint32 *minor_status; + gss_name_t name1; + gss_name_t name2; + int *name_equal; { if (! kg_validate_name(name1)) { *minor_status = G_VALIDATE_FAILED; diff --git a/src/lib/gssapi/krb5/context_time.c b/src/lib/gssapi/krb5/context_time.c index 00b8ae3ab..f4b403477 100644 --- a/src/lib/gssapi/krb5/context_time.c +++ b/src/lib/gssapi/krb5/context_time.c @@ -27,9 +27,10 @@ */ OM_uint32 -krb5_gss_context_time(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - OM_uint32 *time_rec) +krb5_gss_context_time(minor_status, context_handle, time_rec) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + OM_uint32 *time_rec; { krb5_error_code code; krb5_gss_ctx_id_rec *ctx; diff --git a/src/lib/gssapi/krb5/delete_sec_context.c b/src/lib/gssapi/krb5/delete_sec_context.c index 04196072c..10e8a0c62 100644 --- a/src/lib/gssapi/krb5/delete_sec_context.c +++ b/src/lib/gssapi/krb5/delete_sec_context.c @@ -27,9 +27,10 @@ */ OM_uint32 -krb5_gss_delete_sec_context(OM_uint32 *minor_status, - gss_ctx_id_t *context_handle, - gss_buffer_t output_token) +krb5_gss_delete_sec_context(minor_status, context_handle, output_token) + OM_uint32 *minor_status; + gss_ctx_id_t *context_handle; + gss_buffer_t output_token; { krb5_gss_ctx_id_rec *ctx; @@ -55,7 +56,8 @@ krb5_gss_delete_sec_context(OM_uint32 *minor_status, if (output_token) { OM_uint32 major; - gss_buffer_desc empty = {0, NULL}; + gss_buffer_desc empty; + empty.length = 0; empty.value = NULL; if (major = kg_seal(minor_status, *context_handle, 0, GSS_C_QOP_DEFAULT, &empty, NULL, output_token, KG_TOK_DEL_CTX)) diff --git a/src/lib/gssapi/krb5/display_name.c b/src/lib/gssapi/krb5/display_name.c index d5a83127f..f05a92116 100644 --- a/src/lib/gssapi/krb5/display_name.c +++ b/src/lib/gssapi/krb5/display_name.c @@ -27,10 +27,12 @@ #include "gssapiP_krb5.h" OM_uint32 -krb5_gss_display_name(OM_uint32 *minor_status, - gss_name_t input_name, - gss_buffer_t output_name_buffer, - gss_OID *output_name_type) +krb5_gss_display_name(minor_status, input_name, output_name_buffer, + output_name_type) + OM_uint32 *minor_status; + gss_name_t input_name; + gss_buffer_t output_name_buffer; + gss_OID *output_name_type; { krb5_error_code code; char *str; diff --git a/src/lib/gssapi/krb5/display_status.c b/src/lib/gssapi/krb5/display_status.c index 974698d78..cf26652dd 100644 --- a/src/lib/gssapi/krb5/display_status.c +++ b/src/lib/gssapi/krb5/display_status.c @@ -36,12 +36,14 @@ static int init_et = 0; /**/ OM_uint32 -krb5_gss_display_status(OM_uint32 *minor_status, - OM_uint32 status_value, - int status_type, - const_gss_OID mech_type, - int *message_context, - gss_buffer_t status_string) +krb5_gss_display_status(minor_status, status_value, status_type, + mech_type, message_context, status_string) + OM_uint32 *minor_status; + OM_uint32 status_value; + int status_type; + const_gss_OID mech_type; + int *message_context; + gss_buffer_t status_string; { status_string->length = 0; status_string->value = NULL; diff --git a/src/lib/gssapi/krb5/get_tkt_flags.c b/src/lib/gssapi/krb5/get_tkt_flags.c index a35259c06..e0a321662 100644 --- a/src/lib/gssapi/krb5/get_tkt_flags.c +++ b/src/lib/gssapi/krb5/get_tkt_flags.c @@ -27,9 +27,10 @@ */ OM_uint32 -gss_krb5_get_tkt_flags(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - krb5_flags *ticket_flags) +gss_krb5_get_tkt_flags(minor_status, context_handle, ticket_flags) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + krb5_flags *ticket_flags; { krb5_gss_ctx_id_rec *ctx; diff --git a/src/lib/gssapi/krb5/gssapiP_krb5.h b/src/lib/gssapi/krb5/gssapiP_krb5.h index efe6c8644..9a13367a4 100644 --- a/src/lib/gssapi/krb5/gssapiP_krb5.h +++ b/src/lib/gssapi/krb5/gssapiP_krb5.h @@ -115,53 +115,53 @@ extern void *kg_vdb; /** helper functions **/ -OM_uint32 kg_get_defcred(OM_uint32 *minor_status, gss_cred_id_t *cred); +OM_uint32 kg_get_defcred PROTOTYPE((OM_uint32 *minor_status, gss_cred_id_t *cred)); -OM_uint32 kg_release_defcred(OM_uint32 *minor_status); +OM_uint32 kg_release_defcred PROTOTYPE((OM_uint32 *minor_status)); -krb5_error_code kg_checksum_channel_bindings(gss_channel_bindings_t cb, +krb5_error_code kg_checksum_channel_bindings PROTOTYPE((gss_channel_bindings_t cb, krb5_checksum *cksum, - int bigend); + int bigend)); -krb5_error_code kg_make_seq_num(krb5_gss_enc_desc *ed, int direction, +krb5_error_code kg_make_seq_num PROTOTYPE((krb5_gss_enc_desc *ed, int direction, int seqnum, unsigned char *cksum, - unsigned char *buf); + unsigned char *buf)); -krb5_error_code kg_make_seed(krb5_keyblock *key, unsigned char *seed); +krb5_error_code kg_make_seed PROTOTYPE((krb5_keyblock *key, unsigned char *seed)); -int kg_confounder_size(krb5_gss_enc_desc *ed); +int kg_confounder_size PROTOTYPE((krb5_gss_enc_desc *ed)); -krb5_error_code kg_make_confounder(krb5_gss_enc_desc *ed, unsigned char *buf); +krb5_error_code kg_make_confounder PROTOTYPE((krb5_gss_enc_desc *ed, unsigned char *buf)); -int kg_encrypt_size(krb5_gss_enc_desc *ed, int n); +int kg_encrypt_size PROTOTYPE((krb5_gss_enc_desc *ed, int n)); -krb5_error_code kg_encrypt(krb5_gss_enc_desc *ed, krb5_pointer iv, - krb5_pointer in, krb5_pointer out, int length); +krb5_error_code kg_encrypt PROTOTYPE((krb5_gss_enc_desc *ed, krb5_pointer iv, + krb5_pointer in, krb5_pointer out, int length)); -krb5_error_code kg_decrypt(krb5_gss_enc_desc *ed, krb5_pointer iv, - krb5_pointer in, krb5_pointer out, int length); +krb5_error_code kg_decrypt PROTOTYPE((krb5_gss_enc_desc *ed, krb5_pointer iv, + krb5_pointer in, krb5_pointer out, int length)); -OM_uint32 kg_seal(OM_uint32 *minor_status, +OM_uint32 kg_seal PROTOTYPE((OM_uint32 *minor_status, gss_ctx_id_t context_handle, int conf_req_flag, int qop_req, gss_buffer_t input_message_buffer, int *conf_state, gss_buffer_t output_message_buffer, - int toktype); + int toktype)); -OM_uint32 kg_unseal(OM_uint32 *minor_status, +OM_uint32 kg_unseal PROTOTYPE((OM_uint32 *minor_status, gss_ctx_id_t context_handle, gss_buffer_t input_token_buffer, gss_buffer_t message_buffer, int *conf_state, int *qop_state, - int toktype); + int toktype)); /** declarations of internal name mechanism functions **/ OM_uint32 krb5_gss_acquire_cred - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_name_t, /* desired_name */ OM_uint32, /* time_req */ gss_OID_set, /* desired_mechs */ @@ -169,15 +169,15 @@ OM_uint32 krb5_gss_acquire_cred gss_cred_id_t*, /* output_cred_handle */ gss_OID_set*, /* actual_mechs */ OM_uint32* /* time_rec */ - ); + )); OM_uint32 krb5_gss_release_cred - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_cred_id_t* /* cred_handle */ - ); + )); OM_uint32 krb5_gss_init_sec_context - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_cred_id_t, /* claimant_cred_handle */ gss_ctx_id_t*, /* context_handle */ gss_name_t, /* target_name */ @@ -191,10 +191,10 @@ OM_uint32 krb5_gss_init_sec_context gss_buffer_t, /* output_token */ int*, /* ret_flags */ OM_uint32* /* time_rec */ - ); + )); OM_uint32 krb5_gss_accept_sec_context - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_ctx_id_t*, /* context_handle */ gss_cred_id_t, /* verifier_cred_handle */ gss_buffer_t, /* input_token_buffer */ @@ -206,112 +206,112 @@ OM_uint32 krb5_gss_accept_sec_context int*, /* ret_flags */ OM_uint32*, /* time_rec */ gss_cred_id_t* /* delegated_cred_handle */ - ); + )); OM_uint32 krb5_gss_process_context_token - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_ctx_id_t, /* context_handle */ gss_buffer_t /* token_buffer */ - ); + )); OM_uint32 krb5_gss_delete_sec_context - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_ctx_id_t*, /* context_handle */ gss_buffer_t /* output_token */ - ); + )); OM_uint32 krb5_gss_context_time - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_ctx_id_t, /* context_handle */ OM_uint32* /* time_rec */ - ); + )); OM_uint32 krb5_gss_sign - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_ctx_id_t, /* context_handle */ int, /* qop_req */ gss_buffer_t, /* message_buffer */ gss_buffer_t /* message_token */ - ); + )); OM_uint32 krb5_gss_verify - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_ctx_id_t, /* context_handle */ gss_buffer_t, /* message_buffer */ gss_buffer_t, /* token_buffer */ int* /* qop_state */ - ); + )); OM_uint32 krb5_gss_seal - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_ctx_id_t, /* context_handle */ int, /* conf_req_flag */ int, /* qop_req */ gss_buffer_t, /* input_message_buffer */ int*, /* conf_state */ gss_buffer_t /* output_message_buffer */ - ); + )); OM_uint32 krb5_gss_unseal - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_ctx_id_t, /* context_handle */ gss_buffer_t, /* input_message_buffer */ gss_buffer_t, /* output_message_buffer */ int*, /* conf_state */ int* /* qop_state */ - ); + )); OM_uint32 krb5_gss_display_status - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ OM_uint32, /* status_value */ int, /* status_type */ const_gss_OID, /* mech_type */ int*, /* message_context */ gss_buffer_t /* status_string */ - ); + )); OM_uint32 krb5_gss_indicate_mechs - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_OID_set* /* mech_set */ - ); + )); OM_uint32 krb5_gss_compare_name - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_name_t, /* name1 */ gss_name_t, /* name2 */ int* /* name_equal */ - ); + )); OM_uint32 krb5_gss_display_name - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_name_t, /* input_name */ gss_buffer_t, /* output_name_buffer */ gss_OID* /* output_name_type */ - ); + )); OM_uint32 krb5_gss_import_name - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_buffer_t, /* input_name_buffer */ const_gss_OID, /* input_name_type */ gss_name_t* /* output_name */ - ); + )); OM_uint32 krb5_gss_release_name - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_name_t* /* input_name */ - ); + )); OM_uint32 krb5_gss_inquire_cred - (OM_uint32 *, /* minor_status */ +PROTOTYPE( (OM_uint32 *, /* minor_status */ gss_cred_id_t, /* cred_handle */ gss_name_t *, /* name */ OM_uint32 *, /* lifetime */ int *, /* cred_usage */ gss_OID_set * /* mechanisms */ - ); + )); OM_uint32 krb5_gss_inquire_context - (OM_uint32*, /* minor_status */ +PROTOTYPE( (OM_uint32*, /* minor_status */ gss_ctx_id_t, /* context_handle */ gss_name_t*, /* initiator_name */ gss_name_t*, /* acceptor_name */ @@ -319,6 +319,6 @@ OM_uint32 krb5_gss_inquire_context gss_OID*, /* mech_type */ int*, /* ret_flags */ int* /* locally_initiated */ - ); + )); #endif /* _GSSAPIP_KRB5_H_ */ diff --git a/src/lib/gssapi/krb5/gssapi_krb5.c b/src/lib/gssapi/krb5/gssapi_krb5.c index 699b4308d..1e46e374a 100644 --- a/src/lib/gssapi/krb5/gssapi_krb5.c +++ b/src/lib/gssapi/krb5/gssapi_krb5.c @@ -76,7 +76,9 @@ static gss_cred_id_t defcred = GSS_C_NO_CREDENTIAL; /* XXX what happens when the default credentials expire or are invalidated? */ OM_uint32 -kg_get_defcred(OM_uint32 *minor_status, gss_cred_id_t *cred) +kg_get_defcred(minor_status, cred) + OM_uint32 *minor_status; + gss_cred_id_t *cred; { if (defcred == GSS_C_NO_CREDENTIAL) { OM_uint32 major; @@ -97,7 +99,8 @@ kg_get_defcred(OM_uint32 *minor_status, gss_cred_id_t *cred) } OM_uint32 -kg_release_defcred(OM_uint32 *minor_status) +kg_release_defcred(minor_status) + OM_uint32 *minor_status; { if (defcred == GSS_C_NO_CREDENTIAL) { *minor_status = 0; diff --git a/src/lib/gssapi/krb5/gssapi_krb5.h b/src/lib/gssapi/krb5/gssapi_krb5.h index 2cff6b289..fccbb38e7 100644 --- a/src/lib/gssapi/krb5/gssapi_krb5.h +++ b/src/lib/gssapi/krb5/gssapi_krb5.h @@ -43,9 +43,9 @@ extern const gss_OID_desc * const gss_nt_krb5_principal; #define gss_krb5_nt_machine_uid_name gss_nt_machine_uid_name #define gss_krb5_nt_string_uid_name gss_nt_string_uid_name -OM_uint32 gss_krb5_get_tkt_flags(OM_uint32 *minor_status, +OM_uint32 gss_krb5_get_tkt_flags PROTOTYPE((OM_uint32 *minor_status, gss_ctx_id_t context_handle, - krb5_flags *ticket_flags); + krb5_flags *ticket_flags)); #endif /* _GSSAPI_KRB5_H_ */ diff --git a/src/lib/gssapi/krb5/import_name.c b/src/lib/gssapi/krb5/import_name.c index 51fbd9f43..085c760fc 100644 --- a/src/lib/gssapi/krb5/import_name.c +++ b/src/lib/gssapi/krb5/import_name.c @@ -24,10 +24,14 @@ * $Id$ */ -#include -#include #include "gssapiP_krb5.h" +#include +#ifdef USE_STRING_H +#include +#else +#include +#endif /* * errors: @@ -37,10 +41,12 @@ */ OM_uint32 -krb5_gss_import_name(OM_uint32 *minor_status, - gss_buffer_t input_name_buffer, - const_gss_OID input_name_type, - gss_name_t *output_name) +krb5_gss_import_name(minor_status, input_name_buffer, input_name_type, + output_name) + OM_uint32 *minor_status; + gss_buffer_t input_name_buffer; + const_gss_OID input_name_type; + gss_name_t *output_name; { krb5_principal princ; krb5_error_code code; diff --git a/src/lib/gssapi/krb5/indicate_mechs.c b/src/lib/gssapi/krb5/indicate_mechs.c index c20679f95..bc53b4434 100644 --- a/src/lib/gssapi/krb5/indicate_mechs.c +++ b/src/lib/gssapi/krb5/indicate_mechs.c @@ -27,8 +27,9 @@ #include "gssapiP_krb5.h" OM_uint32 -krb5_gss_indicate_mechs(OM_uint32 *minor_status, - gss_OID_set *mech_set) +krb5_gss_indicate_mechs(minor_status, mech_set) + OM_uint32 *minor_status; + gss_OID_set *mech_set; { *minor_status = 0; *mech_set = (gss_OID_set) gss_mech_set_krb5; diff --git a/src/lib/gssapi/krb5/init_sec_context.c b/src/lib/gssapi/krb5/init_sec_context.c index 87cf0ae1d..a377f7f9e 100644 --- a/src/lib/gssapi/krb5/init_sec_context.c +++ b/src/lib/gssapi/krb5/init_sec_context.c @@ -28,15 +28,17 @@ */ static krb5_error_code -make_ap_req(krb5_gss_cred_id_t cred, - krb5_principal server, - krb5_timestamp *endtime, - gss_channel_bindings_t chan_bindings, - int do_mutual, - krb5_keyblock **subkey, - krb5_flags *flags, - krb5_int32 *seqnum, - gss_buffer_t token) +make_ap_req(cred, server, endtime, chan_bindings, do_mutual, subkey, flags, + seqnum, token) + krb5_gss_cred_id_t cred; + krb5_principal server; + krb5_timestamp *endtime; + gss_channel_bindings_t chan_bindings; + int do_mutual; + krb5_keyblock **subkey; + krb5_flags *flags; + krb5_int32 *seqnum; + gss_buffer_t token; { krb5_error_code code; krb5_checksum md5, checksum; @@ -131,19 +133,24 @@ make_ap_req(krb5_gss_cred_id_t cred, } OM_uint32 -krb5_gss_init_sec_context(OM_uint32 *minor_status, - gss_cred_id_t claimant_cred_handle, - gss_ctx_id_t *context_handle, - gss_name_t target_name, - const_gss_OID mech_type, - int req_flags, - OM_uint32 time_req, - gss_channel_bindings_t input_chan_bindings, - gss_buffer_t input_token, - gss_OID *actual_mech_type, - gss_buffer_t output_token, - int *ret_flags, - OM_uint32 *time_rec) +krb5_gss_init_sec_context(minor_status, claimant_cred_handle, + context_handle, target_name, mech_type, + req_flags, time_req, input_chan_bindings, + input_token, actual_mech_type, output_token, + ret_flags, time_rec) + OM_uint32 *minor_status; + gss_cred_id_t claimant_cred_handle; + gss_ctx_id_t *context_handle; + gss_name_t target_name; + const_gss_OID mech_type; + int req_flags; + OM_uint32 time_req; + gss_channel_bindings_t input_chan_bindings; + gss_buffer_t input_token; + gss_OID *actual_mech_type; + gss_buffer_t output_token; + int *ret_flags; + OM_uint32 *time_rec; { krb5_gss_cred_id_t cred; krb5_error_code code; @@ -377,7 +384,7 @@ krb5_gss_init_sec_context(OM_uint32 *minor_status, return(GSS_S_DEFECTIVE_TOKEN); } - TREAD_STR(ptr, (unsigned char *) ap_rep.data, ap_rep.length); + TREAD_STR(ptr, ap_rep.data, ap_rep.length); /* decode the ap_rep */ if (code = krb5_rd_rep(&ap_rep, ctx->subkey, &ap_rep_data)) { diff --git a/src/lib/gssapi/krb5/inquire_context.c b/src/lib/gssapi/krb5/inquire_context.c index 771a35213..6184bbc69 100644 --- a/src/lib/gssapi/krb5/inquire_context.c +++ b/src/lib/gssapi/krb5/inquire_context.c @@ -27,14 +27,17 @@ */ OM_uint32 -krb5_gss_inquire_context(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - gss_name_t *initiator_name, - gss_name_t *acceptor_name, - OM_uint32 *lifetime_rec, - gss_OID *mech_type, - int *ret_flags, - int *locally_initiated) +krb5_gss_inquire_context(minor_status, context_handle, initiator_name, + acceptor_name, lifetime_rec, mech_type, ret_flags, + locally_initiated) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + gss_name_t *initiator_name; + gss_name_t *acceptor_name; + OM_uint32 *lifetime_rec; + gss_OID *mech_type; + int *ret_flags; + int *locally_initiated; { krb5_error_code code; krb5_gss_ctx_id_rec *ctx; diff --git a/src/lib/gssapi/krb5/inquire_cred.c b/src/lib/gssapi/krb5/inquire_cred.c index 7795fca15..0fc3fc5f8 100644 --- a/src/lib/gssapi/krb5/inquire_cred.c +++ b/src/lib/gssapi/krb5/inquire_cred.c @@ -27,12 +27,14 @@ */ OM_uint32 -krb5_gss_inquire_cred(OM_uint32 *minor_status, - gss_cred_id_t cred_handle, - gss_name_t *name, - OM_uint32 *lifetime_ret, - int *cred_usage, - gss_OID_set *mechanisms) +krb5_gss_inquire_cred(minor_status, cred_handle, name, lifetime_ret, + cred_usage, mechanisms) + OM_uint32 *minor_status; + gss_cred_id_t cred_handle; + gss_name_t *name; + OM_uint32 *lifetime_ret; + int *cred_usage; + gss_OID_set *mechanisms; { krb5_gss_cred_id_t cred; krb5_error_code code; diff --git a/src/lib/gssapi/krb5/k5seal.c b/src/lib/gssapi/krb5/k5seal.c index 423732ff8..6c1c98cdb 100644 --- a/src/lib/gssapi/krb5/k5seal.c +++ b/src/lib/gssapi/krb5/k5seal.c @@ -29,15 +29,17 @@ */ static krb5_error_code -make_seal_token(krb5_gss_enc_desc *enc_ed, - krb5_gss_enc_desc *seq_ed, - krb5_int32 *seqnum, - int direction, - gss_buffer_t text, - gss_buffer_t token, - int encrypt, - int toktype, - int bigend) +make_seal_token(enc_ed, seq_ed, seqnum, direction, text, token, + encrypt, toktype, bigend) + krb5_gss_enc_desc *enc_ed; + krb5_gss_enc_desc *seq_ed; + krb5_int32 *seqnum; + int direction; + gss_buffer_t text; + gss_buffer_t token; + int encrypt; + int toktype; + int bigend; { krb5_error_code code; MD5_CTX md5; @@ -182,14 +184,16 @@ make_seal_token(krb5_gss_enc_desc *enc_ed, and do not encode the ENC_TYPE, MSG_LENGTH, or MSG_TEXT fields */ OM_uint32 -kg_seal(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - int conf_req_flag, - int qop_req, - gss_buffer_t input_message_buffer, - int *conf_state, - gss_buffer_t output_message_buffer, - int toktype) +kg_seal(minor_status, context_handle, conf_req_flag, qop_req, + input_message_buffer, conf_state, output_message_buffer, toktype) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + int conf_req_flag; + int qop_req; + gss_buffer_t input_message_buffer; + int *conf_state; + gss_buffer_t output_message_buffer; + int toktype; { krb5_gss_ctx_id_rec *ctx; krb5_error_code code; diff --git a/src/lib/gssapi/krb5/k5unseal.c b/src/lib/gssapi/krb5/k5unseal.c index 7ade04253..7a3bbfb42 100644 --- a/src/lib/gssapi/krb5/k5unseal.c +++ b/src/lib/gssapi/krb5/k5unseal.c @@ -34,13 +34,15 @@ */ OM_uint32 -kg_unseal(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - gss_buffer_t input_token_buffer, - gss_buffer_t message_buffer, - int *conf_state, - int *qop_state, - int toktype) +kg_unseal(minor_status, context_handle, input_token_buffer, message_buffer, + conf_state, qop_state, toktype) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + gss_buffer_t input_token_buffer; + gss_buffer_t message_buffer; + int *conf_state; + int *qop_state; + int toktype; { krb5_gss_ctx_id_rec *ctx; krb5_error_code code; diff --git a/src/lib/gssapi/krb5/krb5_gss_glue.c b/src/lib/gssapi/krb5/krb5_gss_glue.c index ecebdd161..de4622fc4 100644 --- a/src/lib/gssapi/krb5/krb5_gss_glue.c +++ b/src/lib/gssapi/krb5/krb5_gss_glue.c @@ -27,17 +27,29 @@ #include "gssapiP_krb5.h" OM_uint32 -gss_accept_sec_context(OM_uint32 *minor_status, - gss_ctx_id_t *context_handle, - gss_cred_id_t verifier_cred_handle, - gss_buffer_t input_token, - gss_channel_bindings_t input_chan_bindings, - gss_name_t *src_name, - gss_OID *mech_type, - gss_buffer_t output_token, - int *ret_flags, - OM_uint32 *time_rec, - gss_cred_id_t *delegated_cred_handle) { +gss_accept_sec_context(minor_status, + context_handle, + verifier_cred_handle, + input_token, + input_chan_bindings, + src_name, + mech_type, + output_token, + ret_flags, + time_rec, + delegated_cred_handle) + OM_uint32 *minor_status; + gss_ctx_id_t *context_handle; + gss_cred_id_t verifier_cred_handle; + gss_buffer_t input_token; + gss_channel_bindings_t input_chan_bindings; + gss_name_t *src_name; + gss_OID *mech_type; + gss_buffer_t output_token; + int *ret_flags; + OM_uint32 *time_rec; + gss_cred_id_t *delegated_cred_handle; +{ return(krb5_gss_accept_sec_context(minor_status, context_handle, verifier_cred_handle, @@ -52,14 +64,23 @@ gss_accept_sec_context(OM_uint32 *minor_status, } OM_uint32 -gss_acquire_cred(OM_uint32 *minor_status, - gss_name_t desired_name, - OM_uint32 time_req, - gss_OID_set desired_mechs, - int cred_usage, - gss_cred_id_t *output_cred_handle, - gss_OID_set *actual_mechs, - OM_uint32 *time_rec) { +gss_acquire_cred(minor_status, + desired_name, + time_req, + desired_mechs, + cred_usage, + output_cred_handle, + actual_mechs, + time_rec) + OM_uint32 *minor_status; + gss_name_t desired_name; + OM_uint32 time_req; + gss_OID_set desired_mechs; + int cred_usage; + gss_cred_id_t *output_cred_handle; + gss_OID_set *actual_mechs; + OM_uint32 *time_rec; +{ return(krb5_gss_acquire_cred(minor_status, desired_name, time_req, @@ -71,10 +92,15 @@ gss_acquire_cred(OM_uint32 *minor_status, } OM_uint32 -gss_compare_name(OM_uint32 *minor_status, - gss_name_t name1, - gss_name_t name2, - int *name_equal) { +gss_compare_name(minor_status, + name1, + name2, + name_equal) + OM_uint32 *minor_status; + gss_name_t name1; + gss_name_t name2; + int *name_equal; +{ return(krb5_gss_compare_name(minor_status, name1, name2, @@ -82,28 +108,41 @@ gss_compare_name(OM_uint32 *minor_status, } OM_uint32 -gss_context_time(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - OM_uint32 *time_rec) { +gss_context_time(minor_status, + context_handle, + time_rec) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + OM_uint32 *time_rec; +{ return(krb5_gss_context_time(minor_status, context_handle, time_rec)); } OM_uint32 -gss_delete_sec_context(OM_uint32 *minor_status, - gss_ctx_id_t *context_handle, - gss_buffer_t output_token) { +gss_delete_sec_context(minor_status, + context_handle, + output_token) + OM_uint32 *minor_status; + gss_ctx_id_t *context_handle; + gss_buffer_t output_token; +{ return(krb5_gss_delete_sec_context(minor_status, context_handle, output_token)); } OM_uint32 -gss_display_name(OM_uint32 *minor_status, - gss_name_t input_name, - gss_buffer_t output_name_buffer, - gss_OID *output_name_type) { +gss_display_name(minor_status, + input_name, + output_name_buffer, + output_name_type) + OM_uint32 *minor_status; + gss_name_t input_name; + gss_buffer_t output_name_buffer; + gss_OID *output_name_type; +{ return(krb5_gss_display_name(minor_status, input_name, output_name_buffer, @@ -111,12 +150,19 @@ gss_display_name(OM_uint32 *minor_status, } OM_uint32 -gss_display_status(OM_uint32 *minor_status, - OM_uint32 status_value, - int status_type, - const_gss_OID mech_type, - int *message_context, - gss_buffer_t status_string) { +gss_display_status(minor_status, + status_value, + status_type, + mech_type, + message_context, + status_string) + OM_uint32 *minor_status; + OM_uint32 status_value; + int status_type; + const_gss_OID mech_type; + int *message_context; + gss_buffer_t status_string; +{ return(krb5_gss_display_status(minor_status, status_value, status_type, @@ -126,10 +172,15 @@ gss_display_status(OM_uint32 *minor_status, } OM_uint32 -gss_import_name(OM_uint32 *minor_status, - gss_buffer_t input_name_buffer, - const_gss_OID input_name_type, - gss_name_t *output_name) { +gss_import_name(minor_status, + input_name_buffer, + input_name_type, + output_name) + OM_uint32 *minor_status; + gss_buffer_t input_name_buffer; + const_gss_OID input_name_type; + gss_name_t *output_name; +{ return(krb5_gss_import_name(minor_status, input_name_buffer, input_name_type, @@ -137,26 +188,42 @@ gss_import_name(OM_uint32 *minor_status, } OM_uint32 -gss_indicate_mechs(OM_uint32 *minor_status, - gss_OID_set *mech_set) { +gss_indicate_mechs(minor_status, mech_set) + OM_uint32 *minor_status; + gss_OID_set *mech_set; +{ return(krb5_gss_indicate_mechs(minor_status, mech_set)); } OM_uint32 -gss_init_sec_context(OM_uint32 *minor_status, - gss_cred_id_t claimant_cred_handle, - gss_ctx_id_t *context_handle, - gss_name_t target_name, - const_gss_OID mech_type, - int req_flags, - OM_uint32 time_req, - gss_channel_bindings_t input_chan_bindings, - gss_buffer_t input_token, - gss_OID *actual_mech_type, - gss_buffer_t output_token, - int *ret_flags, - OM_uint32 *time_rec) { +gss_init_sec_context(minor_status, + claimant_cred_handle, + context_handle, + target_name, + mech_type, + req_flags, + time_req, + input_chan_bindings, + input_token, + actual_mech_type, + output_token, + ret_flags, + time_rec) + OM_uint32 *minor_status; + gss_cred_id_t claimant_cred_handle; + gss_ctx_id_t *context_handle; + gss_name_t target_name; + const_gss_OID mech_type; + int req_flags; + OM_uint32 time_req; + gss_channel_bindings_t input_chan_bindings; + gss_buffer_t input_token; + gss_OID *actual_mech_type; + gss_buffer_t output_token; + int *ret_flags; + OM_uint32 *time_rec; +{ return(krb5_gss_init_sec_context(minor_status, claimant_cred_handle, context_handle, @@ -173,14 +240,23 @@ gss_init_sec_context(OM_uint32 *minor_status, } OM_uint32 -gss_inquire_context(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - gss_name_t *initiator_name, - gss_name_t *acceptor_name, - OM_uint32 *lifetime_rec, - gss_OID *mech_type, - int *ret_flags, - int *locally_initiated) { +gss_inquire_context(minor_status, + context_handle, + initiator_name, + acceptor_name, + lifetime_rec, + mech_type, + ret_flags, + locally_initiated) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + gss_name_t *initiator_name; + gss_name_t *acceptor_name; + OM_uint32 *lifetime_rec; + gss_OID *mech_type; + int *ret_flags; + int *locally_initiated; +{ return(krb5_gss_inquire_context(minor_status, context_handle, initiator_name, @@ -192,12 +268,19 @@ gss_inquire_context(OM_uint32 *minor_status, } OM_uint32 -gss_inquire_cred(OM_uint32 *minor_status, - gss_cred_id_t cred_handle, - gss_name_t *name, - OM_uint32 *lifetime_ret, - int *cred_usage, - gss_OID_set *mechanisms) { +gss_inquire_cred(minor_status, + cred_handle, + name, + lifetime_ret, + cred_usage, + mechanisms) + OM_uint32 *minor_status; + gss_cred_id_t cred_handle; + gss_name_t *name; + OM_uint32 *lifetime_ret; + int *cred_usage; + gss_OID_set *mechanisms; +{ return(krb5_gss_inquire_cred(minor_status, cred_handle, name, @@ -207,52 +290,70 @@ gss_inquire_cred(OM_uint32 *minor_status, } OM_uint32 -gss_process_context_token(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - gss_buffer_t token_buffer) { +gss_process_context_token(minor_status, + context_handle, + token_buffer) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + gss_buffer_t token_buffer; +{ return(krb5_gss_process_context_token(minor_status, context_handle, token_buffer)); } OM_uint32 -gss_release_cred(OM_uint32 *minor_status, - gss_cred_id_t *cred_handle) { +gss_release_cred(minor_status, cred_handle) + OM_uint32 *minor_status; + gss_cred_id_t *cred_handle; +{ return(krb5_gss_release_cred(minor_status, cred_handle)); } OM_uint32 -gss_release_name(OM_uint32 *minor_status, - gss_name_t *input_name) { +gss_release_name(minor_status, input_name) + OM_uint32 *minor_status; + gss_name_t *input_name; +{ return(krb5_gss_release_name(minor_status, input_name)); } OM_uint32 -gss_release_buffer(OM_uint32 *minor_status, - gss_buffer_t buffer) +gss_release_buffer(minor_status, buffer) + OM_uint32 *minor_status; + gss_buffer_t buffer; { return(generic_gss_release_buffer(minor_status, buffer)); } OM_uint32 -gss_release_oid_set(OM_uint32* minor_status, - gss_OID_set *set) +gss_release_oid_set(minor_status, set) + OM_uint32* minor_status; + gss_OID_set *set; { return(generic_gss_release_oid_set(minor_status, set)); } OM_uint32 -gss_seal(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - int conf_req_flag, - int qop_req, - gss_buffer_t input_message_buffer, - int *conf_state, - gss_buffer_t output_message_buffer) { +gss_seal(minor_status, + context_handle, + conf_req_flag, + qop_req, + input_message_buffer, + conf_state, + output_message_buffer) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + int conf_req_flag; + int qop_req; + gss_buffer_t input_message_buffer; + int *conf_state; + gss_buffer_t output_message_buffer; +{ return(krb5_gss_seal(minor_status, context_handle, conf_req_flag, @@ -263,11 +364,17 @@ gss_seal(OM_uint32 *minor_status, } OM_uint32 -gss_sign(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - int qop_req, - gss_buffer_t message_buffer, - gss_buffer_t message_token) { +gss_sign(minor_status, + context_handle, + qop_req, + message_buffer, + message_token) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + int qop_req; + gss_buffer_t message_buffer; + gss_buffer_t message_token; +{ return(krb5_gss_sign(minor_status, context_handle, qop_req, @@ -276,12 +383,19 @@ gss_sign(OM_uint32 *minor_status, } OM_uint32 -gss_unseal(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - gss_buffer_t input_message_buffer, - gss_buffer_t output_message_buffer, - int *conf_state, - int *qop_state) { +gss_unseal(minor_status, + context_handle, + input_message_buffer, + output_message_buffer, + conf_state, + qop_state) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + gss_buffer_t input_message_buffer; + gss_buffer_t output_message_buffer; + int *conf_state; + int *qop_state; +{ return(krb5_gss_unseal(minor_status, context_handle, input_message_buffer, @@ -291,11 +405,17 @@ gss_unseal(OM_uint32 *minor_status, } OM_uint32 -gss_verify(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - gss_buffer_t message_buffer, - gss_buffer_t token_buffer, - int *qop_state) { +gss_verify(minor_status, + context_handle, + message_buffer, + token_buffer, + qop_state) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + gss_buffer_t message_buffer; + gss_buffer_t token_buffer; + int *qop_state; +{ return(krb5_gss_verify(minor_status, context_handle, message_buffer, diff --git a/src/lib/gssapi/krb5/process_context_token.c b/src/lib/gssapi/krb5/process_context_token.c index 2b57bdcf4..f71140a2f 100644 --- a/src/lib/gssapi/krb5/process_context_token.c +++ b/src/lib/gssapi/krb5/process_context_token.c @@ -27,9 +27,10 @@ */ OM_uint32 -krb5_gss_process_context_token(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - gss_buffer_t token_buffer) +krb5_gss_process_context_token(minor_status, context_handle, token_buffer) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + gss_buffer_t token_buffer; { krb5_gss_ctx_id_rec *ctx; OM_uint32 majerr; diff --git a/src/lib/gssapi/krb5/release_cred.c b/src/lib/gssapi/krb5/release_cred.c index 02425f30d..851caae58 100644 --- a/src/lib/gssapi/krb5/release_cred.c +++ b/src/lib/gssapi/krb5/release_cred.c @@ -27,8 +27,9 @@ */ OM_uint32 -krb5_gss_release_cred(OM_uint32 *minor_status, - gss_cred_id_t *cred_handle) +krb5_gss_release_cred(minor_status, cred_handle) + OM_uint32 *minor_status; + gss_cred_id_t *cred_handle; { krb5_gss_cred_id_t cred; krb5_error_code code1, code2; diff --git a/src/lib/gssapi/krb5/release_name.c b/src/lib/gssapi/krb5/release_name.c index 6f7b026a4..dec5fada0 100644 --- a/src/lib/gssapi/krb5/release_name.c +++ b/src/lib/gssapi/krb5/release_name.c @@ -27,8 +27,9 @@ #include "gssapiP_krb5.h" OM_uint32 -krb5_gss_release_name(OM_uint32 *minor_status, - gss_name_t *input_name) +krb5_gss_release_name(minor_status, input_name) + OM_uint32 *minor_status; + gss_name_t *input_name; { if (! kg_validate_name(*input_name)) { *minor_status = G_VALIDATE_FAILED; diff --git a/src/lib/gssapi/krb5/seal.c b/src/lib/gssapi/krb5/seal.c index 03b9716df..c27ba1134 100644 --- a/src/lib/gssapi/krb5/seal.c +++ b/src/lib/gssapi/krb5/seal.c @@ -27,13 +27,16 @@ */ OM_uint32 -krb5_gss_seal(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - int conf_req_flag, - int qop_req, - gss_buffer_t input_message_buffer, - int *conf_state, - gss_buffer_t output_message_buffer) +krb5_gss_seal(minor_status, context_handle, conf_req_flag, + qop_req, input_message_buffer, conf_state, + output_message_buffer) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + int conf_req_flag; + int qop_req; + gss_buffer_t input_message_buffer; + int *conf_state; + gss_buffer_t output_message_buffer; { return(kg_seal(minor_status, context_handle, conf_req_flag, qop_req, input_message_buffer, conf_state, diff --git a/src/lib/gssapi/krb5/sign.c b/src/lib/gssapi/krb5/sign.c index f27f4ff16..81e36cac3 100644 --- a/src/lib/gssapi/krb5/sign.c +++ b/src/lib/gssapi/krb5/sign.c @@ -27,11 +27,14 @@ */ OM_uint32 -krb5_gss_sign(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - int qop_req, - gss_buffer_t message_buffer, - gss_buffer_t message_token) +krb5_gss_sign(minor_status, context_handle, + qop_req, message_buffer, + message_token) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + int qop_req; + gss_buffer_t message_buffer; + gss_buffer_t message_token; { return(kg_seal(minor_status, context_handle, 0, qop_req, message_buffer, NULL, diff --git a/src/lib/gssapi/krb5/unseal.c b/src/lib/gssapi/krb5/unseal.c index d55505856..1491034d2 100644 --- a/src/lib/gssapi/krb5/unseal.c +++ b/src/lib/gssapi/krb5/unseal.c @@ -27,12 +27,15 @@ */ OM_uint32 -krb5_gss_unseal(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - gss_buffer_t input_message_buffer, - gss_buffer_t output_message_buffer, - int *conf_state, - int *qop_state) +krb5_gss_unseal(minor_status, context_handle, + input_message_buffer, output_message_buffer, + conf_state, qop_state) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + gss_buffer_t input_message_buffer; + gss_buffer_t output_message_buffer; + int *conf_state; + int *qop_state; { return(kg_unseal(minor_status, context_handle, input_message_buffer, output_message_buffer, diff --git a/src/lib/gssapi/krb5/util_cksum.c b/src/lib/gssapi/krb5/util_cksum.c index b1c752d3f..2b19ea8d4 100644 --- a/src/lib/gssapi/krb5/util_cksum.c +++ b/src/lib/gssapi/krb5/util_cksum.c @@ -27,9 +27,10 @@ * $Id$ */ -krb5_error_code kg_checksum_channel_bindings(gss_channel_bindings_t cb, - krb5_checksum *cksum, - int bigend) +krb5_error_code kg_checksum_channel_bindings(cb, cksum, bigend) + gss_channel_bindings_t cb; + krb5_checksum *cksum; + int bigend; { int len; char *buf, *ptr; diff --git a/src/lib/gssapi/krb5/util_crypt.c b/src/lib/gssapi/krb5/util_crypt.c index b569cb692..7cef48c16 100644 --- a/src/lib/gssapi/krb5/util_crypt.c +++ b/src/lib/gssapi/krb5/util_crypt.c @@ -29,7 +29,8 @@ static unsigned char zeros[8] = {0,0,0,0,0,0,0,0}; -int kg_confounder_size(krb5_gss_enc_desc *ed) +int kg_confounder_size(ed) + krb5_gss_enc_desc *ed; { /* XXX Is this an abstraction violation? */ @@ -37,19 +38,27 @@ int kg_confounder_size(krb5_gss_enc_desc *ed) } krb5_error_code -kg_make_confounder(krb5_gss_enc_desc *ed, unsigned char *buf) +kg_make_confounder(ed, buf) + krb5_gss_enc_desc *ed; + unsigned char *buf; { return(krb5_random_confounder(ed->eblock.crypto_entry->block_length, buf)); } -int kg_encrypt_size(krb5_gss_enc_desc *ed, int n) +int kg_encrypt_size(ed, n) + krb5_gss_enc_desc *ed; + int n; { return(krb5_encrypt_size(n, ed->eblock.crypto_entry)); } krb5_error_code -kg_encrypt(krb5_gss_enc_desc *ed, krb5_pointer iv, - krb5_pointer in, krb5_pointer out, int length) +kg_encrypt(ed, iv, in, out, length) + krb5_gss_enc_desc *ed; + krb5_pointer iv; + krb5_pointer in; + krb5_pointer out; + int length; { krb5_error_code code; @@ -59,7 +68,7 @@ kg_encrypt(krb5_gss_enc_desc *ed, krb5_pointer iv, ed->processed = 1; } - if (code = krb5_encrypt(in, out, length, &ed->eblock, iv?iv:zeros)) + if (code = krb5_encrypt(in, out, length, &ed->eblock, iv?iv:(krb5_pointer)zeros)) return(code); return(0); @@ -68,8 +77,12 @@ kg_encrypt(krb5_gss_enc_desc *ed, krb5_pointer iv, /* length is the length of the cleartext. */ krb5_error_code -kg_decrypt(krb5_gss_enc_desc *ed, krb5_pointer iv, - krb5_pointer in, krb5_pointer out, int length) +kg_decrypt(ed, iv, in, out, length) + krb5_gss_enc_desc *ed; + krb5_pointer iv; + krb5_pointer in; + krb5_pointer out; + int length; { krb5_error_code code; int elen; @@ -85,7 +98,7 @@ kg_decrypt(krb5_gss_enc_desc *ed, krb5_pointer iv, if ((buf = (char *) xmalloc(elen)) == NULL) return(ENOMEM); - if (code = krb5_decrypt(in, buf, elen, &ed->eblock, iv?iv:zeros)) { + if (code = krb5_decrypt(in, buf, elen, &ed->eblock, iv?iv:(krb5_pointer)zeros)) { xfree(buf); return(code); } diff --git a/src/lib/gssapi/krb5/util_seed.c b/src/lib/gssapi/krb5/util_seed.c index 9eb57c1cc..2a342d6cf 100644 --- a/src/lib/gssapi/krb5/util_seed.c +++ b/src/lib/gssapi/krb5/util_seed.c @@ -30,7 +30,9 @@ static unsigned char zeros[16] = {0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0}; krb5_error_code -kg_make_seed(krb5_keyblock *key, unsigned char *seed) +kg_make_seed(key, seed) + krb5_keyblock *key; + unsigned char *seed; { krb5_error_code code; krb5_gss_enc_desc ed; diff --git a/src/lib/gssapi/krb5/util_seqnum.c b/src/lib/gssapi/krb5/util_seqnum.c index 9ab27bf4b..a6f1f8cdf 100644 --- a/src/lib/gssapi/krb5/util_seqnum.c +++ b/src/lib/gssapi/krb5/util_seqnum.c @@ -26,9 +26,12 @@ * $Id$ */ -krb5_error_code kg_make_seq_num(krb5_gss_enc_desc *ed, int direction, - int seqnum, unsigned char *cksum, - unsigned char *buf) +krb5_error_code kg_make_seq_num(ed, direction, seqnum, cksum, buf) + krb5_gss_enc_desc *ed; + int direction; + int seqnum; + unsigned char *cksum; + unsigned char *buf; { unsigned char plain[8]; diff --git a/src/lib/gssapi/krb5/verify.c b/src/lib/gssapi/krb5/verify.c index 1057e2d06..615045fcd 100644 --- a/src/lib/gssapi/krb5/verify.c +++ b/src/lib/gssapi/krb5/verify.c @@ -27,11 +27,14 @@ */ OM_uint32 -krb5_gss_verify(OM_uint32 *minor_status, - gss_ctx_id_t context_handle, - gss_buffer_t message_buffer, - gss_buffer_t token_buffer, - int *qop_state) +krb5_gss_verify(minor_status, context_handle, + token_buffer, message_buffer, + qop_state) + OM_uint32 *minor_status; + gss_ctx_id_t context_handle; + gss_buffer_t message_buffer; + gss_buffer_t token_buffer; + int *qop_state; { return(kg_unseal(minor_status, context_handle, token_buffer, message_buffer,