* $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;
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;
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;
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 */
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;
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;
}
/*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;
(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)
#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;
*/
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;
*/
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;
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))
#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;
/**/
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;
*/
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;
/** 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 */
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 */
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 */
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 */
gss_OID*, /* mech_type */
int*, /* ret_flags */
int* /* locally_initiated */
- );
+ ));
#endif /* _GSSAPIP_KRB5_H_ */
/* 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;
}
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;
#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_ */
* $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;
#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;
*/
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;
}
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;
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)) {
*/
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;
*/
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;
*/
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;
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;
*/
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;
#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,
}
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,
}
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,
}
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,
}
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,
}
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,
}
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,
}
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,
}
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,
}
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,
}
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,
}
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,
}
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,
*/
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;
*/
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;
#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;
*/
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,
*/
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,
*/
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,
* $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;
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? */
}
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;
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);
/* 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;
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);
}
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;
* $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];
*/
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,