EAP_USE_NATIVE_CREDENTIAL_CACHE is now 0/1 #defined

This commit is contained in:
2017-02-02 13:34:43 +01:00
parent f5530b4ca9
commit decf8d0860
4 changed files with 16 additions and 12 deletions

View File

@@ -153,7 +153,7 @@ void eap::peer_ttls_ui::invoke_identity_ui(
config_connection cfg(*this);
unpack(cfg, pConnectionData, dwConnectionDataSize);
#ifdef EAP_USE_NATIVE_CREDENTIAL_CACHE
#if EAP_USE_NATIVE_CREDENTIAL_CACHE
// Unpack cached credentials.
credentials_connection cred_in(*this, cfg);
if (dwUserDataSize)
@@ -201,7 +201,7 @@ void eap::peer_ttls_ui::invoke_identity_ui(
cred_method.m_id = cfg_prov->m_id;
credentials_ttls *_cred_method = dynamic_cast<credentials_ttls*>(cfg_method->make_credentials());
cred_method.m_cred.reset(_cred_method);
#ifdef EAP_USE_NATIVE_CREDENTIAL_CACHE
#if EAP_USE_NATIVE_CREDENTIAL_CACHE
bool has_cached = cred_in.m_cred && cred_in.match(*cfg_prov);
#endif
@@ -213,7 +213,7 @@ void eap::peer_ttls_ui::invoke_identity_ui(
// Combine outer credentials.
eap::credentials::source_t src_outer = _cred_method->credentials_tls::combine(
#ifdef EAP_USE_NATIVE_CREDENTIAL_CACHE
#if EAP_USE_NATIVE_CREDENTIAL_CACHE
has_cached ? cred_in.m_cred.get() : NULL,
#else
NULL,
@@ -223,7 +223,7 @@ void eap::peer_ttls_ui::invoke_identity_ui(
// Combine inner credentials.
eap::credentials::source_t src_inner = _cred_method->m_inner->combine(
#ifdef EAP_USE_NATIVE_CREDENTIAL_CACHE
#if EAP_USE_NATIVE_CREDENTIAL_CACHE
has_cached ? dynamic_cast<credentials_ttls*>(cred_in.m_cred.get())->m_inner.get() : NULL,
#else
NULL,