ReactOS  0.4.14-dev-583-g2a1ba2c
crypt32_private.h
Go to the documentation of this file.
1 /*
2  * Copyright 2005 Juan Lang
3  *
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.
8  *
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.
13  *
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
17  */
18 
19 #ifndef __CRYPT32_PRIVATE_H__
20 #define __CRYPT32_PRIVATE_H__
21 
22 #include "wine/list.h"
23 
24 /* a few asn.1 tags we need */
25 #define ASN_BOOL (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x01)
26 #define ASN_BITSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x03)
27 #define ASN_ENUMERATED (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x0a)
28 #define ASN_UTF8STRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x0c)
29 #define ASN_SETOF (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x11)
30 #define ASN_NUMERICSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x12)
31 #define ASN_PRINTABLESTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x13)
32 #define ASN_T61STRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x14)
33 #define ASN_VIDEOTEXSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x15)
34 #define ASN_IA5STRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x16)
35 #define ASN_UTCTIME (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x17)
36 #define ASN_GENERALTIME (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x18)
37 #define ASN_GRAPHICSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x19)
38 #define ASN_VISIBLESTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x1a)
39 #define ASN_GENERALSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x1b)
40 #define ASN_UNIVERSALSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x1c)
41 #define ASN_BMPSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x1e)
42 
44 
45 typedef BOOL (WINAPI *CryptEncodeObjectExFunc)(DWORD, LPCSTR, const void *,
47 
49 {
50  const void *pvStructInfo;
52  DWORD size; /* used during encoding, not for your use */
53 };
54 
58 
60 {
62  const void *pvStructInfo;
64 };
65 
67  LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags,
70  LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags,
73  LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags,
75 
76 typedef struct _CRYPT_DIGESTED_DATA
77 {
83 
86 
88 {
93 
94 typedef struct _CRYPT_ENVELOPED_DATA
95 {
101 
104 
106  DWORD dwFlags, PCRYPT_DECODE_PARA pDecodePara,
107  CRYPT_ENVELOPED_DATA *envelopedData, DWORD *pcbEnvelopedData) DECLSPEC_HIDDEN;
108 
109 typedef struct _CRYPT_SIGNED_INFO
110 {
121 
124 
126  DWORD dwFlags, PCRYPT_DECODE_PARA pDecodePara,
127  CRYPT_SIGNED_INFO *signedInfo, DWORD *pcbSignedInfo) DECLSPEC_HIDDEN;
128 
129 /* Helper function to check *pcbEncoded, set it to the required size, and
130  * optionally to allocate memory. Assumes pbEncoded is not NULL.
131  * If CRYPT_ENCODE_ALLOC_FLAG is set in dwFlags, *pbEncoded will be set to a
132  * pointer to the newly allocated memory.
133  */
136 
138  DWORD dwFlags, PCRYPT_DECODE_PARA pDecodePara,
139  CRYPT_DIGESTED_DATA *digestedData, DWORD *pcbDigestedData) DECLSPEC_HIDDEN;
140 
142  LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags,
144 
145 /* The following aren't defined in wincrypt.h, as they're "reserved" */
146 #define CERT_CERT_PROP_ID 32
147 #define CERT_CRL_PROP_ID 33
148 #define CERT_CTL_PROP_ID 34
149 
150 /* Returns a handle to the default crypto provider; loads it if necessary.
151  * Returns NULL on failure.
152  */
154 
156 
162 
163 /* (Internal) certificate store types and functions */
164 struct WINE_CRYPTCERTSTORE;
165 
167 
168 typedef struct _context_t context_t;
169 
170 typedef struct {
172  struct _context_t *(*clone)(context_t*,struct WINE_CRYPTCERTSTORE*,BOOL);
174 
175 struct _context_t {
181  union {
182  struct list entry;
183  void *ptr;
184  } u;
185 };
186 
187 static inline context_t *context_from_ptr(const void *ptr)
188 {
189  return (context_t*)ptr-1;
190 }
191 
192 static inline void *context_ptr(context_t *context)
193 {
194  return context+1;
195 }
196 
197 typedef struct {
200 } cert_t;
201 
202 static inline cert_t *cert_from_ptr(const CERT_CONTEXT *ptr)
203 {
204  return CONTAINING_RECORD(ptr, cert_t, ctx);
205 }
206 
207 typedef struct {
210 } crl_t;
211 
212 static inline crl_t *crl_from_ptr(const CRL_CONTEXT *ptr)
213 {
214  return CONTAINING_RECORD(ptr, crl_t, ctx);
215 }
216 
217 typedef struct {
220 } ctl_t;
221 
222 static inline ctl_t *ctl_from_ptr(const CTL_CONTEXT *ptr)
223 {
224  return CONTAINING_RECORD(ptr, ctl_t, ctx);
225 }
226 
227 /* Some typedefs that make it easier to abstract which type of context we're
228  * working with.
229  */
231  const BYTE *pbCertEncoded, DWORD cbCertEncoded);
233  const void *context, DWORD dwAddDisposition, const void **ppStoreContext);
235  DWORD dwCertEncodingType, const BYTE *pbEncoded, DWORD cbEncoded,
236  DWORD dwAddDisposition, const void **ppContext);
237 typedef const void *(WINAPI *EnumContextsInStoreFunc)(HCERTSTORE hCertStore,
238  const void *pPrevContext);
240 typedef BOOL (WINAPI *GetContextPropertyFunc)(const void *context,
241  DWORD dwPropID, void *pvData, DWORD *pcbData);
242 typedef BOOL (WINAPI *SetContextPropertyFunc)(const void *context,
243  DWORD dwPropID, DWORD dwFlags, const void *pvData);
245  BYTE *pbElement, DWORD *pcbElement);
246 typedef BOOL (WINAPI *DeleteContextFunc)(const void *contex);
247 
248 /* An abstract context (certificate, CRL, or CTL) interface */
250 {
261 
265 
266 typedef struct WINE_CRYPTCERTSTORE * (*StoreOpenFunc)(HCRYPTPROV hCryptProv,
267  DWORD dwFlags, const void *pvPara);
268 
269 typedef struct _CONTEXT_FUNCS
270 {
271  /* Called to add a context to a store. If toReplace is not NULL,
272  * context replaces toReplace in the store, and access checks should not be
273  * performed. Otherwise context is a new context, and it should only be
274  * added if the store allows it. If ppStoreContext is not NULL, the added
275  * context should be returned in *ppStoreContext.
276  */
278  context_t *(*enumContext)(struct WINE_CRYPTCERTSTORE *store, context_t *prev);
279  BOOL (*delete)(struct WINE_CRYPTCERTSTORE*,context_t*);
280 } CONTEXT_FUNCS;
281 
282 typedef enum _CertStoreType {
287 } CertStoreType;
288 
289 #define WINE_CRYPTCERTSTORE_MAGIC 0x74726563
290 
291 /* A cert store is polymorphic through the use of function pointers. A type
292  * is still needed to distinguish collection stores from other types.
293  * On the function pointers:
294  * - closeStore is called when the store's ref count becomes 0
295  * - control is optional, but should be implemented by any store that supports
296  * persistence
297  */
298 
299 typedef struct {
300  void (*addref)(struct WINE_CRYPTCERTSTORE*);
301  DWORD (*release)(struct WINE_CRYPTCERTSTORE*,DWORD);
302  void (*releaseContext)(struct WINE_CRYPTCERTSTORE*,context_t*);
303  BOOL (*control)(struct WINE_CRYPTCERTSTORE*,DWORD,DWORD,void const*);
307 } store_vtbl_t;
308 
309 typedef struct WINE_CRYPTCERTSTORE
310 {
318 
324 
326  DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN;
328  WINECRYPT_CERTSTORE *memStore, const CERT_STORE_PROV_INFO *pProvInfo) DECLSPEC_HIDDEN;
331  const void *pvPara) DECLSPEC_HIDDEN;
333  const void *pvPara) DECLSPEC_HIDDEN;
335  const void *pvPara) DECLSPEC_HIDDEN;
337  DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN;
339  DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN;
340 
343  HCERTSTORE memStore) DECLSPEC_HIDDEN;
344 
346 
347 /* Allocates and initializes a certificate chain engine, but without creating
348  * the root store. Instead, it uses root, and assumes the caller has done any
349  * checking necessary.
350  */
352 
353 /* Helper function for store reading functions and
354  * CertAddSerializedElementToStore. Returns a context of the appropriate type
355  * if it can, or NULL otherwise. Doesn't validate any of the properties in
356  * the serialized context (for example, bad hashes are retained.)
357  * *pdwContentType is set to the type of the returned context.
358  */
359 const void *CRYPT_ReadSerializedElement(const BYTE *pbElement,
361 
362 /* Reads contexts serialized in the file into the memory store. Returns FALSE
363  * if the file is not of the expected format.
364  */
366 
367 /* Reads contexts serialized in the blob into the memory store. Returns FALSE
368  * if the file is not of the expected format.
369  */
372 
373 /* Fixes up the pointers in info, where info is assumed to be a
374  * CRYPT_KEY_PROV_INFO, followed by its container name, provider name, and any
375  * provider parameters, in a contiguous buffer, but where info's pointers are
376  * assumed to be invalid. Upon return, info's pointers point to the
377  * appropriate memory locations.
378  */
380 
387 
392 /* Allocates a new data context, a context which owns properties directly.
393  * contextSize is the size of the public data type associated with context,
394  * which should be one of CERT_CONTEXT, CRL_CONTEXT, or CTL_CONTEXT.
395  * Free with Context_Release.
396  */
398 
399 /* Creates a new link context. The context refers to linked
400  * rather than owning its own properties. If addRef is TRUE (which ordinarily
401  * it should be) linked is addref'd.
402  * Free with Context_Release.
403  */
404 context_t *Context_CreateLinkContext(unsigned contextSize, context_t *linked, struct WINE_CRYPTCERTSTORE*) DECLSPEC_HIDDEN;
405 
406 /* Copies properties from fromContext to toContext. */
407 void Context_CopyProperties(const void *to, const void *from) DECLSPEC_HIDDEN;
408 
412 
418 
419 /* Searches for the property with ID id in the context. Returns TRUE if found,
420  * and copies the property's length and a pointer to its data to blob.
421  * Otherwise returns FALSE.
422  */
425 
427  const BYTE *pbData, size_t cbData) DECLSPEC_HIDDEN;
428 
430 
432 
435 
437 
440 
445 /* Align up to a DWORD_PTR boundary
446  */
447 #define ALIGN_DWORD_PTR(x) (((x) + sizeof(DWORD_PTR) - 1) & ~(sizeof(DWORD_PTR) - 1))
448 #define POINTER_ALIGN_DWORD_PTR(p) ((LPVOID)ALIGN_DWORD_PTR((DWORD_PTR)(p)))
449 
450 /* Check if the OID is a small int
451  */
452 #define IS_INTOID(x) (((ULONG_PTR)(x) >> 16) == 0)
453 
454 #endif
CRYPT_ALGORITHM_IDENTIFIER contentEncryptionAlgorithm
void ContextPropertyList_RemoveProperty(CONTEXT_PROPERTY_LIST *list, DWORD id) DECLSPEC_HIDDEN
Definition: proplist.c:149
const WINE_CONTEXT_INTERFACE * pCRLInterface
Definition: store.c:67
CERT_CONTEXT ctx
static context_t * context_from_ptr(const void *ptr)
context_t * Context_CreateDataContext(size_t contextSize, const context_vtbl_t *vtbl, struct WINE_CRYPTCERTSTORE *) DECLSPEC_HIDDEN
Definition: context.c:28
BOOL CRYPT_AsnEncodePKCSDigestedData(const CRYPT_DIGESTED_DATA *digestedData, void *pvData, DWORD *pcbData) DECLSPEC_HIDDEN
Definition: encode.c:1952
WINECRYPT_CERTSTORE empty_store
Definition: store.c:1509
BOOL(WINAPI * AddContextToStoreFunc)(HCERTSTORE hCertStore, const void *context, DWORD dwAddDisposition, const void **ppStoreContext)
_In_ DWORD _In_ DWORD _In_ DWORD _In_ DWORD dwContextTypeFlags
Definition: wincrypt.h:5092
context_t base
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
DeleteContextFunc deleteFromStore
BOOL CRYPT_ReadSerializedStoreFromFile(HANDLE file, HCERTSTORE store) DECLSPEC_HIDDEN
Definition: serialize.c:544
static const WCHAR indent[]
Definition: object.c:1156
context_t base
void Context_AddRef(context_t *) DECLSPEC_HIDDEN
Definition: context.c:78
unsigned int ALG_ID
Definition: wincrypt.h:45
struct list entry
Definition: image.c:133
const void * pvStructInfo
Definition: http.c:7098
WINECRYPT_CERTSTORE * CRYPT_CollectionOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN
EnumPropertiesFunc enumProps
const context_vtbl_t * vtbl
WINECRYPT_CERTSTORE * CRYPT_ProvOpenStore(LPCSTR lpszStoreProvider, DWORD dwEncodingType, HCRYPTPROV hCryptProv, DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN
Definition: provstore.c:375
CTL_CONTEXT ctx
void Context_Free(context_t *) DECLSPEC_HIDDEN
Definition: context.c:90
BOOL ContextPropertyList_SetProperty(CONTEXT_PROPERTY_LIST *list, DWORD id, const BYTE *pbData, size_t cbData) DECLSPEC_HIDDEN
Definition: proplist.c:95
const WINE_CONTEXT_INTERFACE * pCTLInterface
Definition: store.c:80
BOOL ContextPropertyList_FindProperty(CONTEXT_PROPERTY_LIST *list, DWORD id, PCRYPT_DATA_BLOB blob) DECLSPEC_HIDDEN
Definition: proplist.c:72
#define free
Definition: debug_ros.c:5
void crypt_sip_free(void) DECLSPEC_HIDDEN
Definition: sip.c:610
BOOL WINAPI CRYPT_AsnEncodePubKeyInfoNoNull(DWORD dwCertEncodingType, LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded) DECLSPEC_HIDDEN
Definition: encode.c:484
static crl_t * crl_from_ptr(const CRL_CONTEXT *ptr)
_In_ PCCERT_CONTEXT _In_ DWORD dwAddDisposition
Definition: wincrypt.h:4987
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
void Context_Release(context_t *context) DECLSPEC_HIDDEN
Definition: context.c:106
struct _CRYPT_ENCODE_PARA * PCRYPT_ENCODE_PARA
context_t * Context_CreateLinkContext(unsigned contextSize, context_t *linked, struct WINE_CRYPTCERTSTORE *) DECLSPEC_HIDDEN
BOOL WINAPI CRYPT_AsnEncodeSequence(DWORD dwCertEncodingType, struct AsnEncodeSequenceItem items[], DWORD cItem, DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded) DECLSPEC_HIDDEN
Definition: encode.c:180
CRYPT_CONTENT_INFO content
void CRYPT_FreeStore(WINECRYPT_CERTSTORE *store) DECLSPEC_HIDDEN
Definition: store.c:101
void ContextPropertyList_Free(CONTEXT_PROPERTY_LIST *list) DECLSPEC_HIDDEN
Definition: proplist.c:56
union _context_t::@341 u
char * LPSTR
Definition: xmlstorage.h:182
CONTEXT_FUNCS crls
BOOL CRYPT_EncodeLen(DWORD len, BYTE *pbEncoded, DWORD *pcbEncoded) DECLSPEC_HIDDEN
Definition: encode.c:138
#define BOOL
Definition: nt_native.h:43
static void * context_ptr(context_t *context)
#define DWORD
Definition: nt_native.h:44
HINSTANCE hInstance DECLSPEC_HIDDEN
BOOL(* addContext)(struct WINE_CRYPTCERTSTORE *, context_t *, context_t *, context_t **, BOOL)
_In_ PCCERT_CONTEXT _In_ DWORD _Outptr_opt_ PCCERT_CONTEXT * ppStoreContext
Definition: wincrypt.h:4987
BOOL CRYPT_AsnDecodeCMSSignedInfo(const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags, PCRYPT_DECODE_PARA pDecodePara, CRYPT_SIGNED_INFO *signedInfo, DWORD *pcbSignedInfo) DECLSPEC_HIDDEN
Definition: decode.c:5822
struct _CRYPT_DIGESTED_DATA CRYPT_DIGESTED_DATA
static DWORD unk1
Definition: cursoricon.c:1638
HINSTANCE hInstance
Definition: charmap.c:20
void init_empty_store(void) DECLSPEC_HIDDEN
Definition: store.c:1511
CONTEXT_FUNCS ctls
BOOL CRYPT_AsnEncodeCMSSignedInfo(CRYPT_SIGNED_INFO *, void *pvData, DWORD *pcbData) DECLSPEC_HIDDEN
Definition: encode.c:4307
CRYPT_HASH_BLOB hash
SetContextPropertyFunc setProp
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL(WINAPI * SerializeElementFunc)(const void *context, DWORD dwFlags, BYTE *pbElement, DWORD *pcbElement)
long LONG
Definition: pedump.c:60
PCMSG_KEY_TRANS_RECIPIENT_INFO rgRecipientInfo
_In_ DWORD dwEncodingType
Definition: wincrypt.h:4629
void root_store_free(void) DECLSPEC_HIDDEN
BOOL WINAPI CRYPT_AsnEncodeConstructed(DWORD dwCertEncodingType, LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded) DECLSPEC_HIDDEN
Definition: encode.c:239
CONTEXT_FUNCS certs
static PVOID ptr
Definition: dispmode.c:27
AddEncodedContextToStoreFunc addEncodedToStore
WINECRYPT_CERTSTORE * CRYPT_ProvCreateStore(DWORD dwFlags, WINECRYPT_CERTSTORE *memStore, const CERT_STORE_PROV_INFO *pProvInfo) DECLSPEC_HIDDEN
Definition: provstore.c:307
_In_ DWORD _In_ DWORD cbCertEncoded
Definition: wincrypt.h:5043
void Context_CopyProperties(const void *to, const void *from) DECLSPEC_HIDDEN
Definition: context.c:123
BOOL(WINAPI * GetContextPropertyFunc)(const void *context, DWORD dwPropID, void *pvData, DWORD *pcbData)
_In_ ULONG _In_opt_ PVOID pvData
Definition: winddi.h:3748
WINECRYPT_CERTSTORE * CRYPT_FileNameOpenStoreA(HCRYPTPROV hCryptProv, DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN
Definition: filestore.c:383
static BYTE cert[]
Definition: msg.c:1437
void default_chain_engine_free(void) DECLSPEC_HIDDEN
Definition: chain.c:255
const char * LPCSTR
Definition: xmlstorage.h:183
struct WINE_CRYPTCERTSTORE WINECRYPT_CERTSTORE
CRYPT_ALGORITHM_IDENTIFIER DigestAlgorithm
struct _WINE_CONTEXT_INTERFACE WINE_CONTEXT_INTERFACE
DWORD CRYPT_IsCertificateSelfSigned(const CERT_CONTEXT *cert) DECLSPEC_HIDDEN
Definition: chain.c:268
CRYPT_ENCRYPTED_CONTENT_INFO encryptedContentInfo
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
enum _CertStoreType CertStoreType
SerializeElementFunc serialize
CRYPT_CONTENT_INFO ContentInfo
const void * CRYPT_ReadSerializedElement(const BYTE *pbElement, DWORD cbElement, DWORD dwContextTypeFlags, DWORD *pdwContentType) DECLSPEC_HIDDEN
Definition: serialize.c:295
_In_ DWORD cbElement
Definition: wincrypt.h:5092
static cert_t * cert_from_ptr(const CERT_CONTEXT *ptr)
BOOL CRYPT_AsnEncodePKCSEnvelopedData(const CRYPT_ENVELOPED_DATA *envelopedData, void *pvData, DWORD *pcbData) DECLSPEC_HIDDEN
Definition: encode.c:4418
DWORD cert_name_to_str_with_indent(DWORD dwCertEncodingType, DWORD indent, const CERT_NAME_BLOB *pName, DWORD dwStrType, LPWSTR psz, DWORD csz) DECLSPEC_HIDDEN
Definition: str.c:576
BOOL WINAPI CRYPT_AsnEncodeOid(DWORD dwCertEncodingType, LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded) DECLSPEC_HIDDEN
Definition: encode.c:820
static LPSTR pName
Definition: security.c:75
static LPCSTR DWORD dwStrType
Definition: str.c:196
CONTEXT_PROPERTY_LIST * properties
static ctl_t * ctl_from_ptr(const CTL_CONTEXT *ptr)
const store_vtbl_t * vtbl
static LPCSTR DWORD void BYTE * pbEncoded
Definition: str.c:196
HCRYPTPROV WINAPI I_CryptGetDefaultCryptProv(ALG_ID)
Definition: main.c:210
void CRYPT_FixKeyProvInfoPointers(PCRYPT_KEY_PROV_INFO info) DECLSPEC_HIDDEN
Definition: cert.c:523
#define WINAPI
Definition: msvc.h:6
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL(WINAPI * AddEncodedContextToStoreFunc)(HCERTSTORE hCertStore, DWORD dwCertEncodingType, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwAddDisposition, const void **ppContext)
BOOL CRYPT_ReadSerializedStoreFromBlob(const CRYPT_DATA_BLOB *blob, HCERTSTORE store) DECLSPEC_HIDDEN
Definition: serialize.c:578
_CertStoreType
GLbitfield flags
Definition: glext.h:7161
WINECRYPT_CERTSTORE * CRYPT_FileOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN
Definition: filestore.c:242
CreateContextFunc create
struct _CRYPT_ENCRYPTED_CONTENT_INFO CRYPT_ENCRYPTED_CONTENT_INFO
GetContextPropertyFunc getProp
BOOL CRYPT_EncodeEnsureSpace(DWORD dwFlags, const CRYPT_ENCODE_PARA *pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded, DWORD bytesNeeded) DECLSPEC_HIDDEN
Definition: encode.c:103
BOOL CRYPT_AsnDecodePKCSDigestedData(const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags, PCRYPT_DECODE_PARA pDecodePara, CRYPT_DIGESTED_DATA *digestedData, DWORD *pcbDigestedData) DECLSPEC_HIDDEN
Definition: decode.c:3371
CONTEXT_PROPERTY_LIST * properties
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
GLenum GLsizei len
Definition: glext.h:6722
unsigned char BYTE
Definition: mem.h:68
Definition: _list.h:228
BOOL WINAPI CRYPT_AsnEncodeOctets(DWORD dwCertEncodingType, LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded) DECLSPEC_HIDDEN
Definition: encode.c:3178
BOOL(WINAPI * SetContextPropertyFunc)(const void *context, DWORD dwPropID, DWORD dwFlags, const void *pvData)
_In_ DWORD dwCertEncodingType
Definition: wincrypt.h:5041
DWORD(WINAPI * EnumPropertiesFunc)(const void *context, DWORD dwPropId)
BOOL(WINAPI * CryptEncodeObjectExFunc)(DWORD, LPCSTR, const void *, DWORD, PCRYPT_ENCODE_PARA, BYTE *, DWORD *)
const void *(WINAPI * EnumContextsInStoreFunc)(HCERTSTORE hCertStore, const void *pPrevContext)
AddContextToStoreFunc addContextToStore
CONTEXT_PROPERTY_LIST * ContextPropertyList_Create(void) DECLSPEC_HIDDEN
Definition: proplist.c:43
struct _context_t * linked
WINECRYPT_CERTSTORE * CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv, DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN
Definition: filestore.c:292
ULONG_PTR HCRYPTPROV
Definition: wincrypt.h:46
static LPCSTR DWORD void BYTE DWORD * pcbEncoded
Definition: str.c:196
void CRYPT_ImportSystemRootCertsToReg(void) DECLSPEC_HIDDEN
Definition: rootstore.c:1044
EnumContextsInStoreFunc enumContextsInStore
BOOL CRYPT_AsnDecodePKCSEnvelopedData(const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags, PCRYPT_DECODE_PARA pDecodePara, CRYPT_ENVELOPED_DATA *envelopedData, DWORD *pcbEnvelopedData) DECLSPEC_HIDDEN
Definition: decode.c:5951
BOOL WINAPI I_CertUpdateStore(HCERTSTORE store1, HCERTSTORE store2, DWORD unk0, DWORD unk1) DECLSPEC_HIDDEN
Definition: store.c:109
BOOL(WINAPI * DeleteContextFunc)(const void *contex)
_In_ DWORD dwPropId
Definition: wincrypt.h:4952
const void *(WINAPI * CreateContextFunc)(DWORD dwCertEncodingType, const BYTE *pbCertEncoded, DWORD cbCertEncoded)
DWORD * PDWORD
Definition: pedump.c:68
struct _CRYPT_SIGNED_INFO CRYPT_SIGNED_INFO
WINECRYPT_CERTSTORE * CRYPT_RegOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN
Definition: regstore.c:512
CryptEncodeObjectExFunc encodeFunc
PCERT_BLOB rgCertEncoded
struct WINE_CRYPTCERTSTORE * store
void ContextPropertyList_Copy(CONTEXT_PROPERTY_LIST *to, CONTEXT_PROPERTY_LIST *from) DECLSPEC_HIDDEN
Definition: proplist.c:207
PCMSG_CMS_SIGNER_INFO rgSignerInfo
_In_ void * pvPara
Definition: wincrypt.h:6081
CryptEncodeObjectExFunc encodeFunc
WCHAR * LPWSTR
Definition: xmlstorage.h:184
CardRegion * from
Definition: spigame.cpp:19
const WINE_CONTEXT_INTERFACE * pCertInterface
Definition: store.c:54
static TCHAR * items[]
Definition: page1.c:45
const void * pvStructInfo
HCERTCHAINENGINE CRYPT_CreateChainEngine(HCERTSTORE, DWORD, const CERT_CHAIN_ENGINE_CONFIG *) DECLSPEC_HIDDEN
Definition: chain.c:115
void CRYPT_InitStore(WINECRYPT_CERTSTORE *store, DWORD dwFlags, CertStoreType type, const store_vtbl_t *) DECLSPEC_HIDDEN
Definition: store.c:91
context_t base
DWORD ContextPropertyList_EnumPropIDs(CONTEXT_PROPERTY_LIST *list, DWORD id) DECLSPEC_HIDDEN
Definition: proplist.c:170
BOOL CRYPT_SerializeContextsToReg(HKEY key, DWORD flags, const WINE_CONTEXT_INTERFACE *contextInterface, HCERTSTORE memStore) DECLSPEC_HIDDEN
Definition: regstore.c:208
void crypt_oid_init(void) DECLSPEC_HIDDEN
Definition: oid.c:1914
_In_ DWORD _Out_writes_bytes_to_opt_ pcbData void _Inout_ DWORD * pcbData
Definition: wincrypt.h:4953
struct _CRYPT_ENVELOPED_DATA CRYPT_ENVELOPED_DATA
Definition: path.c:41
void crypt_oid_free(void) DECLSPEC_HIDDEN
Definition: oid.c:1920
Definition: fci.c:126
CRL_CONTEXT ctx
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_updates_bytes_to_ pdwDataLen BYTE * pbData
Definition: wincrypt.h:4201
struct _CONTEXT_FUNCS CONTEXT_FUNCS