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
83026a71
Commit
83026a71
authored
Oct 17, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Use context_t in addContext.
parent
c75af2b9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
76 deletions
+89
-76
cert.c
dlls/crypt32/cert.c
+10
-8
collectionstore.c
dlls/crypt32/collectionstore.c
+32
-31
crypt32_private.h
dlls/crypt32/crypt32_private.h
+1
-1
ctl.c
dlls/crypt32/ctl.c
+9
-4
provstore.c
dlls/crypt32/provstore.c
+12
-13
store.c
dlls/crypt32/store.c
+25
-19
No files found.
dlls/crypt32/cert.c
View file @
83026a71
...
...
@@ -169,7 +169,7 @@ BOOL WINAPI add_cert_to_store(WINECRYPT_CERTSTORE *store, const CERT_CONTEXT *ce
{
const
CERT_CONTEXT
*
existing
=
NULL
;
BOOL
ret
=
TRUE
,
inherit_props
=
FALSE
;
CERT_CONTEXT
*
new_context
=
NULL
;
context_t
*
new_context
=
NULL
;
switch
(
add_disposition
)
{
...
...
@@ -262,18 +262,20 @@ BOOL WINAPI add_cert_to_store(WINECRYPT_CERTSTORE *store, const CERT_CONTEXT *ce
return
TRUE
;
}
ret
=
store
->
vtbl
->
certs
.
addContext
(
store
,
(
void
*
)
cert
,
(
void
*
)
existing
,
(
ret_context
||
inherit_props
)
?
(
const
void
**
)
&
new_context
:
NULL
,
use_link
);
ret
=
store
->
vtbl
->
certs
.
addContext
(
store
,
context_from_ptr
(
cert
),
existing
?
context_from_ptr
(
existing
)
:
NULL
,
(
ret_context
||
inherit_props
)
?
&
new_context
:
NULL
,
use_link
);
if
(
!
ret
)
return
FALSE
;
if
(
inherit_props
)
Context_CopyProperties
(
new_context
,
existing
);
Context_CopyProperties
(
context_ptr
(
new_context
)
,
existing
);
if
(
ret_context
)
*
ret_context
=
CertDuplicateCertificateContext
(
new_context
);
else
if
(
new_context
)
CertFreeCertificateContext
(
new_context
);
if
(
ret_context
)
{
Context_AddRef
(
new_context
);
*
ret_context
=
context_ptr
(
new_context
);
}
else
if
(
new_context
)
{
Context_Release
(
new_context
);
}
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
...
...
dlls/crypt32/collectionstore.c
View file @
83026a71
...
...
@@ -85,11 +85,11 @@ static context_t *CRYPT_CollectionCreateContextFromChild(WINE_COLLECTIONSTORE *s
}
static
BOOL
CRYPT_CollectionAddContext
(
WINE_COLLECTIONSTORE
*
store
,
unsigned
int
contextFuncsOffset
,
void
*
context
,
void
*
toReplace
,
unsigned
int
contextSize
,
void
**
pChildContext
)
unsigned
int
contextFuncsOffset
,
context_t
*
context
,
context_t
*
toReplace
,
unsigned
int
contextSize
,
context_t
**
pChildContext
)
{
BOOL
ret
;
void
*
childContext
=
NULL
;
context_t
*
childContext
=
NULL
;
WINE_STORE_LIST_ENTRY
*
storeEntry
=
NULL
;
TRACE
(
"(%p, %d, %p, %p, %d)
\n
"
,
store
,
contextFuncsOffset
,
context
,
...
...
@@ -98,22 +98,21 @@ static BOOL CRYPT_CollectionAddContext(WINE_COLLECTIONSTORE *store,
ret
=
FALSE
;
if
(
toReplace
)
{
context_t
*
existingLinked
=
context_from_ptr
(
toReplace
)
->
linked
;
context_t
*
existingLinked
=
toReplace
->
linked
;
CONTEXT_FUNCS
*
contextFuncs
;
storeEntry
=
context_from_ptr
(
toReplace
)
->
u
.
ptr
;
storeEntry
=
toReplace
->
u
.
ptr
;
contextFuncs
=
(
CONTEXT_FUNCS
*
)((
LPBYTE
)
storeEntry
->
store
->
vtbl
+
contextFuncsOffset
);
ret
=
contextFuncs
->
addContext
(
storeEntry
->
store
,
context
,
context_ptr
(
existingLinked
),
(
const
void
**
)
&
childContext
,
TRUE
);
existingLinked
,
&
childContext
,
TRUE
);
}
else
{
WINE_STORE_LIST_ENTRY
*
entry
,
*
next
;
EnterCriticalSection
(
&
store
->
cs
);
LIST_FOR_EACH_ENTRY_SAFE
(
entry
,
next
,
&
store
->
stores
,
WINE_STORE_LIST_ENTRY
,
entry
)
LIST_FOR_EACH_ENTRY_SAFE
(
entry
,
next
,
&
store
->
stores
,
WINE_STORE_LIST_ENTRY
,
entry
)
{
if
(
entry
->
dwUpdateFlags
&
CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG
)
{
...
...
@@ -121,8 +120,7 @@ static BOOL CRYPT_CollectionAddContext(WINE_COLLECTIONSTORE *store,
(
LPBYTE
)
entry
->
store
->
vtbl
+
contextFuncsOffset
);
storeEntry
=
entry
;
ret
=
contextFuncs
->
addContext
(
entry
->
store
,
context
,
NULL
,
(
const
void
**
)
&
childContext
,
TRUE
);
ret
=
contextFuncs
->
addContext
(
entry
->
store
,
context
,
NULL
,
&
childContext
,
TRUE
);
break
;
}
}
...
...
@@ -197,24 +195,25 @@ static context_t *CRYPT_CollectionAdvanceEnum(WINE_COLLECTIONSTORE *store,
return
ret
;
}
static
BOOL
Collection_addCert
(
WINECRYPT_CERTSTORE
*
store
,
void
*
cert
,
void
*
toReplace
,
const
void
**
ppStoreContext
,
BOOL
use_link
)
static
BOOL
Collection_addCert
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
cert
,
context_t
*
toReplace
,
context_t
**
ppStoreContext
,
BOOL
use_link
)
{
BOOL
ret
;
void
*
childContext
=
NULL
;
context_t
*
childContext
=
NULL
;
WINE_COLLECTIONSTORE
*
cs
=
(
WINE_COLLECTIONSTORE
*
)
store
;
ret
=
CRYPT_CollectionAddContext
(
cs
,
offsetof
(
store_vtbl_t
,
certs
),
cert
,
toReplace
,
sizeof
(
CERT_CONTEXT
),
&
childContext
);
if
(
ppStoreContext
&&
childContext
)
{
WINE_STORE_LIST_ENTRY
*
storeEntry
=
c
ontext_from_ptr
(
childContext
)
->
u
.
ptr
;
WINE_STORE_LIST_ENTRY
*
storeEntry
=
c
hildContext
->
u
.
ptr
;
cert_t
*
context
=
(
cert_t
*
)
CRYPT_CollectionCreateContextFromChild
(
cs
,
storeEntry
,
c
ontext_from_ptr
(
childContext
)
,
sizeof
(
CERT_CONTEXT
));
c
hildContext
,
sizeof
(
CERT_CONTEXT
));
*
ppStoreContext
=
&
context
->
ctx
;
*
ppStoreContext
=
&
context
->
base
;
}
CertFreeCertificateContext
(
childContext
);
if
(
childContext
)
Context_Release
(
childContext
);
return
ret
;
}
...
...
@@ -270,24 +269,25 @@ static BOOL Collection_deleteCert(WINECRYPT_CERTSTORE *store, context_t *context
return
ret
;
}
static
BOOL
Collection_addCRL
(
WINECRYPT_CERTSTORE
*
store
,
void
*
crl
,
void
*
toReplace
,
const
void
**
ppStoreContext
,
BOOL
use_link
)
static
BOOL
Collection_addCRL
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
crl
,
context_t
*
toReplace
,
context_t
**
ppStoreContext
,
BOOL
use_link
)
{
BOOL
ret
;
void
*
childContext
=
NULL
;
context_t
*
childContext
=
NULL
;
WINE_COLLECTIONSTORE
*
cs
=
(
WINE_COLLECTIONSTORE
*
)
store
;
ret
=
CRYPT_CollectionAddContext
(
cs
,
offsetof
(
store_vtbl_t
,
crls
),
crl
,
toReplace
,
sizeof
(
CRL_CONTEXT
),
&
childContext
);
if
(
ppStoreContext
&&
childContext
)
{
WINE_STORE_LIST_ENTRY
*
storeEntry
=
c
ontext_from_ptr
(
childContext
)
->
u
.
ptr
;
WINE_STORE_LIST_ENTRY
*
storeEntry
=
c
hildContext
->
u
.
ptr
;
crl_t
*
context
=
(
crl_t
*
)
CRYPT_CollectionCreateContextFromChild
(
cs
,
storeEntry
,
c
ontext_from_ptr
(
childContext
)
,
sizeof
(
CRL_CONTEXT
));
c
hildContext
,
sizeof
(
CRL_CONTEXT
));
*
ppStoreContext
=
&
context
->
ctx
;
*
ppStoreContext
=
&
context
->
base
;
}
CertFreeCRLContext
(
childContext
);
if
(
childContext
)
Context_Release
(
childContext
);
return
ret
;
}
...
...
@@ -341,24 +341,25 @@ static BOOL Collection_deleteCRL(WINECRYPT_CERTSTORE *store, context_t *context)
return
ret
;
}
static
BOOL
Collection_addCTL
(
WINECRYPT_CERTSTORE
*
store
,
void
*
ctl
,
void
*
toReplace
,
const
void
**
ppStoreContext
,
BOOL
use_link
)
static
BOOL
Collection_addCTL
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
ctl
,
context_t
*
toReplace
,
context_t
**
ppStoreContext
,
BOOL
use_link
)
{
BOOL
ret
;
void
*
childContext
=
NULL
;
context_t
*
childContext
=
NULL
;
WINE_COLLECTIONSTORE
*
cs
=
(
WINE_COLLECTIONSTORE
*
)
store
;
ret
=
CRYPT_CollectionAddContext
(
cs
,
offsetof
(
store_vtbl_t
,
ctls
),
ctl
,
toReplace
,
sizeof
(
CTL_CONTEXT
),
&
childContext
);
if
(
ppStoreContext
&&
childContext
)
{
WINE_STORE_LIST_ENTRY
*
storeEntry
=
c
ontext_from_ptr
(
childContext
)
->
u
.
ptr
;
WINE_STORE_LIST_ENTRY
*
storeEntry
=
c
hildContext
->
u
.
ptr
;
ctl_t
*
context
=
(
ctl_t
*
)
CRYPT_CollectionCreateContextFromChild
(
cs
,
storeEntry
,
c
ontext_from_ptr
(
childContext
)
,
sizeof
(
CTL_CONTEXT
));
c
hildContext
,
sizeof
(
CTL_CONTEXT
));
*
ppStoreContext
=
&
context
->
ctx
;
*
ppStoreContext
=
&
context
->
base
;
}
CertFreeCTLContext
(
childContext
);
if
(
childContext
)
Context_Release
(
childContext
);
return
ret
;
}
...
...
dlls/crypt32/crypt32_private.h
View file @
83026a71
...
...
@@ -272,7 +272,7 @@ typedef struct _CONTEXT_FUNCS
* added if the store allows it. If ppStoreContext is not NULL, the added
* context should be returned in *ppStoreContext.
*/
BOOL
(
*
addContext
)(
struct
WINE_CRYPTCERTSTORE
*
,
void
*
,
void
*
,
const
void
**
,
BOOL
);
BOOL
(
*
addContext
)(
struct
WINE_CRYPTCERTSTORE
*
,
context_t
*
,
context_t
*
,
context_t
**
,
BOOL
);
context_t
*
(
*
enumContext
)(
struct
WINE_CRYPTCERTSTORE
*
store
,
context_t
*
prev
);
BOOL
(
*
delete
)(
struct
WINE_CRYPTCERTSTORE
*
,
context_t
*
);
}
CONTEXT_FUNCS
;
...
...
dlls/crypt32/ctl.c
View file @
83026a71
...
...
@@ -157,11 +157,16 @@ BOOL WINAPI CertAddCTLContextToStore(HCERTSTORE hCertStore,
if
(
toAdd
)
{
if
(
store
)
ret
=
store
->
vtbl
->
ctls
.
addContext
(
store
,
(
void
*
)
toAdd
,
(
void
*
)
existing
,
(
const
void
**
)
ppStoreContext
,
TRUE
);
else
if
(
ppStoreContext
)
if
(
store
)
{
context_t
*
ret_ctx
;
ret
=
store
->
vtbl
->
ctls
.
addContext
(
store
,
context_from_ptr
(
toAdd
),
existing
?
context_from_ptr
(
existing
)
:
NULL
,
ppStoreContext
?
&
ret_ctx
:
NULL
,
TRUE
);
if
(
ret
&&
ppStoreContext
)
*
ppStoreContext
=
context_ptr
(
ret_ctx
);
}
else
if
(
ppStoreContext
)
{
*
ppStoreContext
=
CertDuplicateCTLContext
(
toAdd
);
}
CertFreeCTLContext
(
toAdd
);
}
CertFreeCTLContext
(
existing
);
...
...
dlls/crypt32/provstore.c
View file @
83026a71
...
...
@@ -68,8 +68,8 @@ static DWORD ProvStore_release(WINECRYPT_CERTSTORE *cert_store, DWORD flags)
return
ERROR_SUCCESS
;
}
static
BOOL
ProvStore_addCert
(
WINECRYPT_CERTSTORE
*
store
,
void
*
cert
,
void
*
toReplace
,
const
void
**
ppStoreContext
,
BOOL
use_link
)
static
BOOL
ProvStore_addCert
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
cert
,
context_t
*
toReplace
,
context_t
**
ppStoreContext
,
BOOL
use_link
)
{
WINE_PROVIDERSTORE
*
ps
=
(
WINE_PROVIDERSTORE
*
)
store
;
BOOL
ret
;
...
...
@@ -83,8 +83,7 @@ static BOOL ProvStore_addCert(WINECRYPT_CERTSTORE *store, void *cert,
{
ret
=
TRUE
;
if
(
ps
->
provWriteCert
)
ret
=
ps
->
provWriteCert
(
ps
->
hStoreProv
,
cert
,
CERT_STORE_PROV_WRITE_ADD_FLAG
);
ret
=
ps
->
provWriteCert
(
ps
->
hStoreProv
,
context_ptr
(
cert
),
CERT_STORE_PROV_WRITE_ADD_FLAG
);
if
(
ret
)
ret
=
ps
->
memStore
->
vtbl
->
certs
.
addContext
(
ps
->
memStore
,
cert
,
NULL
,
ppStoreContext
,
TRUE
);
...
...
@@ -93,7 +92,7 @@ static BOOL ProvStore_addCert(WINECRYPT_CERTSTORE *store, void *cert,
* store.
*/
if
(
ret
&&
ppStoreContext
)
(
*
(
PCERT_CONTEXT
*
)
ppStoreContext
)
->
hCertStore
=
store
;
(
*
(
cert_t
**
)
ppStoreContext
)
->
ctx
.
hCertStore
=
store
;
return
ret
;
}
...
...
@@ -127,8 +126,8 @@ static BOOL ProvStore_deleteCert(WINECRYPT_CERTSTORE *store, context_t *context)
return
ret
;
}
static
BOOL
ProvStore_addCRL
(
WINECRYPT_CERTSTORE
*
store
,
void
*
crl
,
void
*
toReplace
,
const
void
**
ppStoreContext
,
BOOL
use_link
)
static
BOOL
ProvStore_addCRL
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
crl
,
context_t
*
toReplace
,
context_t
**
ppStoreContext
,
BOOL
use_link
)
{
WINE_PROVIDERSTORE
*
ps
=
(
WINE_PROVIDERSTORE
*
)
store
;
BOOL
ret
;
...
...
@@ -149,7 +148,7 @@ static BOOL ProvStore_addCRL(WINECRYPT_CERTSTORE *store, void *crl,
{
ret
=
TRUE
;
if
(
ps
->
provWriteCrl
)
ret
=
ps
->
provWriteCrl
(
ps
->
hStoreProv
,
c
rl
,
ret
=
ps
->
provWriteCrl
(
ps
->
hStoreProv
,
c
ontext_ptr
(
crl
)
,
CERT_STORE_PROV_WRITE_ADD_FLAG
);
if
(
ret
)
ret
=
ps
->
memStore
->
vtbl
->
crls
.
addContext
(
ps
->
memStore
,
crl
,
NULL
,
...
...
@@ -160,7 +159,7 @@ static BOOL ProvStore_addCRL(WINECRYPT_CERTSTORE *store, void *crl,
* store.
*/
if
(
ret
&&
ppStoreContext
)
(
*
(
PCRL_CONTEXT
*
)
ppStoreContext
)
->
hCertStore
=
store
;
(
*
(
crl_t
**
)
ppStoreContext
)
->
ctx
.
hCertStore
=
store
;
return
ret
;
}
...
...
@@ -194,8 +193,8 @@ static BOOL ProvStore_deleteCRL(WINECRYPT_CERTSTORE *store, context_t *crl)
return
ret
;
}
static
BOOL
ProvStore_addCTL
(
WINECRYPT_CERTSTORE
*
store
,
void
*
ctl
,
void
*
toReplace
,
const
void
**
ppStoreContext
,
BOOL
use_link
)
static
BOOL
ProvStore_addCTL
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
ctl
,
context_t
*
toReplace
,
context_t
**
ppStoreContext
,
BOOL
use_link
)
{
WINE_PROVIDERSTORE
*
ps
=
(
WINE_PROVIDERSTORE
*
)
store
;
BOOL
ret
;
...
...
@@ -216,7 +215,7 @@ static BOOL ProvStore_addCTL(WINECRYPT_CERTSTORE *store, void *ctl,
{
ret
=
TRUE
;
if
(
ps
->
provWriteCtl
)
ret
=
ps
->
provWriteCtl
(
ps
->
hStoreProv
,
c
tl
,
ret
=
ps
->
provWriteCtl
(
ps
->
hStoreProv
,
c
ontext_ptr
(
ctl
)
,
CERT_STORE_PROV_WRITE_ADD_FLAG
);
if
(
ret
)
ret
=
ps
->
memStore
->
vtbl
->
ctls
.
addContext
(
ps
->
memStore
,
ctl
,
NULL
,
...
...
@@ -227,7 +226,7 @@ static BOOL ProvStore_addCTL(WINECRYPT_CERTSTORE *store, void *ctl,
* store.
*/
if
(
ret
&&
ppStoreContext
)
(
*
(
PCTL_CONTEXT
*
)
ppStoreContext
)
->
hCertStore
=
store
;
(
*
(
ctl_t
**
)
ppStoreContext
)
->
ctx
.
hCertStore
=
store
;
return
ret
;
}
...
...
dlls/crypt32/store.c
View file @
83026a71
...
...
@@ -142,21 +142,21 @@ BOOL WINAPI I_CertUpdateStore(HCERTSTORE store1, HCERTSTORE store2, DWORD unk0,
return
TRUE
;
}
static
BOOL
MemStore_addCert
(
WINECRYPT_CERTSTORE
*
store
,
void
*
cert
,
void
*
toReplace
,
const
void
**
ppStoreContext
,
BOOL
use_link
)
static
BOOL
MemStore_addCert
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
cert
,
context_t
*
toReplace
,
context_t
**
ppStoreContext
,
BOOL
use_link
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
context_t
*
context
;
TRACE
(
"(%p, %p, %p, %p)
\n
"
,
store
,
cert
,
toReplace
,
ppStoreContext
);
context
=
ContextList_Add
(
ms
->
certs
,
c
ontext_from_ptr
(
cert
),
toReplace
?
context_from_ptr
(
toReplace
)
:
NULL
,
store
,
use_link
);
context
=
ContextList_Add
(
ms
->
certs
,
c
ert
,
toReplace
,
store
,
use_link
);
if
(
!
context
)
return
FALSE
;
if
(
ppStoreContext
)
{
Context_AddRef
(
context
);
*
ppStoreContext
=
context
_ptr
(
context
)
;
*
ppStoreContext
=
context
;
}
return
TRUE
;
}
...
...
@@ -186,21 +186,21 @@ static BOOL MemStore_deleteCert(WINECRYPT_CERTSTORE *store, context_t *context)
return
TRUE
;
}
static
BOOL
MemStore_addCRL
(
WINECRYPT_CERTSTORE
*
store
,
void
*
crl
,
void
*
toReplace
,
const
void
**
ppStoreContext
,
BOOL
use_link
)
static
BOOL
MemStore_addCRL
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
crl
,
context_t
*
toReplace
,
context_t
**
ppStoreContext
,
BOOL
use_link
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
context_t
*
context
;
TRACE
(
"(%p, %p, %p, %p)
\n
"
,
store
,
crl
,
toReplace
,
ppStoreContext
);
context
=
ContextList_Add
(
ms
->
crls
,
c
ontext_from_ptr
(
crl
),
toReplace
?
context_from_ptr
(
toReplace
)
:
NULL
,
store
,
use_link
);
context
=
ContextList_Add
(
ms
->
crls
,
c
rl
,
toReplace
,
store
,
use_link
);
if
(
!
context
)
return
FALSE
;
if
(
ppStoreContext
)
{
Context_AddRef
(
context
);
*
ppStoreContext
=
context
_ptr
(
context
)
;
*
ppStoreContext
=
context
;
}
return
TRUE
;
}
...
...
@@ -230,21 +230,21 @@ static BOOL MemStore_deleteCRL(WINECRYPT_CERTSTORE *store, context_t *context)
return
TRUE
;
}
static
BOOL
MemStore_addCTL
(
WINECRYPT_CERTSTORE
*
store
,
void
*
ctl
,
void
*
toReplace
,
const
void
**
ppStoreContext
,
BOOL
use_link
)
static
BOOL
MemStore_addCTL
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
ctl
,
context_t
*
toReplace
,
context_t
**
ppStoreContext
,
BOOL
use_link
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
context_t
*
context
;
TRACE
(
"(%p, %p, %p, %p)
\n
"
,
store
,
ctl
,
toReplace
,
ppStoreContext
);
context
=
ContextList_Add
(
ms
->
ctls
,
c
ontext_from_ptr
(
ctl
),
toReplace
?
context_from_ptr
(
toReplace
)
:
NULL
,
store
,
use_link
);
context
=
ContextList_Add
(
ms
->
ctls
,
c
tl
,
toReplace
,
store
,
use_link
);
if
(
!
context
)
return
FALSE
;
if
(
ppStoreContext
)
{
Context_AddRef
(
context
);
*
ppStoreContext
=
context
_ptr
(
context
)
;
*
ppStoreContext
=
context
;
}
return
TRUE
;
}
...
...
@@ -1026,13 +1026,19 @@ BOOL WINAPI CertAddCRLContextToStore(HCERTSTORE hCertStore,
if
(
toAdd
)
{
if
(
store
)
ret
=
store
->
vtbl
->
crls
.
addContext
(
store
,
(
void
*
)
toAdd
,
(
void
*
)
existing
,
(
const
void
**
)
ppStoreContext
,
TRUE
);
else
if
(
ppStoreContext
)
if
(
store
)
{
context_t
*
ret_context
;
ret
=
store
->
vtbl
->
crls
.
addContext
(
store
,
context_from_ptr
(
toAdd
),
existing
?
context_from_ptr
(
existing
)
:
NULL
,
ppStoreContext
?
&
ret_context
:
NULL
,
TRUE
);
if
(
ret
&&
ppStoreContext
)
*
ppStoreContext
=
context_ptr
(
ret_context
);
}
else
if
(
ppStoreContext
)
{
*
ppStoreContext
=
CertDuplicateCRLContext
(
toAdd
);
}
CertFreeCRLContext
(
toAdd
);
}
CertFreeCRLContext
(
existing
);
if
(
existing
)
CertFreeCRLContext
(
existing
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
...
...
@@ -1358,14 +1364,14 @@ static DWORD EmptyStore_release(WINECRYPT_CERTSTORE *store, DWORD flags)
return
E_UNEXPECTED
;
}
static
BOOL
EmptyStore_add
(
WINECRYPT_CERTSTORE
*
store
,
void
*
context
,
void
*
replace
,
const
void
**
ret_context
,
BOOL
use_link
)
static
BOOL
EmptyStore_add
(
WINECRYPT_CERTSTORE
*
store
,
context_t
*
context
,
context_t
*
replace
,
context_t
**
ret_context
,
BOOL
use_link
)
{
TRACE
(
"(%p, %p, %p, %p)
\n
"
,
store
,
context
,
replace
,
ret_context
);
/* FIXME: We should clone the context */
if
(
ret_context
)
{
Context_AddRef
(
context
_from_ptr
(
context
)
);
Context_AddRef
(
context
);
*
ret_context
=
context
;
}
...
...
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