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
108f30bb
Commit
108f30bb
authored
Oct 30, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Nov 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Rename a function to reflect its behavior better, and return whether it succeeds.
parent
7e1cff1c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
11 deletions
+33
-11
context.c
dlls/crypt32/context.c
+10
-3
crypt32_private.h
dlls/crypt32/crypt32_private.h
+5
-1
store.c
dlls/crypt32/store.c
+18
-6
store.c
dlls/crypt32/tests/store.c
+0
-1
No files found.
dlls/crypt32/context.c
View file @
108f30bb
...
...
@@ -313,14 +313,21 @@ void *ContextList_Enum(struct ContextList *list, void *pPrev)
return
ret
;
}
void
ContextList_Delet
e
(
struct
ContextList
*
list
,
void
*
context
)
BOOL
ContextList_Remov
e
(
struct
ContextList
*
list
,
void
*
context
)
{
struct
list
*
entry
=
ContextList_ContextToEntry
(
list
,
context
);
BOOL
inList
=
FALSE
;
EnterCriticalSection
(
&
list
->
cs
);
list_remove
(
entry
);
if
(
!
list_empty
(
entry
))
{
list_remove
(
entry
);
inList
=
TRUE
;
}
LeaveCriticalSection
(
&
list
->
cs
);
list_init
(
entry
);
if
(
inList
)
list_init
(
entry
);
return
inList
;
}
static
void
ContextList_Empty
(
struct
ContextList
*
list
)
...
...
dlls/crypt32/crypt32_private.h
View file @
108f30bb
...
...
@@ -388,7 +388,11 @@ void *ContextList_Add(struct ContextList *list, void *toLink, void *toReplace);
void
*
ContextList_Enum
(
struct
ContextList
*
list
,
void
*
pPrev
);
void
ContextList_Delete
(
struct
ContextList
*
list
,
void
*
context
);
/* Removes a context from the list. Returns TRUE if the context was removed,
* or FALSE if not. (The context may have been duplicated, so subsequent
* removes have no effect.)
*/
BOOL
ContextList_Remove
(
struct
ContextList
*
list
,
void
*
context
);
void
ContextList_Free
(
struct
ContextList
*
list
);
...
...
dlls/crypt32/store.c
View file @
108f30bb
...
...
@@ -184,9 +184,13 @@ static void *CRYPT_MemEnumCert(PWINECRYPT_CERTSTORE store, void *pPrev)
static
BOOL
CRYPT_MemDeleteCert
(
PWINECRYPT_CERTSTORE
store
,
void
*
pCertContext
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
BOOL
ret
;
ContextList_Delete
(
ms
->
certs
,
pCertContext
);
return
CertFreeCertificateContext
(
pCertContext
);
if
(
ContextList_Remove
(
ms
->
certs
,
pCertContext
))
ret
=
CertFreeCertificateContext
(
pCertContext
);
else
ret
=
TRUE
;
return
ret
;
}
static
BOOL
CRYPT_MemAddCrl
(
PWINECRYPT_CERTSTORE
store
,
void
*
crl
,
...
...
@@ -225,9 +229,13 @@ static void *CRYPT_MemEnumCrl(PWINECRYPT_CERTSTORE store, void *pPrev)
static
BOOL
CRYPT_MemDeleteCrl
(
PWINECRYPT_CERTSTORE
store
,
void
*
pCrlContext
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
BOOL
ret
;
ContextList_Delete
(
ms
->
crls
,
pCrlContext
);
return
CertFreeCRLContext
(
pCrlContext
);
if
(
ContextList_Remove
(
ms
->
crls
,
pCrlContext
))
ret
=
CertFreeCRLContext
(
pCrlContext
);
else
ret
=
TRUE
;
return
ret
;
}
static
BOOL
CRYPT_MemAddCtl
(
PWINECRYPT_CERTSTORE
store
,
void
*
ctl
,
...
...
@@ -266,9 +274,13 @@ static void *CRYPT_MemEnumCtl(PWINECRYPT_CERTSTORE store, void *pPrev)
static
BOOL
CRYPT_MemDeleteCtl
(
PWINECRYPT_CERTSTORE
store
,
void
*
pCtlContext
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
BOOL
ret
;
ContextList_Delete
(
ms
->
ctls
,
pCtlContext
);
return
CertFreeCTLContext
(
pCtlContext
);
if
(
ContextList_Remove
(
ms
->
ctls
,
pCtlContext
))
ret
=
CertFreeCTLContext
(
pCtlContext
);
else
ret
=
TRUE
;
return
ret
;
}
static
void
WINAPI
CRYPT_MemCloseStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
)
...
...
dlls/crypt32/tests/store.c
View file @
108f30bb
...
...
@@ -237,7 +237,6 @@ static void testMemStore(void)
GetLastError
());
/* try deleting a copy */
ret
=
CertDeleteCertificateFromStore
(
copy
);
todo_wine
ok
(
ret
,
"CertDeleteCertificateFromStore failed: %08x
\n
"
,
GetLastError
());
/* check that the store is empty */
...
...
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