int g_copy_OID_set (const gss_OID_set_desc * const in, gss_OID_set *out);
-unsigned int g_token_size (gss_OID mech, unsigned int body_size);
+unsigned int g_token_size (const gss_OID_desc * mech, unsigned int body_size);
-void g_make_token_header (gss_OID mech, unsigned int body_size,
+void g_make_token_header (const gss_OID_desc * mech, unsigned int body_size,
unsigned char **buf, int tok_type);
-gss_int32 g_verify_token_header (gss_OID mech, unsigned int *body_size,
+gss_int32 g_verify_token_header (const gss_OID_desc * mech,
+ unsigned int *body_size,
unsigned char **buf, int tok_type,
unsigned int toksize_in,
int wrapper_required);
OM_uint32 generic_gss_copy_oid
(OM_uint32 *, /* minor_status */
- gss_OID, /* oid */
+ const gss_OID_desc * const, /* oid */
gss_OID * /* new_oid */
);
OM_uint32 generic_gss_add_oid_set_member
(OM_uint32 *, /* minor_status */
- gss_OID, /* member_oid */
+ const gss_OID_desc * const, /* member_oid */
gss_OID_set * /* oid_set */
);
OM_uint32 generic_gss_test_oid_set_member
(OM_uint32 *, /* minor_status */
- gss_OID, /* member */
+ const gss_OID_desc * const, /* member */
gss_OID_set, /* set */
int * /* present */
);
OM_uint32 generic_gss_oid_to_str
(OM_uint32 *, /* minor_status */
- gss_OID, /* oid */
+ const gss_OID_desc * const, /* oid */
gss_buffer_t /* oid_str */
);
OM_uint32
generic_gss_copy_oid(minor_status, oid, new_oid)
OM_uint32 *minor_status;
- gss_OID oid, *new_oid;
+ const gss_OID_desc * const oid;
+ gss_OID *new_oid;
{
gss_OID p;
OM_uint32
generic_gss_add_oid_set_member(minor_status, member_oid, oid_set)
OM_uint32 *minor_status;
- gss_OID member_oid;
+ const gss_OID_desc * const member_oid;
gss_OID_set *oid_set;
{
gss_OID elist;
OM_uint32
generic_gss_test_oid_set_member(minor_status, member, set, present)
OM_uint32 *minor_status;
- gss_OID member;
+ const gss_OID_desc * const member;
gss_OID_set set;
int *present;
{
OM_uint32
generic_gss_oid_to_str(minor_status, oid, oid_str)
OM_uint32 *minor_status;
- gss_OID oid;
+ const gss_OID_desc * const oid;
gss_buffer_t oid_str;
{
char numstr[128];
/* returns the length of a token, given the mech oid and the body size */
unsigned int g_token_size(mech, body_size)
- gss_OID mech;
+ const gss_OID_desc * mech;
unsigned int body_size;
{
/* set body_size to sequence contents size */
be the right size. buf is advanced past the token header */
void g_make_token_header(mech, body_size, buf, tok_type)
- gss_OID mech;
+ const gss_OID_desc * mech;
unsigned int body_size;
unsigned char **buf;
int tok_type;
gss_int32 g_verify_token_header(mech, body_size, buf_in, tok_type, toksize_in,
wrapper_required)
- gss_OID mech;
+ const gss_OID_desc * mech;
unsigned int *body_size;
unsigned char **buf_in;
int tok_type;
ptr = (unsigned char *) input_token->value;
- if (!(code = g_verify_token_header((gss_OID) gss_mech_krb5,
+ if (!(code = g_verify_token_header(gss_mech_krb5,
&(ap_req.length),
&ptr, KG_TOK_CTX_AP_REQ,
input_token->length, 1))) {
mech_used = gss_mech_krb5;
} else if ((code == G_WRONG_MECH) &&
- !(code = g_verify_token_header((gss_OID) gss_mech_krb5_old,
+ !(code = g_verify_token_header(gss_mech_krb5_old,
&(ap_req.length),
&ptr, KG_TOK_CTX_AP_REQ,
input_token->length, 1))) {
ctx->gss_flags |= GSS_C_PROT_READY_FLAG;
ctx->established = 1;
- token.length = g_token_size((gss_OID) mech_used, ap_rep.length);
+ token.length = g_token_size(mech_used, ap_rep.length);
if ((token.value = (unsigned char *) xmalloc(token.length))
== NULL) {
goto fail;
}
ptr3 = token.value;
- g_make_token_header((gss_OID) mech_used, ap_rep.length,
+ g_make_token_header(mech_used, ap_rep.length,
&ptr3, KG_TOK_CTX_AP_REP);
TWRITE_STR(ptr3, ap_rep.data, ap_rep.length);
tmsglen = scratch.length;
toktype = KG_TOK_CTX_ERROR;
- token.length = g_token_size((gss_OID) mech_used, tmsglen);
+ token.length = g_token_size(mech_used, tmsglen);
token.value = (unsigned char *) xmalloc(token.length);
if (!token.value) {
krb5_free_context(context);
}
ptr = token.value;
- g_make_token_header((gss_OID) mech_used, tmsglen, &ptr, toktype);
+ g_make_token_header(mech_used, tmsglen, &ptr, toktype);
TWRITE_STR(ptr, scratch.data, scratch.length);
krb5_free_data_contents(context, &scratch);
&ret_mechs)) ||
(cred->prerfc_mech &&
GSS_ERROR(ret = generic_gss_add_oid_set_member(minor_status,
- (gss_OID) gss_mech_krb5_old,
+ gss_mech_krb5_old,
&ret_mechs))) ||
(cred->rfc_mech &&
GSS_ERROR(ret = generic_gss_add_oid_set_member(minor_status,
- (gss_OID) gss_mech_krb5,
+ gss_mech_krb5,
&ret_mechs)))) {
if (cred->ccache)
(void)krb5_cc_close(context, cred->ccache);
ptr = t;
- g_make_token_header((gss_OID) mech_type, ap_req.length,
+ g_make_token_header(mech_type, ap_req.length,
&ptr, KG_TOK_CTX_AP_REQ);
TWRITE_STR(ptr, (unsigned char *) ap_req.data, ap_req.length);
ptr = (unsigned char *) input_token->value;
- if (g_verify_token_header((gss_OID) ctx->mech_used,
+ if (g_verify_token_header(ctx->mech_used,
&(ap_rep.length),
&ptr, KG_TOK_CTX_AP_REP,
input_token->length, 1)) {
&mechs)) ||
(cred->prerfc_mech &&
GSS_ERROR(ret = generic_gss_add_oid_set_member(minor_status,
- (gss_OID) gss_mech_krb5_old,
+ gss_mech_krb5_old,
&mechs))) ||
(cred->rfc_mech &&
GSS_ERROR(ret = generic_gss_add_oid_set_member(minor_status,
- (gss_OID) gss_mech_krb5,
+ gss_mech_krb5,
&mechs)))) {
k5_mutex_unlock(&cred->lock);
if (ret_name)
if (major == GSS_S_COMPLETE) {
/* Now add our members. */
if (
- ((major = gss_add_oid_set_member(minor_status,
- (gss_OID) gss_nt_user_name,
- name_types)
+ ((major = generic_gss_add_oid_set_member(minor_status,
+ gss_nt_user_name,
+ name_types)
) == GSS_S_COMPLETE) &&
- ((major = gss_add_oid_set_member(minor_status,
- (gss_OID) gss_nt_machine_uid_name,
- name_types)
+ ((major = generic_gss_add_oid_set_member(minor_status,
+ gss_nt_machine_uid_name,
+ name_types)
) == GSS_S_COMPLETE) &&
- ((major = gss_add_oid_set_member(minor_status,
- (gss_OID) gss_nt_string_uid_name,
- name_types)
+ ((major = generic_gss_add_oid_set_member(minor_status,
+ gss_nt_string_uid_name,
+ name_types)
) == GSS_S_COMPLETE) &&
- ((major = gss_add_oid_set_member(minor_status,
- (gss_OID) gss_nt_service_name,
- name_types)
+ ((major = generic_gss_add_oid_set_member(minor_status,
+ gss_nt_service_name,
+ name_types)
) == GSS_S_COMPLETE) &&
- ((major = gss_add_oid_set_member(minor_status,
- (gss_OID) gss_nt_service_name_v2,
- name_types)
+ ((major = generic_gss_add_oid_set_member(minor_status,
+ gss_nt_service_name_v2,
+ name_types)
) == GSS_S_COMPLETE) &&
- ((major = gss_add_oid_set_member(minor_status,
- (gss_OID) gss_nt_exported_name,
- name_types)
+ ((major = generic_gss_add_oid_set_member(minor_status,
+ gss_nt_exported_name,
+ name_types)
) == GSS_S_COMPLETE) &&
- ((major = gss_add_oid_set_member(minor_status,
- (gss_OID) gss_nt_krb5_name,
- name_types)
+ ((major = generic_gss_add_oid_set_member(minor_status,
+ gss_nt_krb5_name,
+ name_types)
) == GSS_S_COMPLETE)
) {
- major = gss_add_oid_set_member(minor_status,
- (gss_OID) gss_nt_krb5_principal,
- name_types);
+ major = generic_gss_add_oid_set_member(minor_status,
+ gss_nt_krb5_principal,
+ name_types);
}
/*
/*** fill in the token */
ptr = t;
- g_make_token_header((gss_OID) oid, 14+cksum_size+tmsglen, &ptr, toktype);
+ g_make_token_header(oid, 14+cksum_size+tmsglen, &ptr, toktype);
/* 0..1 SIGN_ALG */
ptr[0] = signalg & 0xff;
}
else
toktype2 = toktype;
- err = g_verify_token_header((gss_OID) ctx->mech_used,
+ err = g_verify_token_header(ctx->mech_used,
&bodysize, &ptr, toktype2,
input_token_buffer->length,
!ctx->proto);
data_size = req_output_size;
conflen = kg_confounder_size(ctx->k5_context, ctx->enc);
data_size = (conflen + data_size + 8) & (~(OM_uint32)7);
- ohlen = g_token_size((gss_OID) ctx->mech_used,
+ ohlen = g_token_size(ctx->mech_used,
(unsigned int) (data_size + ctx->cksum_size + 14))
- req_output_size;