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
caf6a7dc
Commit
caf6a7dc
authored
Aug 29, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Sep 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Add CTLs to the memory store.
parent
aebb9372
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
crypt32_private.h
dlls/crypt32/crypt32_private.h
+1
-0
store.c
dlls/crypt32/store.c
+48
-0
No files found.
dlls/crypt32/crypt32_private.h
View file @
caf6a7dc
...
...
@@ -227,6 +227,7 @@ typedef struct WINE_CRYPTCERTSTORE
PFN_CERT_STORE_PROV_CLOSE
closeStore
;
CONTEXT_FUNCS
certs
;
CONTEXT_FUNCS
crls
;
CONTEXT_FUNCS
ctls
;
PFN_CERT_STORE_PROV_CONTROL
control
;
/* optional */
PCONTEXT_PROPERTY_LIST
properties
;
}
WINECRYPT_CERTSTORE
,
*
PWINECRYPT_CERTSTORE
;
...
...
dlls/crypt32/store.c
View file @
caf6a7dc
...
...
@@ -91,6 +91,7 @@ typedef struct _WINE_MEMSTORE
WINECRYPT_CERTSTORE
hdr
;
struct
ContextList
*
certs
;
struct
ContextList
*
crls
;
struct
ContextList
*
ctls
;
}
WINE_MEMSTORE
,
*
PWINE_MEMSTORE
;
void
CRYPT_InitStore
(
WINECRYPT_CERTSTORE
*
store
,
DWORD
dwFlags
,
...
...
@@ -229,6 +230,47 @@ static BOOL CRYPT_MemDeleteCrl(PWINECRYPT_CERTSTORE store, void *pCrlContext)
return
TRUE
;
}
static
BOOL
CRYPT_MemAddCtl
(
PWINECRYPT_CERTSTORE
store
,
void
*
ctl
,
void
*
toReplace
,
const
void
**
ppStoreContext
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
PCTL_CONTEXT
context
;
TRACE
(
"(%p, %p, %p, %p)
\n
"
,
store
,
ctl
,
toReplace
,
ppStoreContext
);
context
=
(
PCTL_CONTEXT
)
ContextList_Add
(
ms
->
ctls
,
ctl
,
toReplace
);
if
(
context
)
{
context
->
hCertStore
=
store
;
if
(
ppStoreContext
)
*
ppStoreContext
=
CertDuplicateCTLContext
(
context
);
}
return
context
?
TRUE
:
FALSE
;
}
static
void
*
CRYPT_MemEnumCtl
(
PWINECRYPT_CERTSTORE
store
,
void
*
pPrev
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
void
*
ret
;
TRACE
(
"(%p, %p)
\n
"
,
store
,
pPrev
);
ret
=
ContextList_Enum
(
ms
->
ctls
,
pPrev
);
if
(
!
ret
)
SetLastError
(
CRYPT_E_NOT_FOUND
);
TRACE
(
"returning %p
\n
"
,
ret
);
return
ret
;
}
static
BOOL
CRYPT_MemDeleteCtl
(
PWINECRYPT_CERTSTORE
store
,
void
*
pCtlContext
)
{
WINE_MEMSTORE
*
ms
=
(
WINE_MEMSTORE
*
)
store
;
ContextList_Delete
(
ms
->
ctls
,
pCtlContext
);
return
TRUE
;
}
static
void
WINAPI
CRYPT_MemCloseStore
(
HCERTSTORE
hCertStore
,
DWORD
dwFlags
)
{
WINE_MEMSTORE
*
store
=
(
WINE_MEMSTORE
*
)
hCertStore
;
...
...
@@ -239,6 +281,7 @@ static void WINAPI CRYPT_MemCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
ContextList_Free
(
store
->
certs
);
ContextList_Free
(
store
->
crls
);
ContextList_Free
(
store
->
ctls
);
CRYPT_FreeStore
((
PWINECRYPT_CERTSTORE
)
store
);
}
...
...
@@ -268,11 +311,16 @@ static WINECRYPT_CERTSTORE *CRYPT_MemOpenStore(HCRYPTPROV hCryptProv,
store
->
hdr
.
crls
.
addContext
=
CRYPT_MemAddCrl
;
store
->
hdr
.
crls
.
enumContext
=
CRYPT_MemEnumCrl
;
store
->
hdr
.
crls
.
deleteContext
=
CRYPT_MemDeleteCrl
;
store
->
hdr
.
ctls
.
addContext
=
CRYPT_MemAddCtl
;
store
->
hdr
.
ctls
.
enumContext
=
CRYPT_MemEnumCtl
;
store
->
hdr
.
ctls
.
deleteContext
=
CRYPT_MemDeleteCtl
;
store
->
hdr
.
control
=
NULL
;
store
->
certs
=
ContextList_Create
(
pCertInterface
,
sizeof
(
CERT_CONTEXT
));
store
->
crls
=
ContextList_Create
(
pCRLInterface
,
sizeof
(
CRL_CONTEXT
));
store
->
ctls
=
ContextList_Create
(
pCTLInterface
,
sizeof
(
CTL_CONTEXT
));
/* Mem store doesn't need crypto provider, so close it */
if
(
hCryptProv
&&
!
(
dwFlags
&
CERT_STORE_NO_CRYPT_RELEASE_FLAG
))
CryptReleaseContext
(
hCryptProv
,
0
);
...
...
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