credentials_ttls::get_identity() introduced

This commit is contained in:
Simon Rozman 2016-07-21 12:35:19 +02:00
parent 35034789d2
commit cc43b44d91
2 changed files with 19 additions and 0 deletions

View File

@ -176,6 +176,11 @@ namespace eap
/// ///
virtual bool retrieve(_In_ LPCTSTR pszTargetName, _Out_ EAP_ERROR **ppEapError); virtual bool retrieve(_In_ LPCTSTR pszTargetName, _Out_ EAP_ERROR **ppEapError);
///
/// Returns credential identity.
///
virtual std::wstring get_identity() const;
/// @} /// @}
public: public:

View File

@ -230,3 +230,17 @@ bool eap::credentials_ttls::retrieve(_In_ LPCTSTR pszTargetName, _Out_ EAP_ERROR
return true; return true;
} }
std::wstring eap::credentials_ttls::get_identity() const
{
// Outer identity has the right-of-way.
if (!credentials_tls::empty())
return credentials_tls::get_identity();
// Inner identity.
if (m_inner)
return m_inner->get_identity();
return L"";
}