X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=mech_eap%2Finquire_context.c;h=5d0e5b6397179fb7fd6ba6004fe476b567adafe7;hb=357ea7c007bd23fe33e1b77c57724746c094a528;hp=305145ce68504a321cf4438a1d6ef5373b20c66e;hpb=8c048bed06cac3253bd7eb3513e9a4d30b31887e;p=mech_eap.git 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);