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
8d4b288f
Commit
8d4b288f
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 ContextList_Add.
parent
6eddbf18
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
21 deletions
+25
-21
context.c
dlls/crypt32/context.c
+6
-8
crypt32_private.h
dlls/crypt32/crypt32_private.h
+1
-1
store.c
dlls/crypt32/store.c
+18
-12
No files found.
dlls/crypt32/context.c
View file @
8d4b288f
...
...
@@ -137,33 +137,31 @@ struct ContextList *ContextList_Create(
return
list
;
}
void
*
ContextList_Add
(
struct
ContextList
*
list
,
void
*
toLink
,
void
*
toReplace
,
struct
WINE_CRYPTCERTSTORE
*
store
,
BOOL
use_link
)
context_t
*
ContextList_Add
(
struct
ContextList
*
list
,
context_t
*
toLink
,
context_t
*
existing
,
struct
WINE_CRYPTCERTSTORE
*
store
,
BOOL
use_link
)
{
context_t
*
context
;
TRACE
(
"(%p, %p, %p)
\n
"
,
list
,
toLink
,
toReplace
);
TRACE
(
"(%p, %p, %p)
\n
"
,
list
,
toLink
,
existing
);
context
=
context_from_ptr
(
toLink
)
->
vtbl
->
clone
(
BASE_CONTEXT_FROM_CONTEXT
(
toLink
)
,
store
,
use_link
);
context
=
toLink
->
vtbl
->
clone
(
toLink
,
store
,
use_link
);
if
(
context
)
{
TRACE
(
"adding %p
\n
"
,
context
);
EnterCriticalSection
(
&
list
->
cs
);
if
(
toReplace
)
if
(
existing
)
{
context_t
*
existing
=
context_from_ptr
(
toReplace
);
context
->
u
.
entry
.
prev
=
existing
->
u
.
entry
.
prev
;
context
->
u
.
entry
.
next
=
existing
->
u
.
entry
.
next
;
context
->
u
.
entry
.
prev
->
next
=
&
context
->
u
.
entry
;
context
->
u
.
entry
.
next
->
prev
=
&
context
->
u
.
entry
;
list_init
(
&
existing
->
u
.
entry
);
Context_Release
(
context_from_ptr
(
toReplace
)
);
Context_Release
(
existing
);
}
else
list_add_head
(
&
list
->
contexts
,
&
context
->
u
.
entry
);
LeaveCriticalSection
(
&
list
->
cs
);
}
return
CONTEXT_FROM_BASE_CONTEXT
(
context
)
;
return
context
;
}
void
*
ContextList_Enum
(
struct
ContextList
*
list
,
void
*
pPrev
)
...
...
dlls/crypt32/crypt32_private.h
View file @
8d4b288f
...
...
@@ -444,7 +444,7 @@ struct ContextList;
struct
ContextList
*
ContextList_Create
(
const
WINE_CONTEXT_INTERFACE
*
contextInterface
,
size_t
contextSize
)
DECLSPEC_HIDDEN
;
void
*
ContextList_Add
(
struct
ContextList
*
list
,
void
*
toLink
,
void
*
toReplace
,
context_t
*
ContextList_Add
(
struct
ContextList
*
list
,
context_t
*
toLink
,
context_t
*
toReplace
,
struct
WINE_CRYPTCERTSTORE
*
store
,
BOOL
use_link
)
DECLSPEC_HIDDEN
;
void
*
ContextList_Enum
(
struct
ContextList
*
list
,
void
*
pPrev
)
DECLSPEC_HIDDEN
;
...
...
dlls/crypt32/store.c
View file @
8d4b288f
...
...
@@ -146,16 +146,18 @@ static BOOL MemStore_addCert(WINECRYPT_CERTSTORE *store, void *cert,
void
*
toReplace
,
const
void
**
ppStoreContext
,
BOOL
use_link
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
PCERT_CONTEXT
context
;
context_t
*
context
;
TRACE
(
"(%p, %p, %p, %p)
\n
"
,
store
,
cert
,
toReplace
,
ppStoreContext
);
context
=
ContextList_Add
(
ms
->
certs
,
c
ert
,
toReplace
,
store
,
use_link
);
context
=
ContextList_Add
(
ms
->
certs
,
c
ontext_from_ptr
(
cert
),
toReplace
?
context_from_ptr
(
toReplace
)
:
NULL
,
store
,
use_link
);
if
(
!
context
)
return
FALSE
;
if
(
ppStoreContext
)
*
ppStoreContext
=
CertDuplicateCertificateContext
(
context
);
if
(
ppStoreContext
)
{
Context_AddRef
(
context
);
*
ppStoreContext
=
context_ptr
(
context
);
}
return
TRUE
;
}
...
...
@@ -188,16 +190,18 @@ static BOOL MemStore_addCRL(WINECRYPT_CERTSTORE *store, void *crl,
void
*
toReplace
,
const
void
**
ppStoreContext
,
BOOL
use_link
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
PCRL_CONTEXT
context
;
context_t
*
context
;
TRACE
(
"(%p, %p, %p, %p)
\n
"
,
store
,
crl
,
toReplace
,
ppStoreContext
);
context
=
ContextList_Add
(
ms
->
crls
,
c
rl
,
toReplace
,
store
,
use_link
);
context
=
ContextList_Add
(
ms
->
crls
,
c
ontext_from_ptr
(
crl
),
toReplace
?
context_from_ptr
(
toReplace
)
:
NULL
,
store
,
use_link
);
if
(
!
context
)
return
FALSE
;
if
(
ppStoreContext
)
*
ppStoreContext
=
CertDuplicateCRLContext
(
context
);
if
(
ppStoreContext
)
{
Context_AddRef
(
context
);
*
ppStoreContext
=
context_ptr
(
context
);
}
return
TRUE
;
}
...
...
@@ -230,16 +234,18 @@ static BOOL MemStore_addCTL(WINECRYPT_CERTSTORE *store, void *ctl,
void
*
toReplace
,
const
void
**
ppStoreContext
,
BOOL
use_link
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
PCTL_CONTEXT
context
;
context_t
*
context
;
TRACE
(
"(%p, %p, %p, %p)
\n
"
,
store
,
ctl
,
toReplace
,
ppStoreContext
);
context
=
ContextList_Add
(
ms
->
ctls
,
c
tl
,
toReplace
,
store
,
use_link
);
context
=
ContextList_Add
(
ms
->
ctls
,
c
ontext_from_ptr
(
ctl
),
toReplace
?
context_from_ptr
(
toReplace
)
:
NULL
,
store
,
use_link
);
if
(
!
context
)
return
FALSE
;
if
(
ppStoreContext
)
*
ppStoreContext
=
CertDuplicateCTLContext
(
context
);
if
(
ppStoreContext
)
{
Context_AddRef
(
context
);
*
ppStoreContext
=
context_ptr
(
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