credentials::target_suffix() is public now, as it can be reused to provide GUI method identifier

This commit is contained in:
Simon Rozman 2016-07-21 12:33:32 +02:00
parent d69e8b3f6a
commit ee8410bdb9
4 changed files with 16 additions and 28 deletions

View File

@ -178,6 +178,11 @@ namespace eap
return target_name;
}
///
/// Return target suffix for Windows Credential Manager credential name
///
virtual LPCTSTR target_suffix() const = 0;
/// @}
///
@ -189,17 +194,6 @@ namespace eap
/// Returns credential name (for GUI display).
///
virtual winstd::tstring get_name() const;
protected:
/// \name Storage
/// @{
///
/// Return target suffix for Windows Credential Manager credential name
///
virtual LPCTSTR target_suffix() const = 0;
/// @}
};

View File

@ -86,7 +86,6 @@ namespace eap
///
virtual config* clone() const;
protected:
/// \name Storage
/// @{

View File

@ -182,6 +182,11 @@ namespace eap
///
virtual bool retrieve(_In_ LPCTSTR pszTargetName, _Out_ EAP_ERROR **ppEapError);
///
/// Return target suffix for Windows Credential Manager credential name
///
virtual LPCTSTR target_suffix() const;
/// @}
///
@ -194,15 +199,6 @@ namespace eap
///
virtual winstd::tstring get_name() const;
protected:
/// \name Storage
/// @{
///
/// Return target suffix for Windows Credential Manager credential name
///
virtual LPCTSTR target_suffix() const;
/// @}
public:

View File

@ -265,6 +265,12 @@ bool eap::credentials_tls::retrieve(_In_ LPCTSTR pszTargetName, _Out_ EAP_ERROR
}
LPCTSTR eap::credentials_tls::target_suffix() const
{
return _T("TLS");
}
std::wstring eap::credentials_tls::get_identity() const
{
if (m_cert) {
@ -276,19 +282,12 @@ std::wstring eap::credentials_tls::get_identity() const
}
tstring eap::credentials_tls::get_name() const
{
return m_cert ? std::move(get_cert_title(m_cert)) : L"<blank>";
}
LPCTSTR eap::credentials_tls::target_suffix() const
{
return _T("TLS");
}
const unsigned char eap::credentials_tls::s_entropy[1024] = {
0xb9, 0xd1, 0x62, 0xd4, 0x1c, 0xe6, 0x8c, 0x25, 0x98, 0x9b, 0x1d, 0xbc, 0x40, 0x46, 0x9e, 0x6d,
0x63, 0xba, 0xda, 0x78, 0x65, 0x56, 0x97, 0x4f, 0xa0, 0x89, 0xf4, 0xc5, 0x1b, 0xf5, 0x8d, 0x69,