return ret;
}
+time_t
+gss_eap_attr_ctx::getExpiryTime(void) const
+{
+ unsigned int i;
+ time_t expiryTime = 0;
+
+ for (i = ATTR_TYPE_MIN; i < ATTR_TYPE_MAX; i++) {
+ time_t providerExpiryTime = m_providers[i]->getExpiryTime();
+
+ if (providerExpiryTime == 0)
+ continue;
+
+ if (expiryTime == 0 || providerExpiryTime < expiryTime)
+ expiryTime = providerExpiryTime;
+ }
+
+ return expiryTime;
+}
+
/*
* C wrappers
*/
return NULL;
}
+ gssCtx->expiryTime = ctx->getExpiryTime();
+
return ctx;
}
return initWithManager(manager);
}
+ virtual time_t getExpiryTime(void) const { return 0; }
+
static bool init() { return true; }
static void finalize() {}
static void
unregisterProvider(unsigned int type);
+ time_t getExpiryTime(void) const;
+
private:
gss_eap_attr_provider *getPrimaryProvider(void) const;
m_authenticated = false;
}
+time_t
+gss_eap_saml_assertion_provider::getExpiryTime(void) const
+{
+ saml2::Conditions *conditions;
+ time_t expiryTime = 0;
+
+ if (m_assertion == NULL)
+ return 0;
+
+ conditions = m_assertion->getConditions();
+
+ if (conditions != NULL && conditions->getNotOnOrAfter() != NULL)
+ expiryTime = conditions->getNotOnOrAfter()->getEpoch();
+
+ return expiryTime;
+}
+
bool
gss_eap_saml_assertion_provider::getAttribute(const gss_buffer_t attr,
int *authenticated,
return m_authenticated;
}
+ time_t getExpiryTime(void) const;
+
static bool init();
static void finalize();