ReactOS 0.4.17-dev-414-ge848ce1
store.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS win32 DLLs
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: ReactOS store related code for crypt32
5 * COPYRIGHT: Copyright 2025 Ratin Gao <ratin@knsoft.org>
6 */
7
8#include <windef.h>
9#include <winbase.h>
10#include <wincrypt.h>
11#include <wine/debug.h>
12#include <crypt32_private.h>
13
15
17{
21
23 { CERT_SYSTEM_STORE_CURRENT_USER, L"CurrentUser" },
24 { CERT_SYSTEM_STORE_LOCAL_MACHINE, L"LocalMachine" },
25 { CERT_SYSTEM_STORE_CURRENT_SERVICE, L"CurrentService" },
26 { CERT_SYSTEM_STORE_SERVICES, L"Services" },
27 { CERT_SYSTEM_STORE_USERS, L"Users" },
28 { CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY, L"CurrentUserGroupPolicy" },
29 { CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY, L"LocalMachineGroupPolicy" },
30 { CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE, L"LocalMachineEnterprise" },
31};
32
33BOOL
37 _Inout_opt_ void *pvArg,
39{
40 DWORD i;
41
42 /* Check input flags */
43 if (dwFlags != 0)
44 {
46 return FALSE;
47 }
48
49 /* Return fixed system stores */
50 for (i = 0; i < ARRAYSIZE(gSystemStoreLocations); i++)
51 {
52 if (!pfnEnum(gSystemStoreLocations[i].pwszStoreLocation,
54 NULL,
55 pvArg))
56 {
57 return FALSE;
58 }
59 }
60
61 /* FIXME: Return registered OID system stores by calling CryptEnumOIDFunction */
62 FIXME("Registered OID system stores is not enumerated\n");
63
64 return TRUE;
65}
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_INVALIDARG
Definition: ddrawi.h:101
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
struct _CERT_SYSTEM_STORE_LOCATION CERT_SYSTEM_STORE_LOCATION
static const CERT_SYSTEM_STORE_LOCATION gSystemStoreLocations[]
Definition: store.c:22
struct _CERT_SYSTEM_STORE_LOCATION * PCERT_SYSTEM_STORE_LOCATION
BOOL WINAPI CertEnumSystemStoreLocation(_In_ DWORD dwFlags, _Inout_opt_ void *pvArg, __callback PFN_CERT_ENUM_SYSTEM_STORE_LOCATION pfnEnum)
Definition: store.c:35
#define SetLastError(x)
Definition: compat.h:752
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
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
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
#define _Inout_opt_
Definition: no_sal2.h:216
#define _In_
Definition: no_sal2.h:158
#define __callback
Definition: sal_old.h:112
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define CERT_SYSTEM_STORE_SERVICES
Definition: wincrypt.h:2534
#define CERT_SYSTEM_STORE_CURRENT_SERVICE
Definition: wincrypt.h:2532
#define CERT_SYSTEM_STORE_USERS
Definition: wincrypt.h:2536
BOOL(WINAPI * PFN_CERT_ENUM_SYSTEM_STORE_LOCATION)(LPCWSTR pwszStoreLocation, DWORD dwFlags, void *pvReserved, void *pvArg)
Definition: wincrypt.h:1244
#define CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE
Definition: wincrypt.h:2542
#define CERT_SYSTEM_STORE_LOCAL_MACHINE
Definition: wincrypt.h:2530
#define CERT_SYSTEM_STORE_CURRENT_USER
Definition: wincrypt.h:2528
#define CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY
Definition: wincrypt.h:2538
#define CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY
Definition: wincrypt.h:2540
#define WINAPI
Definition: msvc.h:6