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
05f248e9
Commit
05f248e9
authored
Oct 15, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Pass contexts as context_t to CONTEXT_FUNCS->delete.
parent
03ff35c2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
53 deletions
+48
-53
collectionstore.c
dlls/crypt32/collectionstore.c
+15
-12
context.c
dlls/crypt32/context.c
+1
-2
crypt32_private.h
dlls/crypt32/crypt32_private.h
+2
-4
ctl.c
dlls/crypt32/ctl.c
+2
-1
provstore.c
dlls/crypt32/provstore.c
+10
-10
store.c
dlls/crypt32/store.c
+18
-24
No files found.
dlls/crypt32/collectionstore.c
View file @
05f248e9
...
...
@@ -258,16 +258,17 @@ static void *Collection_enumCert(WINECRYPT_CERTSTORE *store, void *pPrev)
return
ret
;
}
static
BOOL
Collection_deleteCert
(
WINECRYPT_CERTSTORE
*
store
,
void
*
pCertC
ontext
)
static
BOOL
Collection_deleteCert
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
c
ontext
)
{
cert_t
*
cert
=
(
cert_t
*
)
context
;
BOOL
ret
;
PCCERT_CONTEXT
linked
;
TRACE
(
"(%p, %p)
\n
"
,
store
,
pCertContex
t
);
TRACE
(
"(%p, %p)
\n
"
,
store
,
cer
t
);
linked
=
Context_GetLinkedContext
(
pCertContext
);
linked
=
Context_GetLinkedContext
(
&
cert
->
ctx
);
ret
=
CertDeleteCertificateFromStore
(
linked
);
C
ertFreeCertificateContext
(
pCertContext
);
C
ontext_Release
(
&
cert
->
base
);
return
ret
;
}
...
...
@@ -333,16 +334,17 @@ static void *Collection_enumCRL(WINECRYPT_CERTSTORE *store, void *pPrev)
return
ret
;
}
static
BOOL
Collection_deleteCRL
(
WINECRYPT_CERTSTORE
*
store
,
void
*
pCrlC
ontext
)
static
BOOL
Collection_deleteCRL
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
c
ontext
)
{
crl_t
*
crl
=
(
crl_t
*
)
context
;
BOOL
ret
;
PCCRL_CONTEXT
linked
;
TRACE
(
"(%p, %p)
\n
"
,
store
,
pCrlContext
);
TRACE
(
"(%p, %p)
\n
"
,
store
,
crl
);
linked
=
Context_GetLinkedContext
(
pCrlContext
);
linked
=
Context_GetLinkedContext
(
&
crl
->
ctx
);
ret
=
CertDeleteCRLFromStore
(
linked
);
C
ertFreeCRLContext
(
pCrlContext
);
C
ontext_Release
(
&
crl
->
base
);
return
ret
;
}
...
...
@@ -408,16 +410,17 @@ static void *Collection_enumCTL(WINECRYPT_CERTSTORE *store, void *pPrev)
return
ret
;
}
static
BOOL
Collection_deleteCTL
(
WINECRYPT_CERTSTORE
*
store
,
void
*
pCtlC
ontext
)
static
BOOL
Collection_deleteCTL
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
c
ontext
)
{
ctl_t
*
ctl
=
(
ctl_t
*
)
context
;
BOOL
ret
;
PCCTL_CONTEXT
linked
;
TRACE
(
"(%p, %p)
\n
"
,
store
,
pCtlContext
);
TRACE
(
"(%p, %p)
\n
"
,
store
,
ctl
);
linked
=
Context_GetLinkedContext
(
pCtlContext
);
linked
=
Context_GetLinkedContext
(
&
ctl
->
ctx
);
ret
=
CertDeleteCTLFromStore
(
linked
);
C
ertFreeCTLContext
(
pCtlContext
);
C
ontext_Release
(
&
ctl
->
base
);
return
ret
;
}
...
...
dlls/crypt32/context.c
View file @
05f248e9
...
...
@@ -216,9 +216,8 @@ void *ContextList_Enum(struct ContextList *list, void *pPrev)
return
ret
;
}
BOOL
ContextList_Remove
(
struct
ContextList
*
list
,
void
*
ctx
)
BOOL
ContextList_Remove
(
struct
ContextList
*
list
,
context_t
*
context
)
{
context_t
*
context
=
context_from_ptr
(
ctx
);
BOOL
inList
=
FALSE
;
EnterCriticalSection
(
&
list
->
cs
);
...
...
dlls/crypt32/crypt32_private.h
View file @
05f248e9
...
...
@@ -275,13 +275,11 @@ typedef void * (*EnumFunc)(struct WINE_CRYPTCERTSTORE *store, void *pPrev);
typedef
BOOL
(
*
AddFunc
)(
struct
WINE_CRYPTCERTSTORE
*
store
,
void
*
context
,
void
*
toReplace
,
const
void
**
ppStoreContext
);
typedef
BOOL
(
*
DeleteFunc
)(
struct
WINE_CRYPTCERTSTORE
*
store
,
void
*
context
);
typedef
struct
_CONTEXT_FUNCS
{
AddFunc
addContext
;
EnumFunc
enumContext
;
DeleteFunc
deleteContext
;
BOOL
(
*
delete
)(
struct
WINE_CRYPTCERTSTORE
*
,
context_t
*
)
;
}
CONTEXT_FUNCS
;
typedef
enum
_CertStoreType
{
...
...
@@ -464,7 +462,7 @@ void *ContextList_Enum(struct ContextList *list, void *pPrev) DECLSPEC_HIDDEN;
* or FALSE if not. (The context may have been duplicated, so subsequent
* removes have no effect.)
*/
BOOL
ContextList_Remove
(
struct
ContextList
*
list
,
void
*
context
)
DECLSPEC_HIDDEN
;
BOOL
ContextList_Remove
(
struct
ContextList
*
list
,
context_t
*
context
)
DECLSPEC_HIDDEN
;
void
ContextList_Free
(
struct
ContextList
*
list
)
DECLSPEC_HIDDEN
;
...
...
dlls/crypt32/ctl.c
View file @
05f248e9
...
...
@@ -330,11 +330,12 @@ BOOL WINAPI CertDeleteCTLFromStore(PCCTL_CONTEXT pCtlContext)
else
{
WINECRYPT_CERTSTORE
*
hcs
=
pCtlContext
->
hCertStore
;
ctl_t
*
ctl
=
ctl_from_ptr
(
pCtlContext
);
if
(
hcs
->
dwMagic
!=
WINE_CRYPTCERTSTORE_MAGIC
)
ret
=
FALSE
;
else
ret
=
hcs
->
vtbl
->
ctls
.
delete
Context
(
hcs
,
(
void
*
)
pCtlContext
);
ret
=
hcs
->
vtbl
->
ctls
.
delete
(
hcs
,
&
ctl
->
base
);
if
(
ret
)
ret
=
CertFreeCTLContext
(
pCtlContext
);
}
...
...
dlls/crypt32/provstore.c
View file @
05f248e9
...
...
@@ -113,17 +113,17 @@ static void *ProvStore_enumCert(WINECRYPT_CERTSTORE *store, void *pPrev)
return
ret
;
}
static
BOOL
ProvStore_deleteCert
(
WINECRYPT_CERTSTORE
*
store
,
void
*
cer
t
)
static
BOOL
ProvStore_deleteCert
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
contex
t
)
{
WINE_PROVIDERSTORE
*
ps
=
(
WINE_PROVIDERSTORE
*
)
store
;
BOOL
ret
=
TRUE
;
TRACE
(
"(%p, %p)
\n
"
,
store
,
c
er
t
);
TRACE
(
"(%p, %p)
\n
"
,
store
,
c
ontex
t
);
if
(
ps
->
provDeleteCert
)
ret
=
ps
->
provDeleteCert
(
ps
->
hStoreProv
,
c
ert
,
0
);
ret
=
ps
->
provDeleteCert
(
ps
->
hStoreProv
,
c
ontext_ptr
(
context
)
,
0
);
if
(
ret
)
ret
=
ps
->
memStore
->
vtbl
->
certs
.
delete
Context
(
ps
->
memStore
,
cer
t
);
ret
=
ps
->
memStore
->
vtbl
->
certs
.
delete
(
ps
->
memStore
,
contex
t
);
return
ret
;
}
...
...
@@ -180,7 +180,7 @@ static void *ProvStore_enumCRL(WINECRYPT_CERTSTORE *store, void *pPrev)
return
ret
;
}
static
BOOL
ProvStore_deleteCRL
(
WINECRYPT_CERTSTORE
*
store
,
void
*
crl
)
static
BOOL
ProvStore_deleteCRL
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
crl
)
{
WINE_PROVIDERSTORE
*
ps
=
(
WINE_PROVIDERSTORE
*
)
store
;
BOOL
ret
=
TRUE
;
...
...
@@ -188,9 +188,9 @@ static BOOL ProvStore_deleteCRL(WINECRYPT_CERTSTORE *store, void *crl)
TRACE
(
"(%p, %p)
\n
"
,
store
,
crl
);
if
(
ps
->
provDeleteCrl
)
ret
=
ps
->
provDeleteCrl
(
ps
->
hStoreProv
,
c
rl
,
0
);
ret
=
ps
->
provDeleteCrl
(
ps
->
hStoreProv
,
c
ontext_ptr
(
crl
)
,
0
);
if
(
ret
)
ret
=
ps
->
memStore
->
vtbl
->
crls
.
delete
Context
(
ps
->
memStore
,
crl
);
ret
=
ps
->
memStore
->
vtbl
->
crls
.
delete
(
ps
->
memStore
,
crl
);
return
ret
;
}
...
...
@@ -247,7 +247,7 @@ static void *ProvStore_enumCTL(WINECRYPT_CERTSTORE *store, void *pPrev)
return
ret
;
}
static
BOOL
ProvStore_deleteCTL
(
WINECRYPT_CERTSTORE
*
store
,
void
*
ctl
)
static
BOOL
ProvStore_deleteCTL
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
ctl
)
{
WINE_PROVIDERSTORE
*
ps
=
(
WINE_PROVIDERSTORE
*
)
store
;
BOOL
ret
=
TRUE
;
...
...
@@ -255,9 +255,9 @@ static BOOL ProvStore_deleteCTL(WINECRYPT_CERTSTORE *store, void *ctl)
TRACE
(
"(%p, %p)
\n
"
,
store
,
ctl
);
if
(
ps
->
provDeleteCtl
)
ret
=
ps
->
provDeleteCtl
(
ps
->
hStoreProv
,
c
tl
,
0
);
ret
=
ps
->
provDeleteCtl
(
ps
->
hStoreProv
,
c
ontext_ptr
(
ctl
)
,
0
);
if
(
ret
)
ret
=
ps
->
memStore
->
vtbl
->
ctls
.
delete
Context
(
ps
->
memStore
,
ctl
);
ret
=
ps
->
memStore
->
vtbl
->
ctls
.
delete
(
ps
->
memStore
,
ctl
);
return
ret
;
}
...
...
dlls/crypt32/store.c
View file @
05f248e9
...
...
@@ -176,16 +176,14 @@ static void *MemStore_enumCert(WINECRYPT_CERTSTORE *store, void *pPrev)
return
ret
;
}
static
BOOL
MemStore_deleteCert
(
WINECRYPT_CERTSTORE
*
store
,
void
*
pCertC
ontext
)
static
BOOL
MemStore_deleteCert
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
c
ontext
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
BOOL
ret
;
if
(
ContextList_Remove
(
ms
->
certs
,
pCertContext
))
ret
=
CertFreeCertificateContext
(
pCertContext
);
else
ret
=
TRUE
;
return
ret
;
if
(
ContextList_Remove
(
ms
->
certs
,
context
))
Context_Release
(
context
);
return
TRUE
;
}
static
BOOL
MemStore_addCRL
(
WINECRYPT_CERTSTORE
*
store
,
void
*
crl
,
...
...
@@ -221,16 +219,14 @@ static void *MemStore_enumCRL(WINECRYPT_CERTSTORE *store, void *pPrev)
return
ret
;
}
static
BOOL
MemStore_deleteCRL
(
WINECRYPT_CERTSTORE
*
store
,
void
*
pCrlC
ontext
)
static
BOOL
MemStore_deleteCRL
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
c
ontext
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
BOOL
ret
;
if
(
ContextList_Remove
(
ms
->
crls
,
pCrlContext
))
ret
=
CertFreeCRLContext
(
pCrlContext
);
else
ret
=
TRUE
;
return
ret
;
if
(
!
ContextList_Remove
(
ms
->
crls
,
context
))
Context_Release
(
context
);
return
TRUE
;
}
static
BOOL
MemStore_addCTL
(
WINECRYPT_CERTSTORE
*
store
,
void
*
ctl
,
...
...
@@ -266,16 +262,14 @@ static void *MemStore_enumCTL(WINECRYPT_CERTSTORE *store, void *pPrev)
return
ret
;
}
static
BOOL
MemStore_deleteCTL
(
WINECRYPT_CERTSTORE
*
store
,
void
*
pCtlC
ontext
)
static
BOOL
MemStore_deleteCTL
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
c
ontext
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
BOOL
ret
;
if
(
ContextList_Remove
(
ms
->
ctls
,
pCtlContext
))
ret
=
CertFreeCTLContext
(
pCtlContext
);
else
ret
=
TRUE
;
return
ret
;
if
(
!
ContextList_Remove
(
ms
->
ctls
,
context
))
Context_Release
(
context
);
return
TRUE
;
}
static
void
MemStore_addref
(
WINECRYPT_CERTSTORE
*
store
)
...
...
@@ -924,7 +918,7 @@ BOOL WINAPI CertDeleteCertificateFromStore(PCCERT_CONTEXT pCertContext)
if
(
hcs
->
dwMagic
!=
WINE_CRYPTCERTSTORE_MAGIC
)
ret
=
FALSE
;
else
ret
=
hcs
->
vtbl
->
certs
.
delete
Context
(
hcs
,
(
void
*
)
pCertContext
);
ret
=
hcs
->
vtbl
->
certs
.
delete
(
hcs
,
&
cert_from_ptr
(
pCertContext
)
->
base
);
}
return
ret
;
}
...
...
@@ -1061,7 +1055,7 @@ BOOL WINAPI CertDeleteCRLFromStore(PCCRL_CONTEXT pCrlContext)
if
(
hcs
->
dwMagic
!=
WINE_CRYPTCERTSTORE_MAGIC
)
ret
=
FALSE
;
else
ret
=
hcs
->
vtbl
->
crls
.
delete
Context
(
hcs
,
(
void
*
)
pCrlContext
);
ret
=
hcs
->
vtbl
->
crls
.
delete
(
hcs
,
&
crl_from_ptr
(
pCrlContext
)
->
base
);
if
(
ret
)
ret
=
CertFreeCRLContext
(
pCrlContext
);
}
...
...
@@ -1387,7 +1381,7 @@ static void *EmptyStore_enum(WINECRYPT_CERTSTORE *store, void *prev)
return
FALSE
;
}
static
BOOL
EmptyStore_delete
(
WINECRYPT_CERTSTORE
*
store
,
void
*
context
)
static
BOOL
EmptyStore_delete
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
context
)
{
return
TRUE
;
}
...
...
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