Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d0b7cc5b
Commit
d0b7cc5b
authored
May 24, 2010
by
Juan Lang
Committed by
Alexandre Julliard
May 26, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32/tests: Improve granularity of testing a store's serialized form.
parent
b4d895b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
store.c
dlls/crypt32/tests/store.c
+17
-7
No files found.
dlls/crypt32/tests/store.c
View file @
d0b7cc5b
...
...
@@ -2064,21 +2064,32 @@ static void testAddSerialized(void)
}
static
void
compareStore
(
HCERTSTORE
store
,
LPCSTR
name
,
const
BYTE
*
pb
,
DWORD
cb
)
DWORD
cb
,
BOOL
todo
)
{
BOOL
ret
;
CRYPT_DATA_BLOB
blob
=
{
0
,
NULL
};
ret
=
CertSaveStore
(
store
,
X509_ASN_ENCODING
,
CERT_STORE_SAVE_AS_STORE
,
CERT_STORE_SAVE_TO_MEMORY
,
&
blob
,
0
);
ok
(
blob
.
cbData
==
cb
,
"%s: expected size %d, got %d
\n
"
,
name
,
cb
,
blob
.
cbData
);
ok
(
ret
,
"CertSaveStore failed: %08x
\n
"
,
GetLastError
());
if
(
todo
)
todo_wine
ok
(
blob
.
cbData
==
cb
,
"%s: expected size %d, got %d
\n
"
,
name
,
cb
,
blob
.
cbData
);
else
ok
(
blob
.
cbData
==
cb
,
"%s: expected size %d, got %d
\n
"
,
name
,
cb
,
blob
.
cbData
);
blob
.
pbData
=
HeapAlloc
(
GetProcessHeap
(),
0
,
blob
.
cbData
);
if
(
blob
.
pbData
)
{
ret
=
CertSaveStore
(
store
,
X509_ASN_ENCODING
,
CERT_STORE_SAVE_AS_STORE
,
CERT_STORE_SAVE_TO_MEMORY
,
&
blob
,
0
);
ok
(
!
memcmp
(
pb
,
blob
.
pbData
,
cb
),
"%s: unexpected value
\n
"
,
name
);
ok
(
ret
,
"CertSaveStore failed: %08x
\n
"
,
GetLastError
());
if
(
todo
)
todo_wine
ok
(
!
memcmp
(
pb
,
blob
.
pbData
,
cb
),
"%s: unexpected value
\n
"
,
name
);
else
ok
(
!
memcmp
(
pb
,
blob
.
pbData
,
cb
),
"%s: unexpected value
\n
"
,
name
);
HeapFree
(
GetProcessHeap
(),
0
,
blob
.
pbData
);
}
}
...
...
@@ -2330,7 +2341,7 @@ static void testAddCertificateLink(void)
CertFreeCertificateContext
(
linked
);
compareStore
(
store2
,
"file store -> file store"
,
serializedStoreWithCertWithFriendlyName
,
sizeof
(
serializedStoreWithCertWithFriendlyName
));
sizeof
(
serializedStoreWithCertWithFriendlyName
)
,
FALSE
);
}
CertCloseStore
(
store2
,
0
);
DeleteFileW
(
filename2
);
...
...
@@ -2380,10 +2391,9 @@ static void testAddCertificateLink(void)
ok
(
linked
->
hCertStore
==
store2
,
"unexpected store"
);
ret
=
pCertControlStore
(
store2
,
0
,
CERT_STORE_CTRL_COMMIT
,
NULL
);
ok
(
ret
,
"CertControlStore failed: %d
\n
"
,
ret
);
todo_wine
compareStore
(
store2
,
"file store -> system store"
,
serializedStoreWithCertAndHash
,
sizeof
(
serializedStoreWithCertAndHash
));
sizeof
(
serializedStoreWithCertAndHash
)
,
TRUE
);
CertFreeCertificateContext
(
linked
);
}
...
...
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