forked from Mirrors/wine-wine
Fixed a few crypt test bugs.
parent
39a008ed1a
commit
ddad3152a1
|
@ -132,6 +132,7 @@ static BOOL FindProvRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszProvNam
|
||||||
|
|
||||||
RegQueryInfoKey(hKey, NULL, NULL, NULL, pdwProvCount, pcbProvName,
|
RegQueryInfoKey(hKey, NULL, NULL, NULL, pdwProvCount, pcbProvName,
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
(*pcbProvName)++;
|
||||||
|
|
||||||
if (!(*pszProvName = ((LPSTR)LocalAlloc(LMEM_ZEROINIT, *pcbProvName))))
|
if (!(*pszProvName = ((LPSTR)LocalAlloc(LMEM_ZEROINIT, *pcbProvName))))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -193,7 +194,7 @@ static void test_enum_providers(void)
|
||||||
* after loop ends, count should be provCount + 1 so subtract 1
|
* after loop ends, count should be provCount + 1 so subtract 1
|
||||||
* to get actual number of providers */
|
* to get actual number of providers */
|
||||||
count = 0;
|
count = 0;
|
||||||
while(CryptEnumProviders(count++, NULL, 0, &dwType, NULL, &providerLen))
|
while(CryptEnumProviders(count++, NULL, 0, &type, NULL, &providerLen))
|
||||||
;
|
;
|
||||||
count--;
|
count--;
|
||||||
ok(count==provCount, "expected %i, got %i\n", (int)provCount, (int)count);
|
ok(count==provCount, "expected %i, got %i\n", (int)provCount, (int)count);
|
||||||
|
@ -201,7 +202,7 @@ static void test_enum_providers(void)
|
||||||
/* loop past the actual number of providers to get the error
|
/* loop past the actual number of providers to get the error
|
||||||
* ERROR_NO_MORE_ITEMS */
|
* ERROR_NO_MORE_ITEMS */
|
||||||
for (count = 0; count < provCount + 1; count++)
|
for (count = 0; count < provCount + 1; count++)
|
||||||
result = CryptEnumProviders(count, NULL, 0, &dwType, NULL, &providerLen);
|
result = CryptEnumProviders(count, NULL, 0, &type, NULL, &providerLen);
|
||||||
ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected %08x, got %08x\n",
|
ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected %08x, got %08x\n",
|
||||||
ERROR_NO_MORE_ITEMS, (unsigned int)GetLastError());
|
ERROR_NO_MORE_ITEMS, (unsigned int)GetLastError());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue