diff --git a/lib/EAPBase/include/Credentials.h b/lib/EAPBase/include/Credentials.h index 36bbfb8..1e9f457 100644 --- a/lib/EAPBase/include/Credentials.h +++ b/lib/EAPBase/include/Credentials.h @@ -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; - - /// @} }; diff --git a/lib/PAP/include/Credentials.h b/lib/PAP/include/Credentials.h index 6cd3ccf..401a201 100644 --- a/lib/PAP/include/Credentials.h +++ b/lib/PAP/include/Credentials.h @@ -86,7 +86,6 @@ namespace eap /// virtual config* clone() const; - protected: /// \name Storage /// @{ diff --git a/lib/TLS/include/Credentials.h b/lib/TLS/include/Credentials.h index 2fe6d20..f19fe8f 100644 --- a/lib/TLS/include/Credentials.h +++ b/lib/TLS/include/Credentials.h @@ -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: diff --git a/lib/TLS/src/Credentials.cpp b/lib/TLS/src/Credentials.cpp index 3bb905d..fdb4555 100644 --- a/lib/TLS/src/Credentials.cpp +++ b/lib/TLS/src/Credentials.cpp @@ -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""; } -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,