Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WinAPI CredEnumerate returning only Windows Credentials

Tags:

c#

winapi

I'm working on a browser and I'm using Credentials Store to save passwords.

My problem is that the CredEnumerate function returns only Windows Credentials but I actually need Web Credentials. I'm using this class: https://gist.github.com/meziantou/10311113.

Do I need to pass a different parameter to the CredEnumerate function to return Web Credentials? I couldn't see any information about this on MSDN.

like image 445
kenarsuleyman Avatar asked Oct 29 '22 07:10

kenarsuleyman


1 Answers

In the CredEnumerate function, set the second flag parameter to 1.

Look into the below documentation link for CRED_ENUMERATE_ALL_CREDENTIALS https://msdn.microsoft.com/en-us/library/windows/desktop/aa374794(v=vs.85).aspx

So try by passing 1 for second parameter instead of zero.

bool ret = CredEnumerate(null, 1, out count, out pCredentials);
like image 199
Pavan Chandaka Avatar answered Nov 15 '22 05:11

Pavan Chandaka