+Fri Jun 7 14:52:56 1996 Kevin L Mitchell <klmitch@mit.edu>
+
+ * accept_sec_context.c, init_sec_context.c, inq_context.c,
+ gssapiP_krb5.h: changed `mutual' element of struct
+ _krb5_gss_ctx_id_rec into more general `gss_flags' and
+ updated functions that process it
+
Tue May 14 19:09:49 1996 Richard Basch <basch@lehman.com>
* k5seal.c k5unseal.c util_cksum.c:
memset(ctx, 0, sizeof(krb5_gss_ctx_id_rec));
ctx->auth_context = auth_context;
ctx->initiate = 0;
- ctx->mutual = gss_flags & GSS_C_MUTUAL_FLAG;
+ ctx->gss_flags = GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG |
+ (gss_flags & (GSS_C_MUTUAL_FLAG | GSS_C_DELEG_FLAG));
ctx->seed_init = 0;
ctx->big_endian = bigend;
/* generate an AP_REP if necessary */
- if (ctx->mutual) {
+ if (ctx->gss_flags & GSS_C_MUTUAL_FLAG) {
krb5_data ap_rep;
unsigned char * ptr;
if ((code = krb5_mk_rep(context, auth_context, &ap_rep))) {
}
if (ret_flags)
- *ret_flags = GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG | ctx->mutual;
+ *ret_flags = ctx->gss_flags;
ctx->established = 1;
typedef struct _krb5_gss_ctx_id_rec {
int initiate; /* nonzero if initiating, zero if accepting */
- OM_uint32 mutual;
+ OM_uint32 gss_flags;
int seed_init;
unsigned char seed[16];
krb5_principal here;
memset(ctx, 0, sizeof(krb5_gss_ctx_id_rec));
ctx->auth_context = NULL;
ctx->initiate = 1;
- ctx->mutual = req_flags & GSS_C_MUTUAL_FLAG;
+ ctx->gss_flags = ((req_flags & (GSS_C_MUTUAL_FLAG | GSS_C_DELEG_FLAG)) |
+ GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG);
ctx->flags = req_flags & GSS_C_DELEG_FLAG;
ctx->seed_init = 0;
ctx->big_endian = 0; /* all initiators do little-endian, as per spec */
if ((code = make_ap_req(context, &(ctx->auth_context), cred,
ctx->there, &ctx->endtime, input_chan_bindings,
- ctx->mutual, &ctx->flags, &token))) {
+ ctx->gss_flags & GSS_C_MUTUAL_FLAG, &ctx->flags,
+ &token))) {
krb5_free_principal(context, ctx->here);
krb5_free_principal(context, ctx->there);
xfree(ctx);
*output_token = token;
if (ret_flags)
- *ret_flags = ((req_flags & (GSS_C_MUTUAL_FLAG | GSS_C_DELEG_FLAG)) |
- GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG);
+ *ret_flags = ctx->gss_flags;
/* return successfully */
*minor_status = 0;
- if (ctx->mutual) {
+ if (ctx->gss_flags & GSS_C_MUTUAL_FLAG) {
ctx->established = 0;
return(GSS_S_CONTINUE_NEEDED);
} else {
*mech_type = (gss_OID) gss_mech_krb5;
if (ret_flags)
- *ret_flags = GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG | ctx->mutual;
+ *ret_flags = ctx->gss_flags;
if (locally_initiated)
*locally_initiated = ctx->initiate;
/* Now static data */
(void) krb5_ser_pack_int32((krb5_int32) ctx->initiate,
&bp, &remain);
- (void) krb5_ser_pack_int32((krb5_int32) ctx->mutual,
+ (void) krb5_ser_pack_int32((krb5_int32) ctx->gss_flags,
&bp, &remain);
(void) krb5_ser_pack_int32((krb5_int32) ctx->seed_init,
&bp, &remain);
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
ctx->initiate = (int) ibuf;
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
- ctx->mutual = (int) ibuf;
+ ctx->gss_flags = (int) ibuf;
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
ctx->seed_init = (int) ibuf;
(void) krb5_ser_unpack_bytes((krb5_octet *) ctx->seed,