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
adaaab92
Commit
adaaab92
authored
Aug 16, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Aug 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Move cert store definitions to header.
parent
f3128c92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
58 deletions
+59
-58
crypt32_private.h
dlls/crypt32/crypt32_private.h
+59
-3
store.c
dlls/crypt32/store.c
+0
-55
No files found.
dlls/crypt32/crypt32_private.h
View file @
adaaab92
...
...
@@ -172,6 +172,65 @@ extern PCWINE_CONTEXT_INTERFACE pCertInterface;
extern
PCWINE_CONTEXT_INTERFACE
pCRLInterface
;
extern
PCWINE_CONTEXT_INTERFACE
pCTLInterface
;
/* (Internal) certificate store types and functions */
struct
WINE_CRYPTCERTSTORE
;
typedef
struct
WINE_CRYPTCERTSTORE
*
(
*
StoreOpenFunc
)(
HCRYPTPROV
hCryptProv
,
DWORD
dwFlags
,
const
void
*
pvPara
);
/* Called to enumerate the next context in a store. */
typedef
void
*
(
*
EnumFunc
)(
struct
WINE_CRYPTCERTSTORE
*
store
,
void
*
pPrev
);
/* Called to add a context to a store. If toReplace is not NULL,
* context replaces toReplace in the store, and access checks should not be
* performed. Otherwise context is a new context, and it should only be
* added if the store allows it. If ppStoreContext is not NULL, the added
* context should be returned in *ppStoreContext.
*/
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
;
}
CONTEXT_FUNCS
,
*
PCONTEXT_FUNCS
;
typedef
enum
_CertStoreType
{
StoreTypeMem
,
StoreTypeCollection
,
StoreTypeProvider
,
}
CertStoreType
;
struct
_CONTEXT_PROPERTY_LIST
;
typedef
struct
_CONTEXT_PROPERTY_LIST
*
PCONTEXT_PROPERTY_LIST
;
#define WINE_CRYPTCERTSTORE_MAGIC 0x74726563
/* A cert store is polymorphic through the use of function pointers. A type
* is still needed to distinguish collection stores from other types.
* On the function pointers:
* - closeStore is called when the store's ref count becomes 0
* - control is optional, but should be implemented by any store that supports
* persistence
*/
typedef
struct
WINE_CRYPTCERTSTORE
{
DWORD
dwMagic
;
LONG
ref
;
DWORD
dwOpenFlags
;
HCRYPTPROV
cryptProv
;
CertStoreType
type
;
PFN_CERT_STORE_PROV_CLOSE
closeStore
;
CONTEXT_FUNCS
certs
;
CONTEXT_FUNCS
crls
;
PFN_CERT_STORE_PROV_CONTROL
control
;
/* optional */
PCONTEXT_PROPERTY_LIST
properties
;
}
WINECRYPT_CERTSTORE
,
*
PWINECRYPT_CERTSTORE
;
/* Helper function for store reading functions and
* CertAddSerializedElementToStore. Returns a context of the appropriate type
* if it can, or NULL otherwise. Doesn't validate any of the properties in
...
...
@@ -228,9 +287,6 @@ void *Context_GetLinkedContext(void *context, size_t contextSize);
void
Context_CopyProperties
(
const
void
*
to
,
const
void
*
from
,
size_t
contextSize
);
struct
_CONTEXT_PROPERTY_LIST
;
typedef
struct
_CONTEXT_PROPERTY_LIST
*
PCONTEXT_PROPERTY_LIST
;
/* Returns context's properties, or the linked context's properties if context
* is a link context.
*/
...
...
dlls/crypt32/store.c
View file @
adaaab92
...
...
@@ -41,8 +41,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
crypt
);
#define WINE_CRYPTCERTSTORE_MAGIC 0x74726563
static
const
WINE_CONTEXT_INTERFACE
gCertInterface
=
{
(
CreateContextFunc
)
CertCreateCertificateContext
,
(
AddContextToStoreFunc
)
CertAddCertificateContextToStore
,
...
...
@@ -88,59 +86,6 @@ static const WINE_CONTEXT_INTERFACE gCTLInterface = {
};
PCWINE_CONTEXT_INTERFACE
pCTLInterface
=
&
gCTLInterface
;
struct
WINE_CRYPTCERTSTORE
;
typedef
struct
WINE_CRYPTCERTSTORE
*
(
*
StoreOpenFunc
)(
HCRYPTPROV
hCryptProv
,
DWORD
dwFlags
,
const
void
*
pvPara
);
/* Called to enumerate the next context in a store. */
typedef
void
*
(
*
EnumFunc
)(
struct
WINE_CRYPTCERTSTORE
*
store
,
void
*
pPrev
);
/* Called to add a context to a store. If toReplace is not NULL,
* context replaces toReplace in the store, and access checks should not be
* performed. Otherwise context is a new context, and it should only be
* added if the store allows it. If ppStoreContext is not NULL, the added
* context should be returned in *ppStoreContext.
*/
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
;
}
CONTEXT_FUNCS
,
*
PCONTEXT_FUNCS
;
typedef
enum
_CertStoreType
{
StoreTypeMem
,
StoreTypeCollection
,
StoreTypeProvider
,
}
CertStoreType
;
/* A cert store is polymorphic through the use of function pointers. A type
* is still needed to distinguish collection stores from other types.
* On the function pointers:
* - closeStore is called when the store's ref count becomes 0
* - control is optional, but should be implemented by any store that supports
* persistence
*/
typedef
struct
WINE_CRYPTCERTSTORE
{
DWORD
dwMagic
;
LONG
ref
;
DWORD
dwOpenFlags
;
HCRYPTPROV
cryptProv
;
CertStoreType
type
;
PFN_CERT_STORE_PROV_CLOSE
closeStore
;
CONTEXT_FUNCS
certs
;
CONTEXT_FUNCS
crls
;
PFN_CERT_STORE_PROV_CONTROL
control
;
/* optional */
PCONTEXT_PROPERTY_LIST
properties
;
}
WINECRYPT_CERTSTORE
,
*
PWINECRYPT_CERTSTORE
;
typedef
struct
_WINE_MEMSTORE
{
WINECRYPT_CERTSTORE
hdr
;
...
...
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