Loading credentials from XML allows <UserName> absence and assumes blank identity in this case now

This commit is contained in:
Simon Rozman 2016-08-28 15:46:30 +02:00
parent d926ea66b0
commit 8ce7154a77

View File

@ -109,7 +109,7 @@ void eap::credentials::load(_In_ IXMLDOMNode *pConfigRoot)
std::wstring xpath(eapxml::get_xpath(pConfigRoot)); std::wstring xpath(eapxml::get_xpath(pConfigRoot));
if (FAILED(hr = eapxml::get_element_value(pConfigRoot, bstr(L"eap-metadata:UserName"), m_identity))) if (FAILED(hr = eapxml::get_element_value(pConfigRoot, bstr(L"eap-metadata:UserName"), m_identity)))
throw com_runtime_error(hr, __FUNCTION__ " Error reading <UserName> element."); m_identity.clear();
m_module.log_config((xpath + L"/UserName").c_str(), m_identity.c_str()); m_module.log_config((xpath + L"/UserName").c_str(), m_identity.c_str());
} }