Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
9571e4f2
Commit
9571e4f2
authored
Dec 30, 2010
by
André Hentschel
Committed by
Alexandre Julliard
Dec 31, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imagehlp/tests: Don't test function directly when reporting GetLastError().
parent
04374ab6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
integrity.c
dlls/imagehlp/tests/integrity.c
+8
-4
No files found.
dlls/imagehlp/tests/integrity.c
View file @
9571e4f2
...
...
@@ -141,6 +141,7 @@ static void test_add_certificate(char *cert_data, int len)
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 @@ static void test_add_certificate(char *cert_data, int len)
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
);
...
...
@@ -211,6 +213,7 @@ static void test_remove_certificate(int index)
{
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 +223,10 @@ static void test_remove_certificate(int index)
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment