Commit 0170a41e authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Don't set ret to TRUE when it already is.

Set it to FALSE when it needs to be.
parent 23cfbe2e
......@@ -185,20 +185,17 @@ static BOOL WINAPI CertContext_GetProperty(void *context, DWORD dwPropId,
if (ret)
{
if (!pvData)
{
*pcbData = blob.cbData;
ret = TRUE;
}
else if (*pcbData < blob.cbData)
{
SetLastError(ERROR_MORE_DATA);
*pcbData = blob.cbData;
ret = FALSE;
}
else
{
memcpy(pvData, blob.pbData, blob.cbData);
*pcbData = blob.cbData;
ret = TRUE;
}
}
else
......@@ -320,10 +317,7 @@ BOOL WINAPI CertGetCertificateContextProperty(PCCERT_CONTEXT pCertContext,
if (ret)
{
if (!pvData)
{
*pcbData = sizeof(HCRYPTPROV);
ret = TRUE;
}
else if (*pcbData < sizeof(HCRYPTPROV))
{
SetLastError(ERROR_MORE_DATA);
......@@ -331,10 +325,7 @@ BOOL WINAPI CertGetCertificateContextProperty(PCCERT_CONTEXT pCertContext,
ret = FALSE;
}
else
{
*(HCRYPTPROV *)pvData = keyContext.hCryptProv;
ret = TRUE;
}
}
break;
}
......
......@@ -302,20 +302,17 @@ static BOOL WINAPI CRLContext_GetProperty(void *context, DWORD dwPropId,
if (ret)
{
if (!pvData)
{
*pcbData = blob.cbData;
ret = TRUE;
}
else if (*pcbData < blob.cbData)
{
SetLastError(ERROR_MORE_DATA);
*pcbData = blob.cbData;
ret = FALSE;
}
else
{
memcpy(pvData, blob.pbData, blob.cbData);
*pcbData = blob.cbData;
ret = TRUE;
}
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment