Identity of digital certificates is correctly resolved now

This commit is contained in:
Simon Rozman 2016-07-20 12:59:58 +02:00
parent 418e591aa6
commit 3e82e988d4

View File

@ -246,9 +246,8 @@ bool eap::credentials_tls::retrieve(_In_ LPCTSTR pszTargetName, _Out_ EAP_ERROR
std::wstring eap::credentials_tls::get_identity() const std::wstring eap::credentials_tls::get_identity() const
{ {
if (m_cert) { if (m_cert) {
// Generate identity. TODO: Find which CERT_NAME_... constant returns valid identity (username@domain or DOMAIN\Username).
wstring identity; wstring identity;
CertGetNameString(m_cert, CERT_NAME_SIMPLE_DISPLAY_TYPE, 0, NULL, identity); CertGetNameString(m_cert, CERT_NAME_EMAIL_TYPE, 0, NULL, identity);
return identity; return identity;
} else } else
return L""; return L"";