"downgrade" to classic C, tweak headers a bit, stamp out widen/narrow
authorMark Eichin <eichin@mit.edu>
Fri, 10 Jun 1994 19:13:21 +0000 (19:13 +0000)
committerMark Eichin <eichin@mit.edu>
Fri, 10 Jun 1994 19:13:21 +0000 (19:13 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3716 dc483132-0cff-0310-8789-dd5450dbe970

30 files changed:
src/lib/gssapi/krb5/accept_sec_context.c
src/lib/gssapi/krb5/acquire_cred.c
src/lib/gssapi/krb5/compare_name.c
src/lib/gssapi/krb5/context_time.c
src/lib/gssapi/krb5/delete_sec_context.c
src/lib/gssapi/krb5/display_name.c
src/lib/gssapi/krb5/display_status.c
src/lib/gssapi/krb5/get_tkt_flags.c
src/lib/gssapi/krb5/gssapiP_krb5.h
src/lib/gssapi/krb5/gssapi_krb5.c
src/lib/gssapi/krb5/gssapi_krb5.h
src/lib/gssapi/krb5/import_name.c
src/lib/gssapi/krb5/indicate_mechs.c
src/lib/gssapi/krb5/init_sec_context.c
src/lib/gssapi/krb5/inquire_context.c
src/lib/gssapi/krb5/inquire_cred.c
src/lib/gssapi/krb5/k5seal.c
src/lib/gssapi/krb5/k5unseal.c
src/lib/gssapi/krb5/krb5_gss_glue.c
src/lib/gssapi/krb5/process_context_token.c
src/lib/gssapi/krb5/release_cred.c
src/lib/gssapi/krb5/release_name.c
src/lib/gssapi/krb5/seal.c
src/lib/gssapi/krb5/sign.c
src/lib/gssapi/krb5/unseal.c
src/lib/gssapi/krb5/util_cksum.c
src/lib/gssapi/krb5/util_crypt.c
src/lib/gssapi/krb5/util_seed.c
src/lib/gssapi/krb5/util_seqnum.c
src/lib/gssapi/krb5/verify.c

index 36c4d936d7d08e7b1f966ba6ef7b96ddbc001de7..c9dac29f67af6a284d9e3a19a7a0f0dd12e0feb3 100644 (file)
  * $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 <krb5/widen.h>
-static krb5_error_code
-rd_req_keyproc(krb5_pointer keyprocarg, krb5_principal server,
-              krb5_kvno kvno, krb5_keyblock **keyblock)
-#include <krb5/narrow.h>
+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 */
 
index d09c7080944bc783064561b9fff43ba55e1a5dcb..9418a278dfd47f1d1b26bdb9386775277d194b75 100644 (file)
    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)
index 455bd6ddddf0515d2285d73a33bbf046e8177a56..a9a4d987896561dfff2f98be2f4b335b319e2049 100644 (file)
 #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;
index 00b8ae3abbf6ca491a3fe72c8e4f61f7cb9fa61a..f4b4034772bf494fe98069d280ce287132d31b73 100644 (file)
  */
 
 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;
index 04196072c65ada0d5ed67cc6279e7cb6fc1f89db..10e8a0c62b2b2ba1a20606588e6a0f006d227fb9 100644 (file)
  */
 
 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))
index d5a83127f533c9bc6d06d41d69ff2091c28df277..f05a92116c0f6651c052cf9850e34c087c9975b1 100644 (file)
 #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;
index 974698d786177b9b7243417c680b76334c751db9..cf26652dd357e9be299b7e4978da349dc0815ff2 100644 (file)
@@ -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;
index a35259c063563a14679779c134979aa4ea16d704..e0a321662b934726d707d5b45eec4e6afc162c6b 100644 (file)
  */
 
 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;
 
index efe6c86445153801ce5600d2fb46446a7e5c354e..9a13367a4b6b20737defffa56869a78b06acbdc5 100644 (file)
@@ -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_ */
index 699b4308d16de932a387a362d7907555bc0cdea3..1e46e374a9af0d4e799df558a01e20474ac701d9 100644 (file)
@@ -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;
index 2cff6b289c76a76864dddef4bf5c00d7e6bde182..fccbb38e7db8b921e4837bbbb611173b0b78b0ec 100644 (file)
@@ -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_ */
index 51fbd9f439bd949b4bfd00767a82c433fa399956..085c760fcc32112d64285227f42b0f47e0b55264 100644 (file)
  * $Id$
  */
 
-#include <string.h>
-#include <pwd.h>
 
 #include "gssapiP_krb5.h"
+#include <pwd.h>
+#ifdef USE_STRING_H
+#include <string.h>
+#else
+#include <strings.h>
+#endif
 
 /*
  * errors:
  */
 
 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;
index c20679f952489dfbabca60888caaa405fc5330e1..bc53b4434d84c229278408275681879e27f046aa 100644 (file)
@@ -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;
index 87cf0ae1d2809ca579bd67ac5852a80ff859150b..a377f7f9e7a66e305a049eccace8dbbf9b2f698b 100644 (file)
  */
 
 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)) {
index 771a3521393d34d126fc14d338f749dccf8b4a03..6184bbc69822968f630f25ab8c8556421f748bb3 100644 (file)
  */
 
 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;
index 7795fca151285833d4c9505ace770da89d8013a2..0fc3fc5f8e8040fbd8fd45df23e3a6614f1c1ef7 100644 (file)
  */
 
 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;
index 423732ff82e4c5da01ebd12a3109dfcf4ee59dac..6c1c98cdbb5fbf3b255a5173e28a1ab068298c6d 100644 (file)
  */
 
 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;
index 7ade042534e7389883a5cdca45b5b7f2076dd8ac..7a3bbfb428a39a32d57811f2a6e71a7afbaa3007 100644 (file)
    */
 
 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;
index ecebdd161cee7b14a14972e22f85175218e99233..de4622fc4db5f22dcdb34880dc315d21f89a8a75 100644 (file)
 #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,
index 2b57bdcf47fb11dfeb0b225c8bf512760ee35bd7..f71140a2f191fa7c89495e6ab8a58122528ce29e 100644 (file)
  */
 
 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;
index 02425f30d13efb9d90961571cb65396a733bfd4c..851caae58373fab8fa2af21008641771c6a8d318 100644 (file)
@@ -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;
index 6f7b026a45936f415a9067c10da9bd6147f4a325..dec5fada05799396bedf0bd6c421cf909c0414da 100644 (file)
@@ -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;
index 03b9716df3e114f383dbbee19d2b434118427e46..c27ba1134ae4dc6917aa0197683b9608762443db 100644 (file)
  */
 
 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,
index f27f4ff1685c65b3b5f0d00d263f3a0ab3a9dadd..81e36cac3affc3f26e13aa54ca665a1f1772d0bc 100644 (file)
  */
 
 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,
index d55505856a4130c27d5a9ba3b98e5807d9aae949..1491034d26aa02f88976d227bb38e080b8d5824a 100644 (file)
  */
 
 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,
index b1c752d3f44184fd5b858abfdeb411eaaa3edea7..2b19ea8d4844ca9ff58fde8a280d3eeb59535647 100644 (file)
  * $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;
index b569cb6926940119747f90961c5aa41f64e15526..7cef48c169482e8a0575c59a1155c0423de9207f 100644 (file)
@@ -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);
    }
index 9eb57c1cc142d053b49691d438621a49b5d7fc79..2a342d6cf8f238a2ae4e1df1c1d3ffac89486a46 100644 (file)
@@ -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;
index 9ab27bf4b1599f2c4b36ea6da0fe3055cbb0431d..a6f1f8cdfef5e73aeb6cf371aeca699cf9ff0d16 100644 (file)
  * $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];
 
index 1057e2d064f71ef4ac7871754ce83a6f4f62034c..615045fcdbf8209b179c467e426b1261594e86c2 100644 (file)
  */
 
 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,