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
be023607
Commit
be023607
authored
Oct 14, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 14, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Added support for CERT_CLOSE_STORE_CHECK_FLAG flag in MemStore_release.
parent
2256a728
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
2 deletions
+34
-2
store.c
dlls/crypt32/store.c
+2
-2
store.c
dlls/crypt32/tests/store.c
+32
-0
No files found.
dlls/crypt32/store.c
View file @
be023607
...
...
@@ -296,13 +296,13 @@ static DWORD MemStore_release(WINECRYPT_CERTSTORE *cert_store, DWORD flags)
WINE_MEMSTORE
*
store
=
(
WINE_MEMSTORE
*
)
cert_store
;
LONG
ref
;
if
(
flags
)
if
(
flags
&
~
CERT_CLOSE_STORE_CHECK_FLAG
)
FIXME
(
"Unimplemented flags %x
\n
"
,
flags
);
ref
=
InterlockedDecrement
(
&
store
->
hdr
.
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
store
,
ref
);
if
(
ref
)
return
ERROR_SUCCESS
;
return
(
flags
&
CERT_CLOSE_STORE_CHECK_FLAG
)
?
CRYPT_E_PENDING_CLOSE
:
ERROR_SUCCESS
;
ContextList_Free
(
store
->
certs
);
ContextList_Free
(
store
->
crls
);
...
...
dlls/crypt32/tests/store.c
View file @
be023607
...
...
@@ -2557,10 +2557,41 @@ static void testEmptyStore(void)
CertCloseStore
(
store
,
0
);
res
=
CertCloseStore
(
cert
->
hCertStore
,
CERT_CLOSE_STORE_CHECK_FLAG
);
ok
(
!
res
&&
GetLastError
()
==
E_UNEXPECTED
,
"CertCloseStore returned: %x(%x)
\n
"
,
res
,
GetLastError
());
res
=
CertCloseStore
(
cert
->
hCertStore
,
0
);
ok
(
!
res
&&
GetLastError
()
==
E_UNEXPECTED
,
"CertCloseStore returned: %x(%x)
\n
"
,
res
,
GetLastError
());
CertFreeCertificateContext
(
cert2
);
CertFreeCertificateContext
(
cert
);
}
static
void
testCloseStore
(
void
)
{
HCERTSTORE
store
,
store2
;
BOOL
res
;
store
=
CertOpenStore
(
CERT_STORE_PROV_MEMORY
,
0
,
0
,
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
ok
(
store
!=
NULL
,
"CertOpenStore failed
\n
"
);
res
=
CertCloseStore
(
store
,
CERT_CLOSE_STORE_CHECK_FLAG
);
ok
(
res
,
"CertCloseStore failed
\n
"
);
store
=
CertOpenStore
(
CERT_STORE_PROV_MEMORY
,
0
,
0
,
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
ok
(
store
!=
NULL
,
"CertOpenStore failed
\n
"
);
store2
=
CertDuplicateStore
(
store
);
ok
(
store2
!=
NULL
,
"CertCloneStore failed
\n
"
);
ok
(
store2
==
store
,
"unexpected store2
\n
"
);
res
=
CertCloseStore
(
store
,
CERT_CLOSE_STORE_CHECK_FLAG
);
ok
(
!
res
&&
GetLastError
()
==
CRYPT_E_PENDING_CLOSE
,
"CertCloseStore failed
\n
"
);
res
=
CertCloseStore
(
store2
,
CERT_CLOSE_STORE_CHECK_FLAG
);
ok
(
res
,
"CertCloseStore failed
\n
"
);
}
static
void
test_I_UpdateStore
(
void
)
{
HMODULE
lib
=
GetModuleHandleA
(
"crypt32"
);
...
...
@@ -2659,6 +2690,7 @@ START_TEST(store)
testFileNameStore
();
testMessageStore
();
testSerializedStore
();
testCloseStore
();
testCertOpenSystemStore
();
testCertEnumSystemStore
();
...
...
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