goto fail;
}
- if (ctx->krb_times.endtime < now) {
- code = 0;
- major_status = GSS_S_CREDENTIALS_EXPIRED;
- goto fail;
- }
-
ap_rep.data = input_token->value;
ap_rep.length = input_token->length;
*mech_type = ctx->mech_used;
if (time_rec)
- *time_rec = ctx->krb_times.endtime - now;
+ *time_rec = ctx->krb_times.endtime + ctx->k5_context->clockskew - now;
/* Never return GSS_C_DELEG_FLAG since we don't support DCE credential
* delegation yet. */
goto fail;
}
- if (ctx->krb_times.endtime < now) {
- code = 0;
- major_status = GSS_S_CREDENTIALS_EXPIRED;
- goto fail;
- }
-
code = g_seqstate_init(&ctx->seqstate, ctx->seq_recv,
(ctx->gss_flags & GSS_C_REPLAY_FLAG) != 0,
(ctx->gss_flags & GSS_C_SEQUENCE_FLAG) != 0,
if (mech_type)
*mech_type = (gss_OID) mech_used;
+ /* Add the maximum allowable clock skew as a grace period for context
+ * expiration, just as we do for the ticket. */
if (time_rec)
- *time_rec = ctx->krb_times.endtime - now;
+ *time_rec = ctx->krb_times.endtime + context->clockskew - now;
if (ret_flags)
*ret_flags = ctx->gss_flags;
return(GSS_S_FAILURE);
}
- if ((lifetime = ctx->krb_times.endtime - now) < 0)
+ /* Add the maximum allowable clock skew as a grace period for context
+ * expiration, just as we do for the ticket during authentication. */
+ lifetime = ctx->krb_times.endtime - now;
+ if (!ctx->initiate)
+ lifetime += context->clockskew;
+ if (lifetime < 0)
lifetime = 0;
if (initiator_name) {