Module: wine Branch: master Commit: de2a187bb732b92f88371dbca1b7159f78fa12ca URL: http://source.winehq.org/git/wine.git/?a=commit;h=de2a187bb732b92f88371dbca1...
Author: Juan Lang juan.lang@gmail.com Date: Thu Oct 16 09:11:50 2008 -0700
crypt32: Don't check for no data to decode in CryptDecodeObject{Ex}, doing so masks some errors.
---
dlls/crypt32/decode.c | 10 ---------- dlls/crypt32/tests/cert.c | 1 - 2 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c index 4ebe50a..3a487ea 100644 --- a/dlls/crypt32/decode.c +++ b/dlls/crypt32/decode.c @@ -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); diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index 5e00e3a..c26398b 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -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);