#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
-scriptversion=2009-10-06.20; # UTC
+scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
# Foundation, Inc.
ret=$?
if test -f "$cofile"; then
- test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+ mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
- test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+ mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
eapGssSmAcceptGssReauth(OM_uint32 *minor,
gss_cred_id_t cred,
gss_ctx_id_t ctx,
- gss_name_t target,
+ gss_const_name_t target,
gss_OID mech,
OM_uint32 reqFlags,
OM_uint32 timeReq,
eapGssSmAcceptAcceptorName(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmAcceptVendorInfo(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx GSSEAP_UNUSED,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmAcceptIdentity(OM_uint32 *minor,
gss_cred_id_t cred,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmAcceptAuthenticate(OM_uint32 *minor,
gss_cred_id_t cred,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmAcceptGssFlags(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmAcceptGssChannelBindings(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmAcceptInitiatorMIC(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmAcceptReauthCreds(OM_uint32 *minor,
gss_cred_id_t cred,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmAcceptAcceptorMIC(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmAcceptGssReauth(OM_uint32 *minor,
gss_cred_id_t cred,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
OM_uint32 GSSAPI_CALLCONV
gss_accept_sec_context(OM_uint32 *minor,
gss_ctx_id_t *context_handle,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_cred_id_t cred,
+#else
gss_cred_id_t cred,
+#endif
gss_buffer_t input_token,
gss_channel_bindings_t input_chan_bindings,
gss_name_t *src_name,
major = gssEapAcceptSecContext(minor,
ctx,
- cred,
+ (gss_cred_id_t)cred,
input_token,
input_chan_bindings,
src_name,
OM_uint32 GSSAPI_CALLCONV
gss_acquire_cred(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_name_t desired_name,
+#else
gss_name_t desired_name,
+#endif
OM_uint32 time_req,
gss_OID_set desired_mechs,
gss_cred_usage_t cred_usage,
*/
OM_uint32 GSSAPI_CALLCONV
gss_add_cred(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_cred_id_t input_cred_handle GSSEAP_UNUSED,
+ gss_const_name_t desired_name,
+#else
gss_cred_id_t input_cred_handle GSSEAP_UNUSED,
gss_name_t desired_name,
+#endif
gss_OID desired_mech,
gss_cred_usage_t cred_usage,
OM_uint32 initiator_time_req,
OM_uint32 GSSAPI_CALLCONV
gss_add_cred_with_password(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_cred_id_t input_cred_handle GSSEAP_UNUSED,
+ gss_const_name_t desired_name,
+#else
const gss_cred_id_t input_cred_handle GSSEAP_UNUSED,
const gss_name_t desired_name,
+#endif
const gss_OID desired_mech,
const gss_buffer_t password,
gss_cred_usage_t cred_usage,
OM_uint32 GSSAPI_CALLCONV
gss_canonicalize_name(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_name_t input_name,
+#else
const gss_name_t input_name,
+#endif
const gss_OID mech_type,
gss_name_t *output_name)
{
return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAME;
}
- GSSEAP_MUTEX_LOCK(&input_name->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_name_t)input_name)->mutex);
major = gssEapCanonicalizeName(minor, input_name, mech_type, output_name);
- GSSEAP_MUTEX_UNLOCK(&input_name->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_name_t)input_name)->mutex);
return major;
}
OM_uint32 GSSAPI_CALLCONV
gss_compare_name(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_name_t name1,
+ gss_const_name_t name2,
+#else
gss_name_t name1,
gss_name_t name2,
+#endif
int *name_equal)
{
return gssEapCompareName(minor, name1, name2, 0, name_equal);
OM_uint32 GSSAPI_CALLCONV
gss_context_time(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_ctx_id_t ctx,
+#else
gss_ctx_id_t ctx,
+#endif
OM_uint32 *time_rec)
{
OM_uint32 major;
*minor = 0;
- GSSEAP_MUTEX_LOCK(&ctx->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_ctx_id_t)ctx)->mutex);
if (!CTX_IS_ESTABLISHED(ctx)) {
*minor = GSSEAP_CONTEXT_INCOMPLETE;
goto cleanup;
cleanup:
- GSSEAP_MUTEX_UNLOCK(&ctx->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_ctx_id_t)ctx)->mutex);
return major;
}
OM_uint32 GSSAPI_CALLCONV
gss_display_name(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_name_t name,
+#else
gss_name_t name,
+#endif
gss_buffer_t output_name_buffer,
gss_OID *output_name_type)
{
OM_uint32 GSSAPI_CALLCONV
gss_duplicate_name(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_name_t input_name,
+#else
const gss_name_t input_name,
+#endif
gss_name_t *dest_name)
{
OM_uint32 major;
return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAME;
}
- GSSEAP_MUTEX_LOCK(&input_name->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_name_t)input_name)->mutex);
major = gssEapDuplicateName(minor, input_name, dest_name);
- GSSEAP_MUTEX_UNLOCK(&input_name->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_name_t)input_name)->mutex);
return major;
}
OM_uint32 GSSAPI_CALLCONV
gss_export_name(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_name_t input_name,
+#else
const gss_name_t input_name,
+#endif
gss_buffer_t exported_name)
{
OM_uint32 major;
return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAME;
}
- GSSEAP_MUTEX_LOCK(&input_name->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_name_t)input_name)->mutex);
major = gssEapExportName(minor, input_name, exported_name);
- GSSEAP_MUTEX_UNLOCK(&input_name->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_name_t)input_name)->mutex);
return major;
}
OM_uint32 GSSAPI_CALLCONV
gss_get_mic(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_ctx_id_t ctx,
+#else
gss_ctx_id_t ctx,
+#endif
gss_qop_t qop_req,
+#ifdef HAVE_HEIMDAL_VERSION
+ const gss_buffer_t message_buffer,
+#else
gss_buffer_t message_buffer,
+#endif
gss_buffer_t message_token)
{
OM_uint32 major;
iov[1].buffer.value = NULL;
iov[1].buffer.length = 0;
- major = gss_get_mic_iov(minor, ctx, qop_req, iov, 2);
+ major = gss_get_mic_iov(minor, (gss_ctx_id_t)ctx, qop_req, iov, 2);
if (major == GSS_S_COMPLETE)
*message_token = iov[1].buffer;
gssEapInitSecContext(OM_uint32 *minor,
gss_cred_id_t cred,
gss_ctx_id_t ctx,
- gss_name_t target_name,
+ gss_const_name_t target_name,
gss_OID mech_type,
OM_uint32 req_flags,
OM_uint32 time_req,
OM_uint32
gssEapWrapIovLength(OM_uint32 *minor,
- gss_ctx_id_t ctx,
+ gss_const_ctx_id_t ctx,
int conf_req_flag,
gss_qop_t qop_req,
int *conf_state,
gss_buffer_t output_message_buffer);
unsigned char
-rfc4121Flags(gss_ctx_id_t ctx, int receiving);
+rfc4121Flags(gss_const_ctx_id_t ctx, int receiving);
/* display_status.c */
void
/* pseudo_random.c */
OM_uint32
gssEapPseudoRandom(OM_uint32 *minor,
- gss_ctx_id_t ctx,
+ gss_const_ctx_id_t ctx,
int prf_key,
const gss_buffer_t prf_in,
gss_buffer_t prf_out);
static OM_uint32
initBegin(OM_uint32 *minor,
gss_ctx_id_t ctx,
- gss_name_t target,
+ gss_const_name_t target,
gss_OID mech,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq,
return major;
if (target != GSS_C_NO_NAME) {
- GSSEAP_MUTEX_LOCK(&target->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_name_t)target)->mutex);
major = gssEapDuplicateName(minor, target, &ctx->acceptorName);
if (GSS_ERROR(major)) {
- GSSEAP_MUTEX_UNLOCK(&target->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_name_t)target)->mutex);
return major;
}
- GSSEAP_MUTEX_UNLOCK(&target->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_name_t)target)->mutex);
}
major = gssEapCanonicalizeOid(minor,
eapGssSmInitError(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx GSSEAP_UNUSED,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmInitGssReauth(OM_uint32 *minor,
gss_cred_id_t cred,
gss_ctx_id_t ctx,
- gss_name_t target,
+ gss_const_name_t target,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags,
OM_uint32 timeReq,
eapGssSmInitVendorInfo(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx GSSEAP_UNUSED,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmInitAcceptorName(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmInitIdentity(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmInitAuthenticate(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmInitGssFlags(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmInitGssChannelBindings(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmInitInitiatorMIC(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmInitReauthCreds(OM_uint32 *minor,
gss_cred_id_t cred,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
eapGssSmInitAcceptorMIC(OM_uint32 *minor,
gss_cred_id_t cred GSSEAP_UNUSED,
gss_ctx_id_t ctx,
- gss_name_t target GSSEAP_UNUSED,
+ gss_const_name_t target GSSEAP_UNUSED,
gss_OID mech GSSEAP_UNUSED,
OM_uint32 reqFlags GSSEAP_UNUSED,
OM_uint32 timeReq GSSEAP_UNUSED,
gssEapInitSecContext(OM_uint32 *minor,
gss_cred_id_t cred,
gss_ctx_id_t ctx,
- gss_name_t target_name,
+ gss_const_name_t target_name,
gss_OID mech_type,
OM_uint32 req_flags,
OM_uint32 time_req,
OM_uint32 GSSAPI_CALLCONV
gss_init_sec_context(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_cred_id_t cred,
+#else
gss_cred_id_t cred,
+#endif
gss_ctx_id_t *context_handle,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_name_t target_name,
+#else
gss_name_t target_name,
+#endif
gss_OID mech_type,
OM_uint32 req_flags,
OM_uint32 time_req,
GSSEAP_MUTEX_LOCK(&ctx->mutex);
major = gssEapInitSecContext(minor,
- cred,
+ (gss_cred_id_t)cred,
ctx,
target_name,
mech_type,
OM_uint32 GSSAPI_CALLCONV
gss_inquire_context(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_ctx_id_t ctx,
+#else
gss_ctx_id_t ctx,
+#endif
gss_name_t *src_name,
gss_name_t *targ_name,
OM_uint32 *lifetime_rec,
return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_NO_CONTEXT;
}
- GSSEAP_MUTEX_LOCK(&ctx->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_ctx_id_t)ctx)->mutex);
if (src_name != NULL) {
if (ctx->initiatorName != GSS_C_NO_NAME) {
*minor = 0;
cleanup:
- GSSEAP_MUTEX_UNLOCK(&ctx->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_ctx_id_t)ctx)->mutex);
if (GSS_ERROR(major)) {
gssEapReleaseName(&tmpMinor, src_name);
OM_uint32 GSSAPI_CALLCONV
gss_inquire_cred(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_cred_id_t cred,
+#else
gss_cred_id_t cred,
+#endif
gss_name_t *name,
OM_uint32 *pLifetime,
gss_cred_usage_t *cred_usage,
return GSS_S_NO_CRED;
}
- GSSEAP_MUTEX_LOCK(&cred->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_cred_id_t)cred)->mutex);
- major = gssEapInquireCred(minor, cred, name, pLifetime, cred_usage, mechanisms);
+ major = gssEapInquireCred(minor, (gss_cred_id_t)cred, name, pLifetime,
+ cred_usage, mechanisms);
- GSSEAP_MUTEX_UNLOCK(&cred->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_cred_id_t)cred)->mutex);
return major;
}
OM_uint32 GSSAPI_CALLCONV
gss_inquire_cred_by_mech(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_cred_id_t cred,
+#else
gss_cred_id_t cred,
+#endif
gss_OID mech_type,
gss_name_t *name,
OM_uint32 *pInitiatorLifetime,
return GSS_S_NO_CRED;
}
- GSSEAP_MUTEX_LOCK(&cred->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_cred_id_t)cred)->mutex);
if (!gssEapCredAvailable(cred, mech_type)) {
major = GSS_S_BAD_MECH;
goto cleanup;
}
- major = gssEapInquireCred(minor, cred, name, &lifetime, cred_usage, NULL);
+ major = gssEapInquireCred(minor, (gss_cred_id_t)cred, name,
+ &lifetime, cred_usage, NULL);
if (GSS_ERROR(major))
goto cleanup;
*pAcceptorLifetime = (cred->flags & CRED_FLAG_ACCEPT) ? lifetime : 0;
cleanup:
- GSSEAP_MUTEX_UNLOCK(&cred->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_cred_id_t)cred)->mutex);
return major;
}
OM_uint32 GSSAPI_CALLCONV
gss_inquire_cred_by_oid(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_cred_id_t cred_handle,
+#else
const gss_cred_id_t cred_handle,
+#endif
const gss_OID desired_object GSSEAP_UNUSED,
gss_buffer_set_t *data_set)
{
return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_NO_CRED;
}
- GSSEAP_MUTEX_LOCK(&cred_handle->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_cred_id_t)cred_handle)->mutex);
major = GSS_S_UNAVAILABLE;
*minor = GSSEAP_BAD_CRED_OPTION;
}
#endif
- GSSEAP_MUTEX_UNLOCK(&cred_handle->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_cred_id_t)cred_handle)->mutex);
return major;
}
OM_uint32 GSSAPI_CALLCONV
gss_inquire_mechs_for_name(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_name_t input_name,
+#else
const gss_name_t input_name,
+#endif
gss_OID_set *mech_types)
{
OM_uint32 major, tmpMinor;
static OM_uint32
inquireSessionKey(OM_uint32 *minor,
- const gss_ctx_id_t ctx,
+ gss_const_ctx_id_t ctx,
const gss_OID desired_object GSSEAP_UNUSED,
gss_buffer_set_t *dataSet)
{
static OM_uint32
inquireNegoExKey(OM_uint32 *minor,
- const gss_ctx_id_t ctx,
+ gss_const_ctx_id_t ctx,
const gss_OID desired_object,
gss_buffer_set_t *dataSet)
{
static struct {
gss_OID_desc oid;
- OM_uint32 (*inquire)(OM_uint32 *, const gss_ctx_id_t,
+ OM_uint32 (*inquire)(OM_uint32 *, gss_const_ctx_id_t,
const gss_OID, gss_buffer_set_t *);
} inquireCtxOps[] = {
{
OM_uint32 GSSAPI_CALLCONV
gss_inquire_sec_context_by_oid(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_ctx_id_t ctx,
+#else
const gss_ctx_id_t ctx,
+#endif
const gss_OID desired_object,
gss_buffer_set_t *data_set)
{
*data_set = GSS_C_NO_BUFFER_SET;
- GSSEAP_MUTEX_LOCK(&ctx->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_ctx_id_t)ctx)->mutex);
#if 0
if (!CTX_IS_ESTABLISHED(ctx)) {
}
}
- GSSEAP_MUTEX_UNLOCK(&ctx->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_ctx_id_t)ctx)->mutex);
return major;
}
OM_uint32 GSSAPI_CALLCONV
gss_process_context_token(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_ctx_id_t ctx,
+#else
gss_ctx_id_t ctx,
+#endif
gss_buffer_t token_buffer)
{
OM_uint32 major;
return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_NO_CONTEXT;
}
- GSSEAP_MUTEX_LOCK(&ctx->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_ctx_id_t)ctx)->mutex);
if (!CTX_IS_ESTABLISHED(ctx)) {
- GSSEAP_MUTEX_UNLOCK(&ctx->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_ctx_id_t)ctx)->mutex);
*minor = GSSEAP_CONTEXT_INCOMPLETE;
return GSS_S_NO_CONTEXT;
}
iov[0].type = GSS_IOV_BUFFER_TYPE_HEADER;
iov[0].buffer = *token_buffer;
- major = gssEapUnwrapOrVerifyMIC(minor, ctx, NULL, NULL,
+ major = gssEapUnwrapOrVerifyMIC(minor, (gss_ctx_id_t)ctx, NULL, NULL,
iov, 1, TOK_TYPE_DELETE_CONTEXT);
if (GSS_ERROR(major)) {
- GSSEAP_MUTEX_UNLOCK(&ctx->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_ctx_id_t)ctx)->mutex);
return major;
}
- GSSEAP_MUTEX_UNLOCK(&ctx->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_ctx_id_t)ctx)->mutex);
- return gssEapReleaseContext(minor, &ctx);
+ return gssEapReleaseContext(minor, (gss_ctx_id_t *)&ctx);
}
OM_uint32
gssEapPseudoRandom(OM_uint32 *minor,
- gss_ctx_id_t ctx,
+ gss_const_ctx_id_t ctx,
int prf_key,
const gss_buffer_t prf_in,
gss_buffer_t prf_out)
OM_uint32 GSSAPI_CALLCONV
gss_unwrap(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_ctx_id_t ctx,
+#else
gss_ctx_id_t ctx,
+#endif
gss_buffer_t input_message_buffer,
gss_buffer_t output_message_buffer,
int *conf_state,
*minor = 0;
- GSSEAP_MUTEX_LOCK(&ctx->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_ctx_id_t)ctx)->mutex);
if (!CTX_IS_ESTABLISHED(ctx)) {
major = GSS_S_NO_CONTEXT;
iov[1].buffer.value = NULL;
iov[1].buffer.length = 0;
- major = gssEapUnwrapOrVerifyMIC(minor, ctx, conf_state, qop_state,
+ major = gssEapUnwrapOrVerifyMIC(minor, (gss_ctx_id_t)ctx,
+ conf_state, qop_state,
iov, 2, TOK_TYPE_WRAP);
if (major == GSS_S_COMPLETE) {
*output_message_buffer = iov[1].buffer;
}
cleanup:
- GSSEAP_MUTEX_UNLOCK(&ctx->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_ctx_id_t)ctx)->mutex);
return major;
}
OM_uint32
gssEapContextTime(OM_uint32 *minor,
- gss_ctx_id_t context_handle,
+ gss_const_ctx_id_t context_handle,
OM_uint32 *time_rec);
OM_uint32
OM_uint32
gssEapAcquireCred(OM_uint32 *minor,
- const gss_name_t desiredName,
+ gss_const_name_t desiredName,
OM_uint32 timeReq,
const gss_OID_set desiredMechs,
int cred_usage,
OM_uint32
gssEapSetCredService(OM_uint32 *minor,
gss_cred_id_t cred,
- const gss_name_t target);
+ gss_const_name_t target);
OM_uint32
gssEapResolveInitiatorCred(OM_uint32 *minor,
const gss_cred_id_t cred,
- const gss_name_t target,
+ gss_const_name_t target,
gss_cred_id_t *resolvedCred);
-int gssEapCredAvailable(gss_cred_id_t cred, gss_OID mech);
+int gssEapCredAvailable(gss_const_cred_id_t cred, gss_OID mech);
OM_uint32
gssEapInquireCred(OM_uint32 *minor,
#ifdef HAVE_HEIMDAL_VERSION
krb5_crypto krbCrypto,
#else
- krb5_keyblock *key,
+ const krb5_keyblock *key,
#endif
int type,
size_t *length);
#ifdef HAVE_HEIMDAL_VERSION
krb5_crypto krbCrypto,
#else
- krb5_keyblock *key,
+ const krb5_keyblock *key,
#endif
size_t dataLength,
size_t *padLength);
#ifdef HAVE_HEIMDAL_VERSION
krb5_crypto krbCrypto,
#else
- krb5_keyblock *key,
+ const krb5_keyblock *key,
#endif
size_t *blockSize);
/* util_lucid.c */
OM_uint32
gssEapExportLucidSecContext(OM_uint32 *minor,
- gss_ctx_id_t ctx,
+ gss_const_ctx_id_t ctx,
const gss_OID desiredObject,
gss_buffer_set_t *data_set);
OM_uint32
libMoonshotResolveInitiatorCred(OM_uint32 *minor,
gss_cred_id_t cred,
- const gss_name_t targetName);
+ gss_const_name_t targetName);
/* util_name.c */
#define EXPORT_NAME_FLAG_OID 0x1
OM_uint32 gssEapAllocName(OM_uint32 *minor, gss_name_t *pName);
OM_uint32 gssEapReleaseName(OM_uint32 *minor, gss_name_t *pName);
OM_uint32 gssEapExportName(OM_uint32 *minor,
- const gss_name_t name,
+ gss_const_name_t name,
gss_buffer_t exportedName);
OM_uint32 gssEapExportNameInternal(OM_uint32 *minor,
- const gss_name_t name,
+ gss_const_name_t name,
gss_buffer_t exportedName,
OM_uint32 flags);
OM_uint32 gssEapImportName(OM_uint32 *minor,
OM_uint32 flags);
OM_uint32
gssEapDuplicateName(OM_uint32 *minor,
- const gss_name_t input_name,
+ gss_const_name_t input_name,
gss_name_t *dest_name);
OM_uint32
gssEapCanonicalizeName(OM_uint32 *minor,
- const gss_name_t input_name,
+ gss_const_name_t input_name,
const gss_OID mech_type,
gss_name_t *dest_name);
OM_uint32
gssEapDisplayName(OM_uint32 *minor,
- gss_name_t name,
+ gss_const_name_t name,
gss_buffer_t output_name_buffer,
gss_OID *output_name_type);
OM_uint32
gssEapCompareName(OM_uint32 *minor,
- gss_name_t name1,
- gss_name_t name2,
+ gss_const_name_t name1,
+ gss_const_name_t name2,
OM_uint32 flags,
int *name_equal);
OM_uint32 (*processToken)(OM_uint32 *,
gss_cred_id_t,
gss_ctx_id_t,
- gss_name_t,
+ gss_const_name_t,
gss_OID,
OM_uint32,
OM_uint32,
gssEapSmStep(OM_uint32 *minor,
gss_cred_id_t cred,
gss_ctx_id_t ctx,
- gss_name_t target,
+ gss_const_name_t target,
gss_OID mech,
OM_uint32 reqFlags,
OM_uint32 timeReq,
OM_uint32
gssEapExportAttrContext(OM_uint32 *minor,
- gss_name_t name,
+ gss_const_name_t name,
gss_buffer_t buffer)
{
if (name->attrCtx == NULL) {
OM_uint32
gssEapDuplicateAttrContext(OM_uint32 *minor,
- gss_name_t in,
+ gss_const_name_t in,
gss_name_t out)
{
gss_eap_attr_ctx *ctx = NULL;
OM_uint32
gssEapExportAttrContext(OM_uint32 *minor,
- gss_name_t name,
+ gss_const_name_t name,
gss_buffer_t buffer);
OM_uint32
OM_uint32
gssEapDuplicateAttrContext(OM_uint32 *minor,
- gss_name_t in,
+ gss_const_name_t in,
gss_name_t out);
OM_uint32
OM_uint32
gssEapContextTime(OM_uint32 *minor,
- gss_ctx_id_t context_handle,
+ gss_const_ctx_id_t context_handle,
OM_uint32 *time_rec)
{
*minor = 0;
OM_uint32
gssEapAcquireCred(OM_uint32 *minor,
- const gss_name_t desiredName,
+ gss_const_name_t desiredName,
OM_uint32 timeReq GSSEAP_UNUSED,
const gss_OID_set desiredMechs,
int credUsage,
goto cleanup;
if (desiredName != GSS_C_NO_NAME) {
- GSSEAP_MUTEX_LOCK(&desiredName->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_name_t)desiredName)->mutex);
major = gssEapDuplicateName(minor, desiredName, &cred->name);
if (GSS_ERROR(major)) {
- GSSEAP_MUTEX_UNLOCK(&desiredName->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_name_t)desiredName)->mutex);
goto cleanup;
}
- GSSEAP_MUTEX_UNLOCK(&desiredName->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_name_t)desiredName)->mutex);
}
#ifdef GSSEAP_ENABLE_ACCEPTOR
* lock because mechanisms list is immutable.
*/
int
-gssEapCredAvailable(gss_cred_id_t cred, gss_OID mech)
+gssEapCredAvailable(gss_const_cred_id_t cred, gss_OID mech)
{
OM_uint32 minor;
int present = 0;
OM_uint32
gssEapSetCredService(OM_uint32 *minor,
gss_cred_id_t cred,
- const gss_name_t target)
+ gss_const_name_t target)
{
OM_uint32 major, tmpMinor;
gss_name_t newTarget = GSS_C_NO_NAME;
OM_uint32
gssEapResolveInitiatorCred(OM_uint32 *minor,
const gss_cred_id_t cred,
- const gss_name_t targetName
+ gss_const_name_t targetName
#ifndef HAVE_MOONSHOT_GET_IDENTITY
GSSEAP_UNUSED
#endif
#ifdef HAVE_HEIMDAL_VERSION
krb5_crypto krbCrypto,
#else
- krb5_keyblock *key,
+ const krb5_keyblock *key,
#endif
int type,
size_t *length)
#ifdef HAVE_HEIMDAL_VERSION
krb5_crypto krbCrypto,
#else
- krb5_keyblock *key,
+ const krb5_keyblock *key,
#endif
size_t dataLength,
size_t *padLength)
#ifdef HAVE_HEIMDAL_VERSION
krb5_crypto krbCrypto,
#else
- krb5_keyblock *key,
+ const krb5_keyblock *key,
#endif
size_t *blockSize)
{
OM_uint32
gssEapExportLucidSecContext(OM_uint32 *minor,
- gss_ctx_id_t ctx,
+ gss_const_ctx_id_t ctx,
const gss_OID desiredObject GSSEAP_UNUSED,
gss_buffer_set_t *data_set)
{
OM_uint32
libMoonshotResolveInitiatorCred(OM_uint32 *minor,
gss_cred_id_t cred,
- const gss_name_t targetName)
+ gss_const_name_t targetName)
{
OM_uint32 major, tmpMinor;
gss_OID nameMech = gssEapPrimaryMechForCred(cred);
OM_uint32
gssEapExportName(OM_uint32 *minor,
- const gss_name_t name,
+ gss_const_name_t name,
gss_buffer_t exportedName)
{
return gssEapExportNameInternal(minor, name, exportedName,
OM_uint32
gssEapExportNameInternal(OM_uint32 *minor,
- const gss_name_t name,
+ gss_const_name_t name,
gss_buffer_t exportedName,
OM_uint32 flags)
{
OM_uint32
gssEapCanonicalizeName(OM_uint32 *minor,
- const gss_name_t input_name,
+ gss_const_name_t input_name,
const gss_OID mech_type,
gss_name_t *dest_name)
{
OM_uint32
gssEapDuplicateName(OM_uint32 *minor,
- const gss_name_t input_name,
+ gss_const_name_t input_name,
gss_name_t *dest_name)
{
return gssEapCanonicalizeName(minor, input_name,
}
static int
-hasRealmP(gss_name_t name)
+hasRealmP(gss_const_name_t name)
{
#ifdef HAVE_HEIMDAL_VERSION
if (KRB_PRINC_REALM(name->krbPrincipal) != NULL &&
OM_uint32
gssEapDisplayName(OM_uint32 *minor,
- gss_name_t name,
+ gss_const_name_t name,
gss_buffer_t output_name_buffer,
gss_OID *output_name_type)
{
OM_uint32
gssEapCompareName(OM_uint32 *minor,
- gss_name_t name1,
- gss_name_t name2,
+ gss_const_name_t name1,
+ gss_const_name_t name2,
OM_uint32 flags,
int *name_equal)
{
gssEapSmStep(OM_uint32 *minor,
gss_cred_id_t cred,
gss_ctx_id_t ctx,
- gss_name_t target,
+ gss_const_name_t target,
gss_OID mech,
OM_uint32 reqFlags,
OM_uint32 timeReq,
return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_NO_CONTEXT;
}
- GSSEAP_MUTEX_LOCK(&ctx->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_ctx_id_t)ctx)->mutex);
- major = gssEapUnwrapOrVerifyMIC(minor, ctx, NULL, qop_state,
+ major = gssEapUnwrapOrVerifyMIC(minor, (gss_ctx_id_t)ctx, NULL, qop_state,
iov, iov_count, TOK_TYPE_MIC);
- GSSEAP_MUTEX_UNLOCK(&ctx->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_ctx_id_t)ctx)->mutex);
return major;
}
OM_uint32 GSSAPI_CALLCONV
gss_verify_mic(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_ctx_id_t ctx,
+#else
gss_ctx_id_t ctx,
+#endif
gss_buffer_t message_buffer,
gss_buffer_t message_token,
gss_qop_t *qop_state)
iov[1].type = GSS_IOV_BUFFER_TYPE_MIC_TOKEN;
iov[1].buffer = *message_token;
- return gss_verify_mic_iov(minor, ctx, qop_state, iov, 2);
+ return gss_verify_mic_iov(minor, (gss_ctx_id_t)ctx, qop_state, iov, 2);
}
OM_uint32 GSSAPI_CALLCONV
gss_wrap(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_ctx_id_t ctx,
+#else
gss_ctx_id_t ctx,
+#endif
int conf_req_flag,
gss_qop_t qop_req,
gss_buffer_t input_message_buffer,
*minor = 0;
- GSSEAP_MUTEX_LOCK(&ctx->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_ctx_id_t)ctx)->mutex);
if (!CTX_IS_ESTABLISHED(ctx)) {
major = GSS_S_NO_CONTEXT;
goto cleanup;
}
- major = gssEapWrap(minor, ctx, conf_req_flag, qop_req,
- input_message_buffer,
+ major = gssEapWrap(minor, (gss_ctx_id_t)ctx, conf_req_flag,
+ qop_req, input_message_buffer,
conf_state, output_message_buffer);
if (GSS_ERROR(major))
goto cleanup;
cleanup:
- GSSEAP_MUTEX_UNLOCK(&ctx->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_ctx_id_t)ctx)->mutex);
return major;
}
#include "gssapiP_eap.h"
unsigned char
-rfc4121Flags(gss_ctx_id_t ctx, int receiving)
+rfc4121Flags(gss_const_ctx_id_t ctx, int receiving)
{
unsigned char flags;
int isAcceptor;
*minor = 0;
- GSSEAP_MUTEX_LOCK(&ctx->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_ctx_id_t)ctx)->mutex);
if (!CTX_IS_ESTABLISHED(ctx)) {
major = GSS_S_NO_CONTEXT;
goto cleanup;
}
- major = gssEapWrapOrGetMIC(minor, ctx, conf_req_flag, conf_state,
+ major = gssEapWrapOrGetMIC(minor, (gss_ctx_id_t)ctx, conf_req_flag, conf_state,
iov, iov_count, TOK_TYPE_WRAP);
if (GSS_ERROR(major))
goto cleanup;
cleanup:
- GSSEAP_MUTEX_UNLOCK(&ctx->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_ctx_id_t)ctx)->mutex);
return major;
}
OM_uint32
gssEapWrapIovLength(OM_uint32 *minor,
- gss_ctx_id_t ctx,
+ gss_const_ctx_id_t ctx,
int conf_req_flag,
gss_qop_t qop_req,
int *conf_state,
OM_uint32 GSSAPI_CALLCONV
gss_wrap_size_limit(OM_uint32 *minor,
+#ifdef HAVE_HEIMDAL_VERSION
+ gss_const_ctx_id_t ctx,
+#else
gss_ctx_id_t ctx,
+#endif
int conf_req_flag,
gss_qop_t qop_req,
OM_uint32 req_output_size,
*minor = 0;
- GSSEAP_MUTEX_LOCK(&ctx->mutex);
+ GSSEAP_MUTEX_LOCK(&((gss_ctx_id_t)ctx)->mutex);
if (!CTX_IS_ESTABLISHED(ctx)) {
major = GSS_S_NO_CONTEXT;
*max_input_size = 0;
cleanup:
- GSSEAP_MUTEX_UNLOCK(&ctx->mutex);
+ GSSEAP_MUTEX_UNLOCK(&((gss_ctx_id_t)ctx)->mutex);
return major;
}