forked from Mirrors/wine-wine
crypt32: Include root store in CertEnumSystemStore enumeration for the local machine location.
parent
69e43ef108
commit
0509d021c0
|
@ -329,10 +329,11 @@ static WINECRYPT_CERTSTORE *CRYPT_MemOpenStore(HCRYPTPROV hCryptProv,
|
||||||
return (PWINECRYPT_CERTSTORE)store;
|
return (PWINECRYPT_CERTSTORE)store;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const WCHAR rootW[] = { 'R','o','o','t',0 };
|
||||||
|
|
||||||
static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreW(HCRYPTPROV hCryptProv,
|
static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreW(HCRYPTPROV hCryptProv,
|
||||||
DWORD dwFlags, const void *pvPara)
|
DWORD dwFlags, const void *pvPara)
|
||||||
{
|
{
|
||||||
static const WCHAR rootW[] = { 'R','o','o','t',0 };
|
|
||||||
static const WCHAR fmt[] = { '%','s','\\','%','s',0 };
|
static const WCHAR fmt[] = { '%','s','\\','%','s',0 };
|
||||||
LPCWSTR storeName = (LPCWSTR)pvPara;
|
LPCWSTR storeName = (LPCWSTR)pvPara;
|
||||||
LPWSTR storePath;
|
LPWSTR storePath;
|
||||||
|
@ -1350,6 +1351,7 @@ BOOL WINAPI CertEnumSystemStore(DWORD dwFlags, void *pvSystemStoreLocationPara,
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
LONG rc;
|
LONG rc;
|
||||||
HKEY key;
|
HKEY key;
|
||||||
|
CERT_SYSTEM_STORE_INFO info = { sizeof(info) };
|
||||||
|
|
||||||
TRACE("(%08x, %p, %p, %p)\n", dwFlags, pvSystemStoreLocationPara, pvArg,
|
TRACE("(%08x, %p, %p, %p)\n", dwFlags, pvSystemStoreLocationPara, pvArg,
|
||||||
pfnEnum);
|
pfnEnum);
|
||||||
|
@ -1358,7 +1360,6 @@ BOOL WINAPI CertEnumSystemStore(DWORD dwFlags, void *pvSystemStoreLocationPara,
|
||||||
if (!rc)
|
if (!rc)
|
||||||
{
|
{
|
||||||
DWORD index = 0;
|
DWORD index = 0;
|
||||||
CERT_SYSTEM_STORE_INFO info = { sizeof(info) };
|
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
do {
|
do {
|
||||||
|
@ -1375,6 +1376,12 @@ BOOL WINAPI CertEnumSystemStore(DWORD dwFlags, void *pvSystemStoreLocationPara,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
SetLastError(rc);
|
SetLastError(rc);
|
||||||
|
/* Include root store for the local machine location (it isn't in the
|
||||||
|
* registry)
|
||||||
|
*/
|
||||||
|
if (ret && (dwFlags & CERT_SYSTEM_STORE_LOCATION_MASK) ==
|
||||||
|
CERT_SYSTEM_STORE_LOCAL_MACHINE)
|
||||||
|
ret = pfnEnum(rootW, dwFlags, &info, NULL, pvArg);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue