ReactOS 0.4.16-dev-2498-g8632030
mscat.h File Reference
#include <mssip.h>
#include <pshpack8.h>
#include <poppack.h>
Include dependency graph for mscat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CRYPTCATATTRIBUTE_
 
struct  CRYPTCATMEMBER_
 
struct  CATALOG_INFO_
 
struct  CRYPTCATCDF_
 

Macros

#define CRYPTCAT_ATTR_NAMEASCII   0x00000001
 
#define CRYPTCAT_ATTR_NAMEOBJID   0x00000002
 
#define CRYPTCAT_ATTR_DATAASCII   0x00010000
 
#define CRYPTCAT_ATTR_DATAOBJID   0x00020000
 
#define CRYPTCAT_ATTR_DATAREPLACE   0x00040000
 
#define CRYPTCAT_ATTR_NO_AUTO_COMPAT_ENTRY   0x01000000
 
#define CRYPTCAT_ATTR_AUTHENTICATED   0x10000000
 
#define CRYPTCAT_ATTR_UNAUTHENTICATED   0x20000000
 
#define CRYPTCAT_OPEN_CREATENEW   0x00000001
 
#define CRYPTCAT_OPEN_ALWAYS   0x00000002
 
#define CRYPTCAT_OPEN_EXISTING   0x00000004
 
#define CRYPTCAT_OPEN_EXCLUDE_PAGE_HASHES   0x00010000
 
#define CRYPTCAT_OPEN_INCLUDE_PAGE_HASHES   0x00020000
 
#define CRYPTCAT_OPEN_VERIFYSIGHASH   0x10000000
 
#define CRYPTCAT_OPEN_NO_CONTENT_HCRYPTMSG   0x20000000
 
#define CRYPTCAT_OPEN_SORTED   0x40000000
 
#define CRYPTCAT_OPEN_FLAGS_MASK   0xffff0000
 
#define CRYPTCAT_E_AREA_HEADER   0x00000000
 
#define CRYPTCAT_E_AREA_MEMBER   0x00010000
 
#define CRYPTCAT_E_AREA_ATTRIBUTE   0x00020000
 
#define CRYPTCAT_E_CDF_UNSUPPORTED   0x00000001
 
#define CRYPTCAT_E_CDF_DUPLICATE   0x00000002
 
#define CRYPTCAT_E_CDF_TAGNOTFOUND   0x00000004
 
#define CRYPTCAT_E_CDF_MEMBER_FILE_PATH   0x00010001
 
#define CRYPTCAT_E_CDF_MEMBER_INDIRECTDATA   0x00010002
 
#define CRYPTCAT_E_CDF_MEMBER_FILENOTFOUND   0x00010004
 
#define CRYPTCAT_E_CDF_BAD_GUID_CONV   0x00020001
 
#define CRYPTCAT_E_CDF_ATTR_TOOFEWVALUES   0x00020002
 
#define CRYPTCAT_E_CDF_ATTR_TYPECOMBO   0x00020004
 
#define CRYPTCAT_VERSION_1   0x100
 
#define CRYPTCAT_VERSION_2   0x200
 

Typedefs

typedef HANDLE HCATADMIN
 
typedef HANDLE HCATINFO
 
typedef struct CRYPTCATATTRIBUTE_ CRYPTCATATTRIBUTE
 
typedef struct CRYPTCATMEMBER_ CRYPTCATMEMBER
 
typedef struct CATALOG_INFO_ CATALOG_INFO
 
typedef struct CRYPTCATCDF_ CRYPTCATCDF
 
typedef void(WINAPIPFN_CDF_PARSE_ERROR_CALLBACK) (DWORD, DWORD, WCHAR *)
 

Functions

BOOL WINAPI CryptCATAdminAcquireContext (HCATADMIN *, const GUID *, DWORD)
 
BOOL WINAPI CryptCATAdminAcquireContext2 (HCATADMIN *, const GUID *, const WCHAR *, const CERT_STRONG_SIGN_PARA *, DWORD)
 
HCATINFO WINAPI CryptCATAdminAddCatalog (HCATADMIN, PWSTR, PWSTR, DWORD)
 
BOOL WINAPI CryptCATAdminCalcHashFromFileHandle (HANDLE, DWORD *, BYTE *, DWORD)
 
BOOL WINAPI CryptCATAdminCalcHashFromFileHandle2 (HCATADMIN, HANDLE, DWORD *, BYTE *, DWORD)
 
HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash (HCATADMIN, BYTE *, DWORD, DWORD, HCATINFO *)
 
BOOL WINAPI CryptCATAdminReleaseCatalogContext (HCATADMIN, HCATINFO, DWORD)
 
BOOL WINAPI CryptCATAdminReleaseContext (HCATADMIN, DWORD)
 
BOOL WINAPI CryptCATAdminRemoveCatalog (HCATADMIN, LPCWSTR, DWORD)
 
BOOL WINAPI CryptCATAdminResolveCatalogPath (HCATADMIN, WCHAR *, CATALOG_INFO *, DWORD)
 
BOOL WINAPI CryptCATCatalogInfoFromContext (HCATINFO, CATALOG_INFO *, DWORD)
 
BOOL WINAPI CryptCATCDFClose (CRYPTCATCDF *)
 
CRYPTCATATTRIBUTE *WINAPI CryptCATCDFEnumCatAttributes (CRYPTCATCDF *, CRYPTCATATTRIBUTE *, PFN_CDF_PARSE_ERROR_CALLBACK)
 
LPWSTR WINAPI CryptCATCDFEnumMembersByCDFTagEx (CRYPTCATCDF *, LPWSTR, PFN_CDF_PARSE_ERROR_CALLBACK, CRYPTCATMEMBER **, BOOL, LPVOID)
 
CRYPTCATCDF *WINAPI CryptCATCDFOpen (LPWSTR, PFN_CDF_PARSE_ERROR_CALLBACK)
 
BOOL WINAPI CryptCATClose (HANDLE)
 
CRYPTCATATTRIBUTE *WINAPI CryptCATEnumerateAttr (HANDLE, CRYPTCATMEMBER *, CRYPTCATATTRIBUTE *)
 
CRYPTCATATTRIBUTE *WINAPI CryptCATEnumerateCatAttr (HANDLE, CRYPTCATATTRIBUTE *)
 
CRYPTCATMEMBER *WINAPI CryptCATEnumerateMember (HANDLE, CRYPTCATMEMBER *)
 
CRYPTCATATTRIBUTE *WINAPI CryptCATGetAttrInfo (HANDLE, CRYPTCATMEMBER *, LPWSTR)
 
CRYPTCATATTRIBUTE *WINAPI CryptCATGetCatAttrInfo (HANDLE, LPWSTR)
 
CRYPTCATMEMBER *WINAPI CryptCATGetMemberInfo (HANDLE, LPWSTR)
 
HANDLE WINAPI CryptCATOpen (LPWSTR, DWORD, HCRYPTPROV, DWORD, DWORD)
 
BOOL WINAPI CryptCATPersistStore (HANDLE catalog)
 
CRYPTCATATTRIBUTE *WINAPI CryptCATPutAttrInfo (HANDLE catalog, CRYPTCATMEMBER *member, WCHAR *name, DWORD flags, DWORD size, BYTE *data)
 
CRYPTCATATTRIBUTE *WINAPI CryptCATPutCatAttrInfo (HANDLE catalog, WCHAR *name, DWORD flags, DWORD size, BYTE *data)
 
CRYPTCATMEMBER *WINAPI CryptCATPutMemberInfo (HANDLE catalog, WCHAR *filename, WCHAR *member, GUID *subject, DWORD version, DWORD size, BYTE *data)
 

Macro Definition Documentation

◆ CRYPTCAT_ATTR_AUTHENTICATED

#define CRYPTCAT_ATTR_AUTHENTICATED   0x10000000

Definition at line 37 of file mscat.h.

◆ CRYPTCAT_ATTR_DATAASCII

#define CRYPTCAT_ATTR_DATAASCII   0x00010000

Definition at line 33 of file mscat.h.

◆ CRYPTCAT_ATTR_DATAOBJID

#define CRYPTCAT_ATTR_DATAOBJID   0x00020000

Definition at line 34 of file mscat.h.

◆ CRYPTCAT_ATTR_DATAREPLACE

#define CRYPTCAT_ATTR_DATAREPLACE   0x00040000

Definition at line 35 of file mscat.h.

◆ CRYPTCAT_ATTR_NAMEASCII

#define CRYPTCAT_ATTR_NAMEASCII   0x00000001

Definition at line 31 of file mscat.h.

◆ CRYPTCAT_ATTR_NAMEOBJID

#define CRYPTCAT_ATTR_NAMEOBJID   0x00000002

Definition at line 32 of file mscat.h.

◆ CRYPTCAT_ATTR_NO_AUTO_COMPAT_ENTRY

#define CRYPTCAT_ATTR_NO_AUTO_COMPAT_ENTRY   0x01000000

Definition at line 36 of file mscat.h.

◆ CRYPTCAT_ATTR_UNAUTHENTICATED

#define CRYPTCAT_ATTR_UNAUTHENTICATED   0x20000000

Definition at line 38 of file mscat.h.

◆ CRYPTCAT_E_AREA_ATTRIBUTE

#define CRYPTCAT_E_AREA_ATTRIBUTE   0x00020000

Definition at line 52 of file mscat.h.

◆ CRYPTCAT_E_AREA_HEADER

#define CRYPTCAT_E_AREA_HEADER   0x00000000

Definition at line 50 of file mscat.h.

◆ CRYPTCAT_E_AREA_MEMBER

#define CRYPTCAT_E_AREA_MEMBER   0x00010000

Definition at line 51 of file mscat.h.

◆ CRYPTCAT_E_CDF_ATTR_TOOFEWVALUES

#define CRYPTCAT_E_CDF_ATTR_TOOFEWVALUES   0x00020002

Definition at line 63 of file mscat.h.

◆ CRYPTCAT_E_CDF_ATTR_TYPECOMBO

#define CRYPTCAT_E_CDF_ATTR_TYPECOMBO   0x00020004

Definition at line 64 of file mscat.h.

◆ CRYPTCAT_E_CDF_BAD_GUID_CONV

#define CRYPTCAT_E_CDF_BAD_GUID_CONV   0x00020001

Definition at line 62 of file mscat.h.

◆ CRYPTCAT_E_CDF_DUPLICATE

#define CRYPTCAT_E_CDF_DUPLICATE   0x00000002

Definition at line 55 of file mscat.h.

◆ CRYPTCAT_E_CDF_MEMBER_FILE_PATH

#define CRYPTCAT_E_CDF_MEMBER_FILE_PATH   0x00010001

Definition at line 58 of file mscat.h.

◆ CRYPTCAT_E_CDF_MEMBER_FILENOTFOUND

#define CRYPTCAT_E_CDF_MEMBER_FILENOTFOUND   0x00010004

Definition at line 60 of file mscat.h.

◆ CRYPTCAT_E_CDF_MEMBER_INDIRECTDATA

#define CRYPTCAT_E_CDF_MEMBER_INDIRECTDATA   0x00010002

Definition at line 59 of file mscat.h.

◆ CRYPTCAT_E_CDF_TAGNOTFOUND

#define CRYPTCAT_E_CDF_TAGNOTFOUND   0x00000004

Definition at line 56 of file mscat.h.

◆ CRYPTCAT_E_CDF_UNSUPPORTED

#define CRYPTCAT_E_CDF_UNSUPPORTED   0x00000001

Definition at line 54 of file mscat.h.

◆ CRYPTCAT_OPEN_ALWAYS

#define CRYPTCAT_OPEN_ALWAYS   0x00000002

Definition at line 41 of file mscat.h.

◆ CRYPTCAT_OPEN_CREATENEW

#define CRYPTCAT_OPEN_CREATENEW   0x00000001

Definition at line 40 of file mscat.h.

◆ CRYPTCAT_OPEN_EXCLUDE_PAGE_HASHES

#define CRYPTCAT_OPEN_EXCLUDE_PAGE_HASHES   0x00010000

Definition at line 43 of file mscat.h.

◆ CRYPTCAT_OPEN_EXISTING

#define CRYPTCAT_OPEN_EXISTING   0x00000004

Definition at line 42 of file mscat.h.

◆ CRYPTCAT_OPEN_FLAGS_MASK

#define CRYPTCAT_OPEN_FLAGS_MASK   0xffff0000

Definition at line 48 of file mscat.h.

◆ CRYPTCAT_OPEN_INCLUDE_PAGE_HASHES

#define CRYPTCAT_OPEN_INCLUDE_PAGE_HASHES   0x00020000

Definition at line 44 of file mscat.h.

◆ CRYPTCAT_OPEN_NO_CONTENT_HCRYPTMSG

#define CRYPTCAT_OPEN_NO_CONTENT_HCRYPTMSG   0x20000000

Definition at line 46 of file mscat.h.

◆ CRYPTCAT_OPEN_SORTED

#define CRYPTCAT_OPEN_SORTED   0x40000000

Definition at line 47 of file mscat.h.

◆ CRYPTCAT_OPEN_VERIFYSIGHASH

#define CRYPTCAT_OPEN_VERIFYSIGHASH   0x10000000

Definition at line 45 of file mscat.h.

◆ CRYPTCAT_VERSION_1

#define CRYPTCAT_VERSION_1   0x100

Definition at line 66 of file mscat.h.

◆ CRYPTCAT_VERSION_2

#define CRYPTCAT_VERSION_2   0x200

Definition at line 67 of file mscat.h.

Typedef Documentation

◆ CATALOG_INFO

◆ CRYPTCATATTRIBUTE

◆ CRYPTCATCDF

◆ CRYPTCATMEMBER

◆ HCATADMIN

typedef HANDLE HCATADMIN

Definition at line 24 of file mscat.h.

◆ HCATINFO

typedef HANDLE HCATINFO

Definition at line 25 of file mscat.h.

◆ PFN_CDF_PARSE_ERROR_CALLBACK

typedef void(WINAPI * PFN_CDF_PARSE_ERROR_CALLBACK) (DWORD, DWORD, WCHAR *)

Definition at line 115 of file mscat.h.

Function Documentation

◆ CryptCATAdminAcquireContext()

BOOL WINAPI CryptCATAdminAcquireContext ( HCATADMIN catAdmin,
const GUID sys,
DWORD  dwFlags 
)

Definition at line 101 of file crypt.c.

103{
104 TRACE("%p %s %lx\n", catAdmin, debugstr_guid(sys), dwFlags);
105 return CryptCATAdminAcquireContext2(catAdmin, sys, NULL, NULL, dwFlags);
106}
#define NULL
Definition: types.h:112
BOOL WINAPI CryptCATAdminAcquireContext2(HCATADMIN *catAdmin, const GUID *sys, const WCHAR *algorithm, const CERT_STRONG_SIGN_PARA *policy, DWORD dwFlags)
Definition: crypt.c:124
#define debugstr_guid
Definition: kernel32.h:35
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by InitFunctionPtrs(), and pSetupInstallCatalog().

◆ CryptCATAdminAcquireContext2()

BOOL WINAPI CryptCATAdminAcquireContext2 ( HCATADMIN catAdmin,
const GUID sys,
const WCHAR algorithm,
const CERT_STRONG_SIGN_PARA policy,
DWORD  dwFlags 
)

Definition at line 124 of file crypt.c.

126{
127 static const WCHAR catroot[] =
128 {'\\','c','a','t','r','o','o','t',0};
129 static const WCHAR fmt[] =
130 {'%','s','\\','{','%','0','8','x','-','%','0','4','x','-','%','0',
131 '4','x','-','%','0','2','x','%','0','2','x','-','%','0','2','x',
132 '%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x',
133 '%','0','2','x','}',0};
134 static const GUID defsys =
135 {0x127d0a1d,0x4ef2,0x11d1,{0x86,0x08,0x00,0xc0,0x4f,0xc2,0x95,0xee}};
136
137 WCHAR catroot_dir[MAX_PATH];
138 struct catadmin *ca;
139 ALG_ID alg;
140 const WCHAR *providerName;
142
143 TRACE("%p %s %s %p %lx\n", catAdmin, debugstr_guid(sys), debugstr_w(algorithm), policy, dwFlags);
144
145 if (!catAdmin || dwFlags)
146 {
148 return FALSE;
149 }
150
151 if (policy != NULL)
152 FIXME("strong policy parameter is unimplemented\n");
153
155 {
156 alg = CALG_SHA1;
159 }
161 {
165 }
166 else
167 {
169 return FALSE;
170 }
171
172 if (!(ca = malloc(sizeof(*ca))))
173 {
175 return FALSE;
176 }
177
178 ca->alg = alg;
179 ca->providerName = providerName;
180 ca->providerType = providerType;
181
182 GetSystemDirectoryW(catroot_dir, MAX_PATH);
183 lstrcatW(catroot_dir, catroot);
184
185 /* create the directory if it doesn't exist */
186 CreateDirectoryW(catroot_dir, NULL);
187
188 if (!sys) sys = &defsys;
189 swprintf(ca->path, ARRAY_SIZE(ca->path), fmt, catroot_dir, sys->Data1, sys->Data2,
190 sys->Data3, sys->Data4[0], sys->Data4[1], sys->Data4[2],
191 sys->Data4[3], sys->Data4[4], sys->Data4[5], sys->Data4[6],
192 sys->Data4[7]);
193
194 /* create the directory if it doesn't exist */
195 CreateDirectoryW(ca->path, NULL);
196
197 ca->magic = CATADMIN_MAGIC;
198 ca->find = INVALID_HANDLE_VALUE;
199
200 *catAdmin = ca;
201 return TRUE;
202}
WINBASEAPI _Check_return_ _Out_ AppPolicyProcessTerminationMethod * policy
Definition: appmodel.h:73
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define BCRYPT_SHA256_ALGORITHM
Definition: bcrypt.h:75
#define BCRYPT_SHA1_ALGORITHM
Definition: bcrypt.h:74
#define malloc
Definition: debug_ros.c:4
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static const WCHAR ca[]
Definition: main.c:457
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define MAX_PATH
Definition: compat.h:34
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:58
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2232
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:1972
#define swprintf
Definition: precomp.h:40
#define CATADMIN_MAGIC
Definition: crypt.c:40
unsigned long DWORD
Definition: ntddk_ex.h:95
#define debugstr_w
Definition: kernel32.h:32
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
static CHAR catroot[MAX_PATH]
Definition: crypt.c:33
Definition: crypt.c:57
ALG_ID alg
Definition: crypt.c:61
Definition: dsound.c:943
#define PROV_RSA_FULL
Definition: wincrypt.h:2243
#define CALG_SHA1
Definition: wincrypt.h:2060
#define PROV_RSA_AES
Definition: wincrypt.h:2260
unsigned int ALG_ID
Definition: wincrypt.h:54
#define CALG_SHA_256
Definition: wincrypt.h:2066
static const WCHAR MS_DEF_PROV_W[]
Definition: wincrypt.h:2119
static const WCHAR MS_ENH_RSA_AES_PROV_W[]
Definition: wincrypt.h:2221
#define NTE_BAD_ALGID
Definition: winerror.h:4255
static const WCHAR providerName[]
Definition: wnet.c:1544
static const WCHAR providerType[]
Definition: wnet.c:2155
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by CryptCATAdminAcquireContext(), and InitFunctionPtrs().

◆ CryptCATAdminAddCatalog()

HCATINFO WINAPI CryptCATAdminAddCatalog ( HCATADMIN  catAdmin,
PWSTR  catalogFile,
PWSTR  selectBaseName,
DWORD  flags 
)

Definition at line 207 of file crypt.c.

209{
210 static const WCHAR slashW[] = {'\\',0};
211 struct catadmin *ca = catAdmin;
212 struct catinfo *ci;
213 WCHAR *target;
214 DWORD len;
215
216 TRACE("%p %s %s %ld\n", catAdmin, debugstr_w(catalogFile),
217 debugstr_w(selectBaseName), flags);
218
219 if (!selectBaseName)
220 {
221 FIXME("NULL basename not handled\n");
223 return NULL;
224 }
225 if (!ca || ca->magic != CATADMIN_MAGIC || !catalogFile || flags)
226 {
228 return NULL;
229 }
230
231 len = lstrlenW(ca->path) + lstrlenW(selectBaseName) + 2;
232 if (!(target = malloc(len * sizeof(WCHAR))))
233 {
235 return NULL;
236 }
237 lstrcpyW(target, ca->path);
239 lstrcatW(target, selectBaseName);
240
241 if (!CopyFileW(catalogFile, target, FALSE))
242 {
243 free(target);
244 return NULL;
245 }
247
248 if (!(ci = malloc(sizeof(*ci))))
249 {
250 free(target);
252 return NULL;
253 }
254 ci->magic = CATINFO_MAGIC;
255 lstrcpyW(ci->file, target);
256
257 free(target);
258 return ci;
259}
#define free
Definition: debug_ros.c:5
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
Definition: copy.c:365
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
Definition: fileinfo.c:778
static const WCHAR slashW[]
Definition: devenum.c:59
#define CATINFO_MAGIC
Definition: crypt.c:42
GLbitfield flags
Definition: glext.h:7161
GLenum GLsizei len
Definition: glext.h:6722
#define FILE_ATTRIBUTE_SYSTEM
Definition: nt_native.h:704
Definition: crypt.c:67
DWORD magic
Definition: crypt.c:68
WCHAR file[MAX_PATH]
Definition: crypt.c:69
Definition: tools.h:99

Referenced by InitFunctionPtrs(), and pSetupInstallCatalog().

◆ CryptCATAdminCalcHashFromFileHandle()

BOOL WINAPI CryptCATAdminCalcHashFromFileHandle ( HANDLE  hFile,
DWORD pcbHash,
BYTE pbHash,
DWORD  dwFlags 
)

Definition at line 424 of file crypt.c.

425{
426 TRACE("%p %p %p %lx\n", hFile, pcbHash, pbHash, dwFlags);
427 return catadmin_calc_hash_from_filehandle(NULL, hFile, pcbHash, pbHash, dwFlags);
428}
static BOOL catadmin_calc_hash_from_filehandle(HCATADMIN catAdmin, HANDLE hFile, DWORD *pcbHash, BYTE *pbHash, DWORD dwFlags)
Definition: crypt.c:335
_In_ HANDLE hFile
Definition: mswsock.h:90

Referenced by InitFunctionPtrs().

◆ CryptCATAdminCalcHashFromFileHandle2()

BOOL WINAPI CryptCATAdminCalcHashFromFileHandle2 ( HCATADMIN  catAdmin,
HANDLE  hFile,
DWORD pcbHash,
BYTE pbHash,
DWORD  dwFlags 
)

Definition at line 448 of file crypt.c.

450{
451 TRACE("%p %p %p %p %lx\n", catAdmin, hFile, pcbHash, pbHash, dwFlags);
452
453 if (!catAdmin || ((struct catadmin *)catAdmin)->magic != CATADMIN_MAGIC)
454 {
456 return FALSE;
457 }
458
459 return catadmin_calc_hash_from_filehandle(catAdmin, hFile, pcbHash, pbHash, dwFlags);
460}

Referenced by InitFunctionPtrs().

◆ CryptCATAdminEnumCatalogFromHash()

HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash ( HCATADMIN  hCatAdmin,
BYTE pbHash,
DWORD  cbHash,
DWORD  dwFlags,
HCATINFO phPrevCatInfo 
)

Definition at line 466 of file crypt.c.

469{
470 static const WCHAR slashW[] = {'\\',0};
471 static const WCHAR globW[] = {'\\','*','.','c','a','t',0};
472
473 struct catadmin *ca = hCatAdmin;
475 HCATINFO prev = NULL;
476 HCRYPTPROV prov;
477 DWORD size;
478 BOOL ret;
479
480 TRACE("%p %p %ld %lx %p\n", hCatAdmin, pbHash, cbHash, dwFlags, phPrevCatInfo);
481
482 if (!ca || ca->magic != CATADMIN_MAGIC || !pbHash || cbHash != 20 || dwFlags)
483 {
485 return NULL;
486 }
487 if (phPrevCatInfo) prev = *phPrevCatInfo;
488
490 if (!ret) return NULL;
491
492 if (!prev)
493 {
494 WCHAR *path;
495
496 size = lstrlenW(ca->path) * sizeof(WCHAR) + sizeof(globW);
497 if (!(path = malloc(size)))
498 {
499 CryptReleaseContext(prov, 0);
501 return NULL;
502 }
503 lstrcpyW(path, ca->path);
504 lstrcatW(path, globW);
505
506 FindClose(ca->find);
507 ca->find = FindFirstFileW(path, &data);
508
509 free(path);
510 if (ca->find == INVALID_HANDLE_VALUE)
511 {
512 CryptReleaseContext(prov, 0);
513 return NULL;
514 }
515 }
516 else if (!FindNextFileW(ca->find, &data))
517 {
518 CryptCATAdminReleaseCatalogContext(hCatAdmin, prev, 0);
519 CryptReleaseContext(prov, 0);
520 return NULL;
521 }
522
523 while (1)
524 {
527 struct catinfo *ci;
528 HANDLE hcat;
529
530 size = (lstrlenW(ca->path) + lstrlenW(data.cFileName) + 2) * sizeof(WCHAR);
531 if (!(filename = malloc(size)))
532 {
534 return NULL;
535 }
536 lstrcpyW(filename, ca->path);
538 lstrcatW(filename, data.cFileName);
539
540 hcat = CryptCATOpen(filename, CRYPTCAT_OPEN_EXISTING, prov, 0, 0);
541 if (hcat == INVALID_HANDLE_VALUE)
542 {
543 WARN("couldn't open %s (%lu)\n", debugstr_w(filename), GetLastError());
544 continue;
545 }
546 while ((member = CryptCATEnumerateMember(hcat, member)))
547 {
548 if (member->pIndirectData->Digest.cbData != cbHash)
549 {
550 WARN("amount of hash bytes differs: %lu/%lu\n", member->pIndirectData->Digest.cbData, cbHash);
551 continue;
552 }
553 if (!memcmp(member->pIndirectData->Digest.pbData, pbHash, cbHash))
554 {
555 TRACE("file %s matches\n", debugstr_w(data.cFileName));
556
557 CryptCATClose(hcat);
558 CryptReleaseContext(prov, 0);
559 if (!phPrevCatInfo)
560 {
561 FindClose(ca->find);
562 ca->find = INVALID_HANDLE_VALUE;
563 }
565 free(filename);
566 return ci;
567 }
568 }
569 CryptCATClose(hcat);
570 free(filename);
571
572 if (!FindNextFileW(ca->find, &data))
573 {
574 FindClose(ca->find);
575 ca->find = INVALID_HANDLE_VALUE;
576 CryptReleaseContext(prov, 0);
577 return NULL;
578 }
579 }
580 return NULL;
581}
#define WARN(fmt,...)
Definition: precomp.h:61
BOOL WINAPI CryptReleaseContext(HCRYPTPROV hProv, DWORD dwFlags)
Definition: crypt.c:661
BOOL WINAPI CryptAcquireContextW(HCRYPTPROV *phProv, LPCWSTR pszContainer, LPCWSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
Definition: crypt.c:358
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2802
static HCATINFO create_catinfo(const WCHAR *filename)
Definition: crypt.c:72
BOOL WINAPI CryptCATClose(HANDLE hCatalog)
Definition: crypt.c:730
CRYPTCATMEMBER *WINAPI CryptCATEnumerateMember(HANDLE hCatalog, CRYPTCATMEMBER *prev)
Definition: crypt.c:841
BOOL WINAPI CryptCATAdminReleaseCatalogContext(HCATADMIN hCatAdmin, HCATINFO hCatInfo, DWORD dwFlags)
Definition: crypt.c:598
HANDLE WINAPI CryptCATOpen(WCHAR *filename, DWORD flags, HCRYPTPROV hProv, DWORD dwPublicVersion, DWORD dwEncodingType)
Definition: crypt.c:1092
return ret
Definition: mutex.c:146
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
const char * filename
Definition: ioapi.h:137
#define CRYPTCAT_OPEN_EXISTING
Definition: mscat.h:42
WCHAR path[MAX_PATH]
Definition: crypt.c:59
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define CRYPT_VERIFYCONTEXT
Definition: wincrypt.h:2273
ULONG_PTR HCRYPTPROV
Definition: wincrypt.h:55

◆ CryptCATAdminReleaseCatalogContext()

BOOL WINAPI CryptCATAdminReleaseCatalogContext ( HCATADMIN  hCatAdmin,
HCATINFO  hCatInfo,
DWORD  dwFlags 
)

Definition at line 598 of file crypt.c.

601{
602 struct catinfo *ci = hCatInfo;
603 struct catadmin *ca = hCatAdmin;
604
605 TRACE("%p %p %lx\n", hCatAdmin, hCatInfo, dwFlags);
606
607 if (!ca || ca->magic != CATADMIN_MAGIC || !ci || ci->magic != CATINFO_MAGIC)
608 {
610 return FALSE;
611 }
612 /* Ensure compiler doesn't optimize out the assignment with 0. */
613 SecureZeroMemory(&ci->magic, sizeof(ci->magic));
614 free(ci);
615 return TRUE;
616}
#define SecureZeroMemory
Definition: winbase.h:1465

Referenced by CryptCATAdminEnumCatalogFromHash(), InitFunctionPtrs(), and pSetupInstallCatalog().

◆ CryptCATAdminReleaseContext()

BOOL WINAPI CryptCATAdminReleaseContext ( HCATADMIN  hCatAdmin,
DWORD  dwFlags 
)

Definition at line 632 of file crypt.c.

633{
634 struct catadmin *ca = hCatAdmin;
635
636 TRACE("%p %lx\n", hCatAdmin, dwFlags);
637
638 if (!ca || ca->magic != CATADMIN_MAGIC)
639 {
641 return FALSE;
642 }
643 if (ca->find != INVALID_HANDLE_VALUE) FindClose(ca->find);
644 /* Ensure compiler doesn't optimize out the assignment with 0. */
645 SecureZeroMemory(&ca->magic, sizeof(ca->magic));
646 free(ca);
647 return TRUE;
648}

Referenced by InitFunctionPtrs(), and pSetupInstallCatalog().

◆ CryptCATAdminRemoveCatalog()

BOOL WINAPI CryptCATAdminRemoveCatalog ( HCATADMIN  hCatAdmin,
LPCWSTR  pwszCatalogFile,
DWORD  dwFlags 
)

Definition at line 665 of file crypt.c.

666{
667 struct catadmin *ca = hCatAdmin;
668
669 TRACE("%p %s %lx\n", hCatAdmin, debugstr_w(pwszCatalogFile), dwFlags);
670
671 if (!ca || ca->magic != CATADMIN_MAGIC)
672 {
674 return FALSE;
675 }
676
677 /* Only delete when there is a filename and no path */
678 if (pwszCatalogFile && pwszCatalogFile[0] != 0 &&
679 !wcschr(pwszCatalogFile, '\\') && !wcschr(pwszCatalogFile, '/') &&
680 !wcschr(pwszCatalogFile, ':'))
681 {
682 static const WCHAR slashW[] = {'\\',0};
683 WCHAR *target;
684 DWORD len;
685
686 len = lstrlenW(ca->path) + lstrlenW(pwszCatalogFile) + 2;
687 if (!(target = malloc(len * sizeof(WCHAR))))
688 {
690 return FALSE;
691 }
692 lstrcpyW(target, ca->path);
694 lstrcatW(target, pwszCatalogFile);
695
697
698 free(target);
699 }
700
701 return TRUE;
702}
#define wcschr
Definition: compat.h:17
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39

Referenced by InitFunctionPtrs().

◆ CryptCATAdminResolveCatalogPath()

BOOL WINAPI CryptCATAdminResolveCatalogPath ( HCATADMIN  hcatadmin,
WCHAR catalog_file,
CATALOG_INFO info,
DWORD  flags 
)

Definition at line 707 of file crypt.c.

709{
710 static const WCHAR slashW[] = {'\\',0};
711 struct catadmin *ca = hcatadmin;
712
713 TRACE("%p %s %p %lx\n", hcatadmin, debugstr_w(catalog_file), info, flags);
714
715 if (!ca || ca->magic != CATADMIN_MAGIC || !info || info->cbStruct != sizeof(*info) || flags)
716 {
718 return FALSE;
719 }
720 lstrcpyW(info->wszCatalogFile, ca->path);
721 lstrcatW(info->wszCatalogFile, slashW);
722 lstrcatW(info->wszCatalogFile, catalog_file);
723
724 return TRUE;
725}

◆ CryptCATCatalogInfoFromContext()

BOOL WINAPI CryptCATCatalogInfoFromContext ( HCATINFO  hcatinfo,
CATALOG_INFO info,
DWORD  flags 
)

Definition at line 1023 of file crypt.c.

1024{
1025 struct catinfo *ci = hcatinfo;
1026
1027 TRACE("%p, %p, %lx\n", hcatinfo, info, flags);
1028
1029 if (!hcatinfo || hcatinfo == INVALID_HANDLE_VALUE || ci->magic != CATINFO_MAGIC ||
1030 flags || !info || info->cbStruct != sizeof(*info))
1031 {
1033 return FALSE;
1034 }
1035 lstrcpyW(info->wszCatalogFile, ci->file);
1036 return TRUE;
1037}

Referenced by InitFunctionPtrs().

◆ CryptCATCDFClose()

BOOL WINAPI CryptCATCDFClose ( CRYPTCATCDF pCDF)

Definition at line 1234 of file crypt.c.

1235{
1236 FIXME("(%p) stub\n", pCDF);
1237
1238 return FALSE;
1239}

Referenced by InitFunctionPtrs().

◆ CryptCATCDFEnumCatAttributes()

CRYPTCATATTRIBUTE *WINAPI CryptCATCDFEnumCatAttributes ( CRYPTCATCDF pCDF,
CRYPTCATATTRIBUTE pPrevAttr,
PFN_CDF_PARSE_ERROR_CALLBACK  pfnParseError 
)

Definition at line 1244 of file crypt.c.

1247{
1248 FIXME("(%p %p %p) stub\n", pCDF, pPrevAttr, pfnParseError);
1249
1250 return NULL;
1251}

Referenced by InitFunctionPtrs().

◆ CryptCATCDFEnumMembersByCDFTagEx()

LPWSTR WINAPI CryptCATCDFEnumMembersByCDFTagEx ( CRYPTCATCDF pCDF,
LPWSTR  pwszPrevCDFTag,
PFN_CDF_PARSE_ERROR_CALLBACK  pfnParseError,
CRYPTCATMEMBER **  ppMember,
BOOL  fContinueOnError,
LPVOID  pvReserved 
)

Definition at line 1256 of file crypt.c.

1260{
1261 FIXME("(%p %s %p %p %d %p) stub\n", pCDF, debugstr_w(pwszPrevCDFTag), pfnParseError,
1262 ppMember, fContinueOnError, pvReserved);
1263
1264 return NULL;
1265}
static LPCWSTR LPVOID pvReserved
Definition: asmcache.c:749

Referenced by InitFunctionPtrs().

◆ CryptCATCDFOpen()

CRYPTCATCDF *WINAPI CryptCATCDFOpen ( LPWSTR  pwszFilePath,
PFN_CDF_PARSE_ERROR_CALLBACK  pfnParseError 
)

Definition at line 1270 of file crypt.c.

1272{
1273 FIXME("(%s %p) stub\n", debugstr_w(pwszFilePath), pfnParseError);
1274
1275 return NULL;
1276}

Referenced by InitFunctionPtrs().

◆ CryptCATClose()

BOOL WINAPI CryptCATClose ( HANDLE  hCatalog)

Definition at line 730 of file crypt.c.

731{
732 struct cryptcat *cc = hCatalog;
733
734 TRACE("(%p)\n", hCatalog);
735
736 if (!hCatalog || hCatalog == INVALID_HANDLE_VALUE || cc->magic != CRYPTCAT_MAGIC)
737 {
739 return FALSE;
740 }
741 free(cc->attr);
742 free(cc->inner);
743 CryptMsgClose(cc->msg);
744
745 /* Ensure compiler doesn't optimize out the assignment with 0. */
746 SecureZeroMemory(&cc->magic, sizeof(cc->magic));
747 free(cc);
748 return TRUE;
749}
BOOL WINAPI CryptMsgClose(HCRYPTMSG hCryptMsg)
Definition: msg.c:3597
#define CRYPTCAT_MAGIC
Definition: crypt.c:41
uint32_t cc
Definition: isohybrid.c:75
Definition: crypt.c:45

Referenced by CryptCATAdminEnumCatalogFromHash(), and InitFunctionPtrs().

◆ CryptCATEnumerateAttr()

CRYPTCATATTRIBUTE *WINAPI CryptCATEnumerateAttr ( HANDLE  hCatalog,
CRYPTCATMEMBER member,
CRYPTCATATTRIBUTE prev 
)

Definition at line 805 of file crypt.c.

806{
807 struct cryptcat *cc = hCatalog;
808
809 FIXME("%p, %p, %p\n", hCatalog, member, prev);
810
811 if (!hCatalog || hCatalog == INVALID_HANDLE_VALUE || cc->magic != CRYPTCAT_MAGIC)
812 {
814 return NULL;
815 }
817 return NULL;
818}
#define CRYPT_E_NOT_FOUND
Definition: winerror.h:4421

Referenced by InitFunctionPtrs().

◆ CryptCATEnumerateCatAttr()

CRYPTCATATTRIBUTE *WINAPI CryptCATEnumerateCatAttr ( HANDLE  hCatalog,
CRYPTCATATTRIBUTE prev 
)

Definition at line 823 of file crypt.c.

824{
825 struct cryptcat *cc = hCatalog;
826
827 FIXME("%p, %p\n", hCatalog, prev);
828
829 if (!hCatalog || hCatalog == INVALID_HANDLE_VALUE || cc->magic != CRYPTCAT_MAGIC)
830 {
832 return NULL;
833 }
835 return NULL;
836}

Referenced by InitFunctionPtrs().

◆ CryptCATEnumerateMember()

CRYPTCATMEMBER *WINAPI CryptCATEnumerateMember ( HANDLE  hCatalog,
CRYPTCATMEMBER prev 
)

Definition at line 841 of file crypt.c.

842{
843 struct cryptcat *cc = hCatalog;
844 CRYPTCATMEMBER *member = prev;
846 DWORD size, i;
847
848 TRACE("%p, %p\n", hCatalog, prev);
849
850 if (!hCatalog || hCatalog == INVALID_HANDLE_VALUE || cc->magic != CRYPTCAT_MAGIC)
851 {
853 return NULL;
854 }
855
856 /* dumping the contents makes me think that dwReserved is the iteration number */
857 if (!member)
858 {
859 if (!(member = malloc(sizeof(*member))))
860 {
862 return NULL;
863 }
864 member->cbStruct = sizeof(*member);
865 member->pwszFileName = member->pwszReferenceTag = NULL;
866 member->dwReserved = 0;
867 member->hReserved = NULL;
868 member->gSubjectType = cc->subject;
869 member->fdwMemberFlags = 0;
870 member->pIndirectData = NULL;
871 member->dwCertVersion = cc->inner->dwVersion;
872 }
873 else member->dwReserved++;
874
875 if (member->dwReserved >= cc->inner->cCTLEntry)
876 {
878 goto error;
879 }
880
881 /* list them backwards, like native */
882 entry = &cc->inner->rgCTLEntry[cc->inner->cCTLEntry - member->dwReserved - 1];
883
884 member->sEncodedIndirectData.cbData = member->sEncodedMemberInfo.cbData = 0;
885 member->sEncodedIndirectData.pbData = member->sEncodedMemberInfo.pbData = NULL;
886 free(member->pIndirectData);
887 member->pIndirectData = NULL;
888
889 for (i = 0; i < entry->cAttribute; i++)
890 {
891 CRYPT_ATTRIBUTE *attr = entry->rgAttribute + i;
892
893 if (attr->cValue != 1)
894 {
895 ERR("Can't handle attr->cValue of %lu\n", attr->cValue);
896 continue;
897 }
898 if (!strcmp(attr->pszObjId, CAT_MEMBERINFO_OBJID))
899 {
901 BOOL ret;
902
903 member->sEncodedMemberInfo.cbData = attr->rgValue->cbData;
904 member->sEncodedMemberInfo.pbData = attr->rgValue->pbData;
905
906 CryptDecodeObject(cc->encoding, CAT_MEMBERINFO_OBJID, attr->rgValue->pbData, attr->rgValue->cbData, 0, NULL, &size);
907
908 if (!(mi = malloc(size)))
909 {
911 goto error;
912 }
913 ret = CryptDecodeObject(cc->encoding, CAT_MEMBERINFO_OBJID, attr->rgValue->pbData, attr->rgValue->cbData, 0, mi, &size);
914 if (ret)
915 {
917
918 member->dwCertVersion = mi->dwCertVersion;
919 RtlInitUnicodeString(&guid, mi->pwszSubjGuid);
920 if (RtlGUIDFromString(&guid, &member->gSubjectType))
921 {
922 free(mi);
923 goto error;
924 }
925 }
926 free(mi);
927 if (!ret) goto error;
928 }
929 else if (!strcmp(attr->pszObjId, SPC_INDIRECT_DATA_OBJID))
930 {
931 /* SPC_INDIRECT_DATA_CONTENT is equal to SIP_INDIRECT_DATA */
932
933 member->sEncodedIndirectData.cbData = attr->rgValue->cbData;
934 member->sEncodedIndirectData.pbData = attr->rgValue->pbData;
935
936 CryptDecodeObject(cc->encoding, SPC_INDIRECT_DATA_OBJID, attr->rgValue->pbData, attr->rgValue->cbData, 0, NULL, &size);
937
938 if (!(member->pIndirectData = malloc(size)))
939 {
941 goto error;
942 }
943 CryptDecodeObject(cc->encoding, SPC_INDIRECT_DATA_OBJID, attr->rgValue->pbData, attr->rgValue->cbData, 0, member->pIndirectData, &size);
944 }
945 else
946 /* this object id should probably be handled in CryptCATEnumerateAttr */
947 FIXME("unhandled object id \"%s\"\n", attr->pszObjId);
948 }
949
950 if (!member->sEncodedMemberInfo.cbData || !member->sEncodedIndirectData.cbData)
951 {
952 ERR("Corrupted catalog entry?\n");
954 goto error;
955 }
956 size = (2 * member->pIndirectData->Digest.cbData + 1) * sizeof(WCHAR);
957 member->pwszReferenceTag = realloc(member->pwszReferenceTag, size);
958
959 if (!member->pwszReferenceTag)
960 {
962 goto error;
963 }
964 /* FIXME: reference tag is usually the file hash but doesn't have to be */
965 for (i = 0; i < member->pIndirectData->Digest.cbData; i++)
966 {
967 DWORD sub;
968
969 sub = member->pIndirectData->Digest.pbData[i] >> 4;
970 member->pwszReferenceTag[i * 2] = (sub < 10 ? '0' + sub : 'A' + sub - 10);
971 sub = member->pIndirectData->Digest.pbData[i] & 0xf;
972 member->pwszReferenceTag[i * 2 + 1] = (sub < 10 ? '0' + sub : 'A' + sub - 10);
973 }
974 member->pwszReferenceTag[i * 2] = 0;
975 return member;
976
977error:
978 free(member->pIndirectData);
979 free(member->pwszReferenceTag);
980 free(member);
981 return NULL;
982}
#define ERR(fmt,...)
Definition: precomp.h:57
BOOL WINAPI CryptDecodeObject(DWORD dwCertEncodingType, LPCSTR lpszStructType, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags, void *pvStructInfo, DWORD *pcbStructInfo)
Definition: decode.c:6278
#define realloc
Definition: debug_ros.c:6
GUID guid
Definition: version.c:147
_ACRTIMP int __cdecl strcmp(const char *, const char *)
Definition: string.c:3319
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
uint32_t entry
Definition: isohybrid.c:63
#define error(str)
Definition: mkdosfs.c:1605
static MONITORINFO mi
Definition: win.c:9400
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
Definition: wincrypt.h:835
Definition: cookie.c:202
NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING, GUID *)
#define CRYPT_E_ATTRIBUTES_MISSING
Definition: winerror.h:4413
#define CAT_MEMBERINFO_OBJID
Definition: wintrust.h:498
#define SPC_INDIRECT_DATA_OBJID
Definition: wintrust.h:480

Referenced by CryptCATAdminEnumCatalogFromHash(), and InitFunctionPtrs().

◆ CryptCATGetAttrInfo()

CRYPTCATATTRIBUTE *WINAPI CryptCATGetAttrInfo ( HANDLE  hCatalog,
CRYPTCATMEMBER member,
LPWSTR  tag 
)

Definition at line 754 of file crypt.c.

755{
756 struct cryptcat *cc = hCatalog;
757
758 FIXME("%p, %p, %s\n", hCatalog, member, debugstr_w(tag));
759
760 if (!hCatalog || hCatalog == INVALID_HANDLE_VALUE || cc->magic != CRYPTCAT_MAGIC)
761 {
763 return NULL;
764 }
766 return NULL;
767}
Definition: ecma_167.h:138

◆ CryptCATGetCatAttrInfo()

CRYPTCATATTRIBUTE *WINAPI CryptCATGetCatAttrInfo ( HANDLE  hCatalog,
LPWSTR  tag 
)

Definition at line 772 of file crypt.c.

773{
774 struct cryptcat *cc = hCatalog;
775
776 FIXME("%p, %s\n", hCatalog, debugstr_w(tag));
777
778 if (!hCatalog || hCatalog == INVALID_HANDLE_VALUE || cc->magic != CRYPTCAT_MAGIC)
779 {
781 return NULL;
782 }
784 return NULL;
785}

◆ CryptCATGetMemberInfo()

CRYPTCATMEMBER *WINAPI CryptCATGetMemberInfo ( HANDLE  hCatalog,
LPWSTR  tag 
)

Definition at line 787 of file crypt.c.

788{
789 struct cryptcat *cc = hCatalog;
790
791 FIXME("%p, %s\n", hCatalog, debugstr_w(tag));
792
793 if (!hCatalog || hCatalog == INVALID_HANDLE_VALUE || cc->magic != CRYPTCAT_MAGIC)
794 {
796 return NULL;
797 }
799 return NULL;
800}

◆ CryptCATOpen()

HANDLE WINAPI CryptCATOpen ( LPWSTR  ,
DWORD  ,
HCRYPTPROV  ,
DWORD  ,
DWORD   
)

◆ CryptCATPersistStore()

BOOL WINAPI CryptCATPersistStore ( HANDLE  catalog)

Definition at line 1081 of file crypt.c.

1082{
1083 FIXME("catalog %p, stub!\n", catalog);
1084
1086 return FALSE;
1087}
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102

◆ CryptCATPutAttrInfo()

CRYPTCATATTRIBUTE *WINAPI CryptCATPutAttrInfo ( HANDLE  catalog,
CRYPTCATMEMBER member,
WCHAR name,
DWORD  flags,
DWORD  size,
BYTE data 
)

Definition at line 1042 of file crypt.c.

1044{
1045 FIXME("catalog %p, member %p, name %s, flags %#lx, size %lu, data %p, stub!\n",
1046 catalog, member, debugstr_w(name), flags, size, data);
1047
1049 return NULL;
1050}
Definition: name.c:39

◆ CryptCATPutCatAttrInfo()

CRYPTCATATTRIBUTE *WINAPI CryptCATPutCatAttrInfo ( HANDLE  catalog,
WCHAR name,
DWORD  flags,
DWORD  size,
BYTE data 
)

Definition at line 1055 of file crypt.c.

1057{
1058 FIXME("catalog %p, name %s, flags %#lx, size %lu, data %p, stub!\n",
1059 catalog, debugstr_w(name), flags, size, data);
1060
1062 return NULL;
1063}

◆ CryptCATPutMemberInfo()

CRYPTCATMEMBER *WINAPI CryptCATPutMemberInfo ( HANDLE  catalog,
WCHAR filename,
WCHAR member,
GUID subject,
DWORD  version,
DWORD  size,
BYTE data 
)

Definition at line 1068 of file crypt.c.

1070{
1071 FIXME("catalog %p, filename %s, member %s, subject %s, version %lu, size %lu, data %p, stub!\n",
1073
1075 return NULL;
1076}
static const WCHAR version[]
Definition: asmname.c:66