Author: rharabien
Date: Fri Mar 16 19:45:27 2012
New Revision: 56174
URL:
http://svn.reactos.org/svn/reactos?rev=56174&view=rev
Log:
[IMAGEHLP_WINETEST]
- Sync to Wine 1.3.37
Modified:
trunk/rostests/winetests/imagehlp/integrity.c
Modified: trunk/rostests/winetests/imagehlp/integrity.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/imagehlp/integr…
==============================================================================
--- trunk/rostests/winetests/imagehlp/integrity.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/imagehlp/integrity.c [iso-8859-1] Fri Mar 16 19:45:27 2012
@@ -141,6 +141,7 @@
LPWIN_CERTIFICATE cert;
DWORD cert_len;
DWORD index;
+ BOOL ret;
hFile = CreateFileA(test_dll_path, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
@@ -165,7 +166,8 @@
cert->wCertificateType = WIN_CERT_TYPE_PKCS_SIGNED_DATA;
CopyMemory(cert->bCertificate, cert_data, len);
- ok(pImageAddCertificate(hFile, cert, &index), "Unable to add certificate to
image, error %x\n", GetLastError());
+ ret = pImageAddCertificate(hFile, cert, &index);
+ ok(ret, "Unable to add certificate to image, error %x\n", GetLastError());
HeapFree(GetProcessHeap(), 0, cert);
CloseHandle(hFile);
@@ -200,7 +202,8 @@
return;
}
- ok(ret = pImageGetCertificateData(hFile, index, cert, &cert_len), "Unable to
retrieve certificate; err=%x\n", GetLastError());
+ ret = pImageGetCertificateData(hFile, index, cert, &cert_len);
+ ok(ret, "Unable to retrieve certificate; err=%x\n", GetLastError());
ok(memcmp(cert->bCertificate, cert_data, cert_len - sizeof(WIN_CERTIFICATE)) == 0,
"Certificate retrieved did not match original\n");
HeapFree(GetProcessHeap(), 0, cert);
@@ -211,6 +214,7 @@
{
DWORD orig_count = 0, count = 0;
HANDLE hFile;
+ BOOL ret;
hFile = CreateFileA(test_dll_path, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
@@ -220,9 +224,10 @@
return;
}
- ok (pImageEnumerateCertificates(hFile, CERT_SECTION_TYPE_ANY, &orig_count, NULL,
0), "Unable to enumerate certificates in file; err=%x\n", GetLastError());
-
- ok (pImageRemoveCertificate(hFile, index), "Unable to remove certificate from
file; err=%x\n", GetLastError());
+ ret = pImageEnumerateCertificates(hFile, CERT_SECTION_TYPE_ANY, &orig_count,
NULL, 0);
+ ok (ret, "Unable to enumerate certificates in file; err=%x\n",
GetLastError());
+ ret = pImageRemoveCertificate(hFile, index);
+ ok (ret, "Unable to remove certificate from file; err=%x\n",
GetLastError());
/* Test to see if the certificate has actually been removed */
pImageEnumerateCertificates(hFile, CERT_SECTION_TYPE_ANY, &count, NULL, 0);