cryptnet: Return FALSE if the requested URL exists and the url array size is NULL.
This commit is contained in:
parent
681a408aa6
commit
dcb8c874e8
|
@ -174,7 +174,10 @@ static BOOL WINAPI CRYPT_GetUrlFromCertificateCRLDistPoint(LPCSTR pszUrlOid,
|
|||
}
|
||||
}
|
||||
if (!pcbUrlArray)
|
||||
{
|
||||
SetLastError(E_INVALIDARG);
|
||||
ret = FALSE;
|
||||
}
|
||||
else if (!pUrlArray)
|
||||
*pcbUrlArray = bytesNeeded;
|
||||
else if (*pcbUrlArray < bytesNeeded)
|
||||
|
|
|
@ -175,13 +175,11 @@ static void test_getObjectUrl(void)
|
|||
SetLastError(0xdeadbeef);
|
||||
ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT,
|
||||
(void *)cert, 0, NULL, NULL, NULL, NULL, NULL);
|
||||
todo_wine
|
||||
ok(!ret && GetLastError() == E_INVALIDARG,
|
||||
"Expected E_INVALIDARG, got %08x\n", GetLastError());
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT,
|
||||
(void *)cert, 0, NULL, NULL, NULL, &infoSize, NULL);
|
||||
todo_wine
|
||||
ok(!ret && GetLastError() == E_INVALIDARG,
|
||||
"Expected E_INVALIDARG, got %08x\n", GetLastError());
|
||||
/* Can get it without specifying the location: */
|
||||
|
|
Loading…
Reference in New Issue