Commit de2a187b authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Don't check for no data to decode in CryptDecodeObject{Ex}, doing so masks some errors.

parent 916e4786
......@@ -4979,11 +4979,6 @@ BOOL WINAPI CryptDecodeObject(DWORD dwCertEncodingType, LPCSTR lpszStructType,
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (!cbEncoded)
{
SetLastError(CRYPT_E_ASN1_EOD);
return FALSE;
}
if (cbEncoded > MAX_ENCODED_LEN)
{
SetLastError(CRYPT_E_ASN1_LARGE);
......@@ -5031,11 +5026,6 @@ BOOL WINAPI CryptDecodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType,
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (!cbEncoded)
{
SetLastError(CRYPT_E_ASN1_EOD);
return FALSE;
}
if (cbEncoded > MAX_ENCODED_LEN)
{
SetLastError(CRYPT_E_ASN1_LARGE);
......
......@@ -2636,7 +2636,6 @@ static void testHashToBeSigned(void)
}
SetLastError(0xdeadbeef);
ret = CryptHashToBeSigned(0, 0, NULL, 0, NULL, &size);
todo_wine
ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
"expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
......
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