From: Luke Howard Date: Fri, 15 May 2015 12:16:18 +0000 (+0200) Subject: gss_inquire_context lifetime calculation was inverted X-Git-Tag: upstream/0.9.5~2 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=357ea7c007bd23fe33e1b77c57724746c094a528;hp=8c048bed06cac3253bd7eb3513e9a4d30b31887e;p=mech_eap.git gss_inquire_context lifetime calculation was inverted --- diff --git a/mech_eap/inquire_context.c b/mech_eap/inquire_context.c index 305145c..5d0e5b6 100644 --- a/mech_eap/inquire_context.c +++ b/mech_eap/inquire_context.c @@ -74,20 +74,8 @@ gss_inquire_context(OM_uint32 *minor, *targ_name = GSS_C_NO_NAME; } - if (lifetime_rec != NULL) { - time_t now, lifetime; - - if (ctx->expiryTime == 0) { - lifetime = GSS_C_INDEFINITE; - } else { - now = time(NULL); - lifetime = now - ctx->expiryTime; - if (lifetime < 0) - lifetime = 0; - } - - *lifetime_rec = lifetime; - } + if (lifetime_rec != NULL) + gssEapContextTime(&tmpMinor, ctx, lifetime_rec); if (mech_type != NULL) { major = gssEapCanonicalizeOid(minor, ctx->mechanismUsed, 0, mech_type);