2 * Copyright 2005 Juan Lang
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __CRYPT32_PRIVATE_H__
20 #define __CRYPT32_PRIVATE_H__
22 #include "wine/list.h"
23 #include "wine/unixlib.h"
25 BOOL
CNG_ImportPubKey(CERT_PUBLIC_KEY_INFO
*pubKeyInfo
, BCRYPT_KEY_HANDLE
*key
) DECLSPEC_HIDDEN
;
26 BOOL
cng_prepare_signature(const char *alg_oid
, BYTE
*encoded_sig
, DWORD encoded_sig_len
,
27 BYTE
**sig_value
, DWORD
*sig_len
) DECLSPEC_HIDDEN
;
29 /* a few asn.1 tags we need */
30 #define ASN_BOOL (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x01)
31 #define ASN_BITSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x03)
32 #define ASN_ENUMERATED (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x0a)
33 #define ASN_UTF8STRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x0c)
34 #define ASN_SETOF (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x11)
35 #define ASN_NUMERICSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x12)
36 #define ASN_PRINTABLESTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x13)
37 #define ASN_T61STRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x14)
38 #define ASN_VIDEOTEXSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x15)
39 #define ASN_IA5STRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x16)
40 #define ASN_UTCTIME (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x17)
41 #define ASN_GENERALTIME (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x18)
42 #define ASN_GRAPHICSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x19)
43 #define ASN_VISIBLESTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x1a)
44 #define ASN_GENERALSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x1b)
45 #define ASN_UNIVERSALSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x1c)
46 #define ASN_BMPSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x1e)
48 /* Copies `len` bytes from `src` to `dst`,
49 * reversing the order of the bytes
51 void CRYPT_CopyReversed(BYTE
*dst
, const BYTE
*src
, size_t len
) DECLSPEC_HIDDEN
;
53 BOOL
CRYPT_EncodeLen(DWORD len
, BYTE
*pbEncoded
, DWORD
*pcbEncoded
) DECLSPEC_HIDDEN
;
55 typedef BOOL (WINAPI
*CryptEncodeObjectExFunc
)(DWORD
, LPCSTR
, const void *,
56 DWORD
, PCRYPT_ENCODE_PARA
, BYTE
*, DWORD
*);
58 struct AsnEncodeSequenceItem
60 const void *pvStructInfo
;
61 CryptEncodeObjectExFunc encodeFunc
;
62 DWORD size
; /* used during encoding, not for your use */
65 BOOL WINAPI
CRYPT_AsnEncodeSequence(DWORD dwCertEncodingType
,
66 struct AsnEncodeSequenceItem items
[], DWORD cItem
, DWORD dwFlags
,
67 PCRYPT_ENCODE_PARA pEncodePara
, BYTE
*pbEncoded
, DWORD
*pcbEncoded
) DECLSPEC_HIDDEN
;
69 struct AsnConstructedItem
72 const void *pvStructInfo
;
73 CryptEncodeObjectExFunc encodeFunc
;
76 BOOL WINAPI
CRYPT_AsnEncodeConstructed(DWORD dwCertEncodingType
,
77 LPCSTR lpszStructType
, const void *pvStructInfo
, DWORD dwFlags
,
78 PCRYPT_ENCODE_PARA pEncodePara
, BYTE
*pbEncoded
, DWORD
*pcbEncoded
) DECLSPEC_HIDDEN
;
79 BOOL WINAPI
CRYPT_AsnEncodeOid(DWORD dwCertEncodingType
,
80 LPCSTR lpszStructType
, const void *pvStructInfo
, DWORD dwFlags
,
81 PCRYPT_ENCODE_PARA pEncodePara
, BYTE
*pbEncoded
, DWORD
*pcbEncoded
) DECLSPEC_HIDDEN
;
82 BOOL WINAPI
CRYPT_AsnEncodeOctets(DWORD dwCertEncodingType
,
83 LPCSTR lpszStructType
, const void *pvStructInfo
, DWORD dwFlags
,
84 PCRYPT_ENCODE_PARA pEncodePara
, BYTE
*pbEncoded
, DWORD
*pcbEncoded
) DECLSPEC_HIDDEN
;
86 typedef struct _CRYPT_DIGESTED_DATA
89 CRYPT_ALGORITHM_IDENTIFIER DigestAlgorithm
;
90 CRYPT_CONTENT_INFO ContentInfo
;
92 } CRYPT_DIGESTED_DATA
;
94 BOOL
CRYPT_AsnEncodePKCSDigestedData(const CRYPT_DIGESTED_DATA
*digestedData
,
95 void *pvData
, DWORD
*pcbData
) DECLSPEC_HIDDEN
;
97 typedef struct _CRYPT_ENCRYPTED_CONTENT_INFO
100 CRYPT_ALGORITHM_IDENTIFIER contentEncryptionAlgorithm
;
101 CRYPT_DATA_BLOB encryptedContent
;
102 } CRYPT_ENCRYPTED_CONTENT_INFO
;
104 typedef struct _CRYPT_ENVELOPED_DATA
107 DWORD cRecipientInfo
;
108 PCMSG_KEY_TRANS_RECIPIENT_INFO rgRecipientInfo
;
109 CRYPT_ENCRYPTED_CONTENT_INFO encryptedContentInfo
;
110 } CRYPT_ENVELOPED_DATA
;
112 BOOL
CRYPT_AsnEncodePKCSEnvelopedData(const CRYPT_ENVELOPED_DATA
*envelopedData
,
113 void *pvData
, DWORD
*pcbData
) DECLSPEC_HIDDEN
;
115 BOOL
CRYPT_AsnDecodePKCSEnvelopedData(const BYTE
*pbEncoded
, DWORD cbEncoded
,
116 DWORD dwFlags
, PCRYPT_DECODE_PARA pDecodePara
,
117 CRYPT_ENVELOPED_DATA
*envelopedData
, DWORD
*pcbEnvelopedData
) DECLSPEC_HIDDEN
;
119 typedef struct _CRYPT_SIGNED_INFO
123 PCERT_BLOB rgCertEncoded
;
125 PCRL_BLOB rgCrlEncoded
;
126 CRYPT_CONTENT_INFO content
;
128 PCMSG_CMS_SIGNER_INFO rgSignerInfo
;
129 PDWORD signerKeySpec
;
132 BOOL
CRYPT_AsnEncodeCMSSignedInfo(CRYPT_SIGNED_INFO
*, void *pvData
,
133 DWORD
*pcbData
) DECLSPEC_HIDDEN
;
135 BOOL
CRYPT_AsnDecodeCMSSignedInfo(const BYTE
*pbEncoded
, DWORD cbEncoded
,
136 DWORD dwFlags
, PCRYPT_DECODE_PARA pDecodePara
,
137 CRYPT_SIGNED_INFO
*signedInfo
, DWORD
*pcbSignedInfo
) DECLSPEC_HIDDEN
;
139 /* Helper function to check *pcbEncoded, set it to the required size, and
140 * optionally to allocate memory. Assumes pbEncoded is not NULL.
141 * If CRYPT_ENCODE_ALLOC_FLAG is set in dwFlags, *pbEncoded will be set to a
142 * pointer to the newly allocated memory.
144 BOOL
CRYPT_EncodeEnsureSpace(DWORD dwFlags
, const CRYPT_ENCODE_PARA
*pEncodePara
,
145 BYTE
*pbEncoded
, DWORD
*pcbEncoded
, DWORD bytesNeeded
) DECLSPEC_HIDDEN
;
147 BOOL
CRYPT_AsnDecodePKCSDigestedData(const BYTE
*pbEncoded
, DWORD cbEncoded
,
148 DWORD dwFlags
, PCRYPT_DECODE_PARA pDecodePara
,
149 CRYPT_DIGESTED_DATA
*digestedData
, DWORD
*pcbDigestedData
) DECLSPEC_HIDDEN
;
151 BOOL WINAPI
CRYPT_AsnEncodePubKeyInfoNoNull(DWORD dwCertEncodingType
,
152 LPCSTR lpszStructType
, const void *pvStructInfo
, DWORD dwFlags
,
153 PCRYPT_ENCODE_PARA pEncodePara
, BYTE
*pbEncoded
, DWORD
*pcbEncoded
) DECLSPEC_HIDDEN
;
155 /* The following aren't defined in wincrypt.h, as they're "reserved" */
156 #define CERT_CERT_PROP_ID 32
157 #define CERT_CRL_PROP_ID 33
158 #define CERT_CTL_PROP_ID 34
160 /* Returns a handle to the default crypto provider; loads it if necessary.
161 * Returns NULL on failure.
163 HCRYPTPROV WINAPI
I_CryptGetDefaultCryptProv(ALG_ID
);
165 extern HINSTANCE hInstance DECLSPEC_HIDDEN
;
167 void crypt_oid_init(void) DECLSPEC_HIDDEN
;
168 void crypt_oid_free(void) DECLSPEC_HIDDEN
;
169 void crypt_sip_free(void) DECLSPEC_HIDDEN
;
170 void root_store_free(void) DECLSPEC_HIDDEN
;
171 void default_chain_engine_free(void) DECLSPEC_HIDDEN
;
173 /* (Internal) certificate store types and functions */
174 struct WINE_CRYPTCERTSTORE
;
176 typedef struct _CONTEXT_PROPERTY_LIST CONTEXT_PROPERTY_LIST
;
178 typedef struct _context_t context_t
;
181 void (*free
)(context_t
*);
182 struct _context_t
*(*clone
)(context_t
*,struct WINE_CRYPTCERTSTORE
*,BOOL
);
186 const context_vtbl_t
*vtbl
;
188 struct WINE_CRYPTCERTSTORE
*store
;
189 struct _context_t
*linked
;
190 CONTEXT_PROPERTY_LIST
*properties
;
197 static inline context_t
*context_from_ptr(const void *ptr
)
199 return (context_t
*)ptr
-1;
202 static inline void *context_ptr(context_t
*context
)
212 static inline cert_t
*cert_from_ptr(const CERT_CONTEXT
*ptr
)
214 return CONTAINING_RECORD(ptr
, cert_t
, ctx
);
222 static inline crl_t
*crl_from_ptr(const CRL_CONTEXT
*ptr
)
224 return CONTAINING_RECORD(ptr
, crl_t
, ctx
);
232 static inline ctl_t
*ctl_from_ptr(const CTL_CONTEXT
*ptr
)
234 return CONTAINING_RECORD(ptr
, ctl_t
, ctx
);
237 /* Some typedefs that make it easier to abstract which type of context we're
240 typedef const void *(WINAPI
*CreateContextFunc
)(DWORD dwCertEncodingType
,
241 const BYTE
*pbCertEncoded
, DWORD cbCertEncoded
);
242 typedef BOOL (WINAPI
*AddContextToStoreFunc
)(HCERTSTORE hCertStore
,
243 const void *context
, DWORD dwAddDisposition
, const void **ppStoreContext
);
244 typedef BOOL (WINAPI
*AddEncodedContextToStoreFunc
)(HCERTSTORE hCertStore
,
245 DWORD dwCertEncodingType
, const BYTE
*pbEncoded
, DWORD cbEncoded
,
246 DWORD dwAddDisposition
, const void **ppContext
);
247 typedef const void *(WINAPI
*EnumContextsInStoreFunc
)(HCERTSTORE hCertStore
,
248 const void *pPrevContext
);
249 typedef DWORD (WINAPI
*EnumPropertiesFunc
)(const void *context
, DWORD dwPropId
);
250 typedef BOOL (WINAPI
*GetContextPropertyFunc
)(const void *context
,
251 DWORD dwPropID
, void *pvData
, DWORD
*pcbData
);
252 typedef BOOL (WINAPI
*SetContextPropertyFunc
)(const void *context
,
253 DWORD dwPropID
, DWORD dwFlags
, const void *pvData
);
254 typedef BOOL (WINAPI
*SerializeElementFunc
)(const void *context
, DWORD dwFlags
,
255 BYTE
*pbElement
, DWORD
*pcbElement
);
256 typedef BOOL (WINAPI
*DeleteContextFunc
)(const void *contex
);
258 /* An abstract context (certificate, CRL, or CTL) interface */
259 typedef struct _WINE_CONTEXT_INTERFACE
261 CreateContextFunc create
;
262 AddContextToStoreFunc addContextToStore
;
263 AddEncodedContextToStoreFunc addEncodedToStore
;
264 EnumContextsInStoreFunc enumContextsInStore
;
265 EnumPropertiesFunc enumProps
;
266 GetContextPropertyFunc getProp
;
267 SetContextPropertyFunc setProp
;
268 SerializeElementFunc serialize
;
269 DeleteContextFunc deleteFromStore
;
270 } WINE_CONTEXT_INTERFACE
;
272 extern const WINE_CONTEXT_INTERFACE
*pCertInterface DECLSPEC_HIDDEN
;
273 extern const WINE_CONTEXT_INTERFACE
*pCRLInterface DECLSPEC_HIDDEN
;
274 extern const WINE_CONTEXT_INTERFACE
*pCTLInterface DECLSPEC_HIDDEN
;
276 typedef struct WINE_CRYPTCERTSTORE
* (*StoreOpenFunc
)(HCRYPTPROV hCryptProv
,
277 DWORD dwFlags
, const void *pvPara
);
279 typedef struct _CONTEXT_FUNCS
281 /* Called to add a context to a store. If toReplace is not NULL,
282 * context replaces toReplace in the store, and access checks should not be
283 * performed. Otherwise context is a new context, and it should only be
284 * added if the store allows it. If ppStoreContext is not NULL, the added
285 * context should be returned in *ppStoreContext.
287 BOOL (*addContext
)(struct WINE_CRYPTCERTSTORE
*,context_t
*,context_t
*,context_t
**,BOOL
);
288 context_t
*(*enumContext
)(struct WINE_CRYPTCERTSTORE
*store
, context_t
*prev
);
289 BOOL (*delete)(struct WINE_CRYPTCERTSTORE
*,context_t
*);
292 typedef enum _CertStoreType
{
299 #define WINE_CRYPTCERTSTORE_MAGIC 0x74726563
301 /* A cert store is polymorphic through the use of function pointers. A type
302 * is still needed to distinguish collection stores from other types.
303 * On the function pointers:
304 * - closeStore is called when the store's ref count becomes 0
305 * - control is optional, but should be implemented by any store that supports
310 void (*addref
)(struct WINE_CRYPTCERTSTORE
*);
311 DWORD (*release
)(struct WINE_CRYPTCERTSTORE
*,DWORD
);
312 void (*releaseContext
)(struct WINE_CRYPTCERTSTORE
*,context_t
*);
313 BOOL (*control
)(struct WINE_CRYPTCERTSTORE
*,DWORD
,DWORD
,void const*);
319 typedef struct WINE_CRYPTCERTSTORE
325 const store_vtbl_t
*vtbl
;
326 CONTEXT_PROPERTY_LIST
*properties
;
327 } WINECRYPT_CERTSTORE
;
329 void CRYPT_InitStore(WINECRYPT_CERTSTORE
*store
, DWORD dwFlags
,
330 CertStoreType type
, const store_vtbl_t
*) DECLSPEC_HIDDEN
;
331 void CRYPT_FreeStore(WINECRYPT_CERTSTORE
*store
) DECLSPEC_HIDDEN
;
332 BOOL WINAPI
I_CertUpdateStore(HCERTSTORE store1
, HCERTSTORE store2
, DWORD unk0
,
333 DWORD unk1
) DECLSPEC_HIDDEN
;
335 WINECRYPT_CERTSTORE
*CRYPT_CollectionOpenStore(HCRYPTPROV hCryptProv
,
336 DWORD dwFlags
, const void *pvPara
) DECLSPEC_HIDDEN
;
337 WINECRYPT_CERTSTORE
*CRYPT_ProvCreateStore(DWORD dwFlags
,
338 WINECRYPT_CERTSTORE
*memStore
, const CERT_STORE_PROV_INFO
*pProvInfo
) DECLSPEC_HIDDEN
;
339 WINECRYPT_CERTSTORE
*CRYPT_ProvOpenStore(LPCSTR lpszStoreProvider
,
340 DWORD dwEncodingType
, HCRYPTPROV hCryptProv
, DWORD dwFlags
,
341 const void *pvPara
) DECLSPEC_HIDDEN
;
342 WINECRYPT_CERTSTORE
*CRYPT_RegOpenStore(HCRYPTPROV hCryptProv
, DWORD dwFlags
,
343 const void *pvPara
) DECLSPEC_HIDDEN
;
344 WINECRYPT_CERTSTORE
*CRYPT_FileOpenStore(HCRYPTPROV hCryptProv
, DWORD dwFlags
,
345 const void *pvPara
) DECLSPEC_HIDDEN
;
346 WINECRYPT_CERTSTORE
*CRYPT_FileNameOpenStoreA(HCRYPTPROV hCryptProv
,
347 DWORD dwFlags
, const void *pvPara
) DECLSPEC_HIDDEN
;
348 WINECRYPT_CERTSTORE
*CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv
,
349 DWORD dwFlags
, const void *pvPara
) DECLSPEC_HIDDEN
;
351 void CRYPT_ImportSystemRootCertsToReg(void) DECLSPEC_HIDDEN
;
352 BOOL
CRYPT_SerializeContextsToReg(HKEY key
, DWORD flags
, const WINE_CONTEXT_INTERFACE
*contextInterface
,
353 HCERTSTORE memStore
) DECLSPEC_HIDDEN
;
354 void CRYPT_RegReadSerializedFromReg(HKEY key
, DWORD contextType
,
355 HCERTSTORE store
, DWORD disposition
) DECLSPEC_HIDDEN
;
357 DWORD
CRYPT_IsCertificateSelfSigned(const CERT_CONTEXT
*cert
) DECLSPEC_HIDDEN
;
359 /* Allocates and initializes a certificate chain engine, but without creating
360 * the root store. Instead, it uses root, and assumes the caller has done any
361 * checking necessary.
363 HCERTCHAINENGINE
CRYPT_CreateChainEngine(HCERTSTORE
, DWORD
, const CERT_CHAIN_ENGINE_CONFIG
*) DECLSPEC_HIDDEN
;
365 /* Helper function for store reading functions and
366 * CertAddSerializedElementToStore. Returns a context of the appropriate type
367 * if it can, or NULL otherwise. Doesn't validate any of the properties in
368 * the serialized context (for example, bad hashes are retained.)
369 * *pdwContentType is set to the type of the returned context.
371 const void *CRYPT_ReadSerializedElement(const BYTE
*pbElement
,
372 DWORD cbElement
, DWORD dwContextTypeFlags
, DWORD
*pdwContentType
) DECLSPEC_HIDDEN
;
374 /* Reads contexts serialized in the file into the memory store. Returns FALSE
375 * if the file is not of the expected format.
377 BOOL
CRYPT_ReadSerializedStoreFromFile(HANDLE file
, HCERTSTORE store
) DECLSPEC_HIDDEN
;
379 /* Reads contexts serialized in the blob into the memory store. Returns FALSE
380 * if the file is not of the expected format.
382 BOOL
CRYPT_ReadSerializedStoreFromBlob(const CRYPT_DATA_BLOB
*blob
,
383 HCERTSTORE store
) DECLSPEC_HIDDEN
;
385 struct store_CERT_KEY_CONTEXT
391 void CRYPT_ConvertKeyContext(const struct store_CERT_KEY_CONTEXT
*src
, CERT_KEY_CONTEXT
*dst
) DECLSPEC_HIDDEN
;
397 DWORD
cert_name_to_str_with_indent(DWORD dwCertEncodingType
, DWORD indent
,
398 const CERT_NAME_BLOB
*pName
, DWORD dwStrType
, LPWSTR psz
, DWORD csz
) DECLSPEC_HIDDEN
;
404 /* Allocates a new data context, a context which owns properties directly.
405 * contextSize is the size of the public data type associated with context,
406 * which should be one of CERT_CONTEXT, CRL_CONTEXT, or CTL_CONTEXT.
407 * Free with Context_Release.
409 context_t
*Context_CreateDataContext(size_t contextSize
, const context_vtbl_t
*vtbl
, struct WINE_CRYPTCERTSTORE
*) DECLSPEC_HIDDEN
;
411 /* Creates a new link context. The context refers to linked
412 * rather than owning its own properties. If addRef is TRUE (which ordinarily
413 * it should be) linked is addref'd.
414 * Free with Context_Release.
416 context_t
*Context_CreateLinkContext(unsigned contextSize
, context_t
*linked
, struct WINE_CRYPTCERTSTORE
*) DECLSPEC_HIDDEN
;
418 /* Copies properties from fromContext to toContext. */
419 void Context_CopyProperties(const void *to
, const void *from
) DECLSPEC_HIDDEN
;
421 void Context_AddRef(context_t
*) DECLSPEC_HIDDEN
;
422 void Context_Release(context_t
*context
) DECLSPEC_HIDDEN
;
423 void Context_Free(context_t
*) DECLSPEC_HIDDEN
;
426 * Context property list functions
429 CONTEXT_PROPERTY_LIST
*ContextPropertyList_Create(void) DECLSPEC_HIDDEN
;
431 /* Searches for the property with ID id in the context. Returns TRUE if found,
432 * and copies the property's length and a pointer to its data to blob.
433 * Otherwise returns FALSE.
435 BOOL
ContextPropertyList_FindProperty(CONTEXT_PROPERTY_LIST
*list
, DWORD id
,
436 PCRYPT_DATA_BLOB blob
) DECLSPEC_HIDDEN
;
438 BOOL
ContextPropertyList_SetProperty(CONTEXT_PROPERTY_LIST
*list
, DWORD id
,
439 const BYTE
*pbData
, size_t cbData
) DECLSPEC_HIDDEN
;
441 void ContextPropertyList_RemoveProperty(CONTEXT_PROPERTY_LIST
*list
, DWORD id
) DECLSPEC_HIDDEN
;
443 DWORD
ContextPropertyList_EnumPropIDs(CONTEXT_PROPERTY_LIST
*list
, DWORD id
) DECLSPEC_HIDDEN
;
445 void ContextPropertyList_Copy(CONTEXT_PROPERTY_LIST
*to
,
446 CONTEXT_PROPERTY_LIST
*from
) DECLSPEC_HIDDEN
;
448 void ContextPropertyList_Free(CONTEXT_PROPERTY_LIST
*list
) DECLSPEC_HIDDEN
;
450 extern WINECRYPT_CERTSTORE empty_store DECLSPEC_HIDDEN
;
451 void init_empty_store(void) DECLSPEC_HIDDEN
;
457 /* Align up to a DWORD_PTR boundary
459 #define ALIGN_DWORD_PTR(x) (((x) + sizeof(DWORD_PTR) - 1) & ~(sizeof(DWORD_PTR) - 1))
460 #define POINTER_ALIGN_DWORD_PTR(p) ((LPVOID)ALIGN_DWORD_PTR((DWORD_PTR)(p)))
462 /* Check if the OID is a small int
464 #define IS_INTOID(x) (((ULONG_PTR)(x) >> 16) == 0)
468 typedef UINT64 cert_store_data_t
;
470 struct open_cert_store_params
472 CRYPT_DATA_BLOB
*pfx
;
473 const WCHAR
*password
;
474 cert_store_data_t
*data_ret
;
477 struct import_store_key_params
479 cert_store_data_t data
;
484 struct import_store_cert_params
486 cert_store_data_t data
;
492 struct close_cert_store_params
494 cert_store_data_t data
;
497 struct enum_root_certs_params
508 unix_open_cert_store
,
509 unix_import_store_key
,
510 unix_import_store_cert
,
511 unix_close_cert_store
,
512 unix_enum_root_certs
,
515 #define CRYPT32_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )