- TLS revised (again)
- TLS Session resumption issues resolved - Credential prompt has "Remember" checkbox initially selected when credentials originate from Windows Credential Manager - Last authentication attempt failure notice is more general and no longer insinuate user credentials are the likely cause of the failure - Additional log messages added
This commit is contained in:
@@ -342,7 +342,7 @@ namespace eap
|
||||
bool m_allow_save; ///< Are credentials allowed to be saved to Windows Credential Manager?
|
||||
bool m_use_preshared; ///< Use pre-shared credentials
|
||||
std::unique_ptr<credentials> m_preshared; ///< Pre-shared credentials
|
||||
bool m_cred_failed; ///< Did credential fail last time?
|
||||
bool m_auth_failed; ///< Did credential fail last time?
|
||||
};
|
||||
|
||||
|
||||
|
@@ -54,6 +54,18 @@ namespace eap
|
||||
{
|
||||
class credentials : public config
|
||||
{
|
||||
public:
|
||||
///
|
||||
/// Credential source when combined
|
||||
///
|
||||
enum source_t {
|
||||
source_unknown = -1, ///< Unknown source
|
||||
source_cache = 0, ///< Credentials were obtained from EAPHost cache
|
||||
source_preshared, ///< Credentials were set by method configuration
|
||||
source_storage ///< Credentials were loaded from Windows Credential Manager
|
||||
};
|
||||
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructs credentials
|
||||
@@ -158,26 +170,6 @@ namespace eap
|
||||
/// Returns credential name (for GUI display).
|
||||
///
|
||||
virtual winstd::tstring get_name() const;
|
||||
|
||||
///
|
||||
/// Combine credentials in the following order:
|
||||
///
|
||||
/// 1. Cached credentials
|
||||
/// 2. Pre-configured credentials
|
||||
/// 3. Stored credentials
|
||||
///
|
||||
/// \param[in] cred_cached Cached credentials (optional, can be \c NULL)
|
||||
/// \param[in] cfg Method configuration
|
||||
/// \param[in] pszTargetName The name in Windows Credential Manager to retrieve credentials from (optional, can be \c NULL)
|
||||
///
|
||||
/// \returns
|
||||
/// - \c true if credentials were set;
|
||||
/// - \c false otherwise
|
||||
///
|
||||
virtual bool combine(
|
||||
_In_ const credentials *cred_cached,
|
||||
_In_ config_method_with_cred &cfg,
|
||||
_In_opt_z_ LPCTSTR pszTargetName);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -139,7 +139,7 @@ eap::config_method& eap::config_method::operator=(_Inout_ config_method &&other)
|
||||
eap::config_method_with_cred::config_method_with_cred(_In_ module &mod) :
|
||||
m_allow_save(true),
|
||||
m_use_preshared(false),
|
||||
m_cred_failed(false),
|
||||
m_auth_failed(false),
|
||||
config_method(mod)
|
||||
{
|
||||
}
|
||||
@@ -149,7 +149,7 @@ eap::config_method_with_cred::config_method_with_cred(_In_ const config_method_w
|
||||
m_allow_save(other.m_allow_save),
|
||||
m_use_preshared(other.m_use_preshared),
|
||||
m_preshared(other.m_preshared ? (credentials*)other.m_preshared->clone() : nullptr),
|
||||
m_cred_failed(other.m_cred_failed),
|
||||
m_auth_failed(other.m_auth_failed),
|
||||
config_method(other)
|
||||
{
|
||||
}
|
||||
@@ -159,7 +159,7 @@ eap::config_method_with_cred::config_method_with_cred(_Inout_ config_method_with
|
||||
m_allow_save(std::move(other.m_allow_save)),
|
||||
m_use_preshared(std::move(other.m_use_preshared)),
|
||||
m_preshared(std::move(other.m_preshared)),
|
||||
m_cred_failed(std::move(other.m_cred_failed)),
|
||||
m_auth_failed(std::move(other.m_auth_failed)),
|
||||
config_method(std::move(other))
|
||||
{
|
||||
}
|
||||
@@ -172,7 +172,7 @@ eap::config_method_with_cred& eap::config_method_with_cred::operator=(_In_ const
|
||||
m_allow_save = other.m_allow_save;
|
||||
m_use_preshared = other.m_use_preshared;
|
||||
m_preshared.reset(other.m_preshared ? (credentials*)other.m_preshared->clone() : nullptr);
|
||||
m_cred_failed = other.m_cred_failed;
|
||||
m_auth_failed = other.m_auth_failed;
|
||||
}
|
||||
|
||||
return *this;
|
||||
@@ -186,7 +186,7 @@ eap::config_method_with_cred& eap::config_method_with_cred::operator=(_Inout_ co
|
||||
m_allow_save = std::move(other.m_allow_save );
|
||||
m_use_preshared = std::move(other.m_use_preshared);
|
||||
m_preshared = std::move(other.m_preshared );
|
||||
m_cred_failed = std::move(other.m_cred_failed );
|
||||
m_auth_failed = std::move(other.m_auth_failed );
|
||||
}
|
||||
|
||||
return *this;
|
||||
@@ -248,7 +248,7 @@ void eap::config_method_with_cred::operator<<(_Inout_ cursor_out &cursor) const
|
||||
cursor << m_allow_save;
|
||||
cursor << m_use_preshared;
|
||||
cursor << *m_preshared;
|
||||
cursor << m_cred_failed;
|
||||
cursor << m_auth_failed;
|
||||
}
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ size_t eap::config_method_with_cred::get_pk_size() const
|
||||
pksizeof(m_allow_save ) +
|
||||
pksizeof(m_use_preshared) +
|
||||
pksizeof(*m_preshared ) +
|
||||
pksizeof(m_cred_failed );
|
||||
pksizeof(m_auth_failed );
|
||||
}
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ void eap::config_method_with_cred::operator>>(_Inout_ cursor_in &cursor)
|
||||
cursor >> m_allow_save;
|
||||
cursor >> m_use_preshared;
|
||||
cursor >> *m_preshared;
|
||||
cursor >> m_cred_failed;
|
||||
cursor >> m_auth_failed;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -83,19 +83,6 @@ tstring eap::credentials::get_name() const
|
||||
}
|
||||
|
||||
|
||||
bool eap::credentials::combine(
|
||||
_In_ const credentials *cred_cached,
|
||||
_In_ config_method_with_cred &cfg,
|
||||
_In_opt_z_ LPCTSTR pszTargetName)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(cred_cached);
|
||||
UNREFERENCED_PARAMETER(cfg);
|
||||
UNREFERENCED_PARAMETER(pszTargetName);
|
||||
|
||||
// When there's nothing to combine...
|
||||
return true;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// eap::credentials_pass
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user