Test credentials read added to debug builds of CredWrite
This commit is contained in:
parent
822852c8b4
commit
8bff2d3060
Binary file not shown.
@ -81,12 +81,25 @@ static int CredWrite()
|
||||
}
|
||||
|
||||
// Write credentials.
|
||||
EAP_ERROR *pEapError;
|
||||
EAP_ERROR *pEapError = NULL;
|
||||
DWORD dwResult;
|
||||
#ifdef _DEBUG
|
||||
{
|
||||
eap::credentials_pap cred_stored(g_module);
|
||||
dwResult = cred_stored.retrieve(target_name.c_str(), &pEapError);
|
||||
if (pEapError) {
|
||||
OutputDebugStr(_T("%ls (error %u)\n"), pEapError->pRootCauseString, pEapError->dwWinError);
|
||||
g_module.free_error_memory(pEapError);
|
||||
pEapError = NULL;
|
||||
} else
|
||||
OutputDebugStr(_T("Reading credentials failed (error %u).\n"), dwResult);
|
||||
}
|
||||
#endif
|
||||
if ((dwResult = cred.store(target_name.c_str(), &pEapError)) != ERROR_SUCCESS) {
|
||||
if (pEapError) {
|
||||
OutputDebugStr(_T("%ls (error %u)\n"), pEapError->pRootCauseString, pEapError->dwWinError);
|
||||
g_module.free_error_memory(pEapError);
|
||||
pEapError = NULL;
|
||||
} else
|
||||
OutputDebugStr(_T("Writing credentials failed (error %u).\n"), dwResult);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user