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
b3b1135d
Commit
b3b1135d
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 addref to store vtbl and use it instead of directly accessing ref.
parent
a804cc71
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
2 deletions
+24
-2
collectionstore.c
dlls/crypt32/collectionstore.c
+7
-0
crypt32_private.h
dlls/crypt32/crypt32_private.h
+1
-0
provstore.c
dlls/crypt32/provstore.c
+7
-0
rootstore.c
dlls/crypt32/rootstore.c
+1
-1
store.c
dlls/crypt32/store.c
+8
-1
No files found.
dlls/crypt32/collectionstore.c
View file @
b3b1135d
...
...
@@ -40,6 +40,12 @@ typedef struct _WINE_COLLECTIONSTORE
struct
list
stores
;
}
WINE_COLLECTIONSTORE
;
static
void
Collection_addref
(
WINECRYPT_CERTSTORE
*
store
)
{
LONG
ref
=
InterlockedIncrement
(
&
store
->
ref
);
TRACE
(
"ref = %d
\n
"
,
ref
);
}
static
void
Collection_closeStore
(
WINECRYPT_CERTSTORE
*
store
,
DWORD
dwFlags
)
{
WINE_COLLECTIONSTORE
*
cs
=
(
WINE_COLLECTIONSTORE
*
)
store
;
...
...
@@ -477,6 +483,7 @@ static BOOL Collection_control(WINECRYPT_CERTSTORE *cert_store, DWORD dwFlags,
}
static
const
store_vtbl_t
CollectionStoreVtbl
=
{
Collection_addref
,
Collection_closeStore
,
Collection_control
};
...
...
dlls/crypt32/crypt32_private.h
View file @
b3b1135d
...
...
@@ -246,6 +246,7 @@ typedef struct _CONTEXT_PROPERTY_LIST CONTEXT_PROPERTY_LIST;
*/
typedef
struct
{
void
(
*
addref
)(
struct
WINE_CRYPTCERTSTORE
*
);
void
(
*
closeStore
)(
struct
WINE_CRYPTCERTSTORE
*
,
DWORD
);
BOOL
(
*
control
)(
struct
WINE_CRYPTCERTSTORE
*
,
DWORD
,
DWORD
,
void
const
*
);
}
store_vtbl_t
;
...
...
dlls/crypt32/provstore.c
View file @
b3b1135d
...
...
@@ -41,6 +41,12 @@ typedef struct _WINE_PROVIDERSTORE
PFN_CERT_STORE_PROV_CONTROL
provControl
;
}
WINE_PROVIDERSTORE
;
static
void
ProvStore_addref
(
WINECRYPT_CERTSTORE
*
store
)
{
LONG
ref
=
InterlockedIncrement
(
&
store
->
ref
);
TRACE
(
"ref = %d
\n
"
,
ref
);
}
static
void
ProvStore_closeStore
(
WINECRYPT_CERTSTORE
*
cert_store
,
DWORD
dwFlags
)
{
WINE_PROVIDERSTORE
*
store
=
(
WINE_PROVIDERSTORE
*
)
cert_store
;
...
...
@@ -262,6 +268,7 @@ static BOOL ProvStore_control(WINECRYPT_CERTSTORE *cert_store, DWORD dwFlags, DW
}
static
const
store_vtbl_t
ProvStoreVtbl
=
{
ProvStore_addref
,
ProvStore_closeStore
,
ProvStore_control
};
...
...
dlls/crypt32/rootstore.c
View file @
b3b1135d
...
...
@@ -832,7 +832,7 @@ WINECRYPT_CERTSTORE *CRYPT_RootOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags)
if
(
CRYPT_rootStore
!=
root
)
CertCloseStore
(
root
,
0
);
}
C
ertDuplicateStore
(
CRYPT_rootStore
);
C
RYPT_rootStore
->
vtbl
->
addref
(
CRYPT_rootStore
);
return
CRYPT_rootStore
;
}
...
...
dlls/crypt32/store.c
View file @
b3b1135d
...
...
@@ -284,6 +284,12 @@ static BOOL CRYPT_MemDeleteCtl(WINECRYPT_CERTSTORE *store, void *pCtlContext)
return
ret
;
}
static
void
MemStore_addref
(
WINECRYPT_CERTSTORE
*
store
)
{
LONG
ref
=
InterlockedIncrement
(
&
store
->
ref
);
TRACE
(
"ref = %d
\n
"
,
ref
);
}
static
void
MemStore_closeStore
(
WINECRYPT_CERTSTORE
*
cert_store
,
DWORD
dwFlags
)
{
WINE_MEMSTORE
*
store
=
(
WINE_MEMSTORE
*
)
cert_store
;
...
...
@@ -306,6 +312,7 @@ static BOOL MemStore_control(WINECRYPT_CERTSTORE *store, DWORD dwFlags,
}
static
const
store_vtbl_t
MemStoreVtbl
=
{
MemStore_addref
,
MemStore_closeStore
,
MemStore_control
};
...
...
@@ -1213,7 +1220,7 @@ HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore)
TRACE
(
"(%p)
\n
"
,
hCertStore
);
if
(
hcs
&&
hcs
->
dwMagic
==
WINE_CRYPTCERTSTORE_MAGIC
)
InterlockedIncrement
(
&
hcs
->
ref
);
hcs
->
vtbl
->
addref
(
hcs
);
return
hCertStore
;
}
...
...
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