50 static const WCHAR fmt[] = {
'%',
'0',
'2',
'X',0 };
56 for (
i = 0;
i < 20;
i++)
60static const WCHAR CertsW[] = {
'C',
'e',
'r',
't',
'i',
'f',
'i',
'c',
'a',
't',
'e',
's',
100 TRACE(
"Adding cert with hash %s\n",
103 contextType, &addedType);
121 contextInterface =
NULL;
123 if (contextInterface)
129 WCHAR asciiHash[20 * 2 + 1];
132 TRACE(
"comparing %s\n",
135 if (!
lstrcmpW(asciiHash, subKeyName))
137 TRACE(
"hash matches, adding\n");
143 TRACE(
"hash doesn't match, ignoring\n");
185 WCHAR asciiHash[20 * 2 + 1];
269 WCHAR asciiHash[20 * 2 + 1];
309 TRACE(
"(%p, %d)\n", store, force);
311 if (store->
dirty || force)
457 DWORD dwCtrlType,
void const *pvCtrlPara)
462 TRACE(
"(%p, %08x, %d, %p)\n", hCertStore,
dwFlags, dwCtrlType,
483 FIXME(
"CERT_STORE_CTRL_AUTO_RESYNC: stub\n");
486 FIXME(
"CERT_STORE_CTRL_NOTIFY_CHANGE: stub\n");
489 FIXME(
"%u: stub\n", dwCtrlType);
563 provInfo.
cbSize =
sizeof(provInfo);
576 TRACE(
"returning %p\n", store);
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
#define RegCloseKey(hKey)
LSTATUS WINAPI RegDeleteTreeW(_In_ HKEY, _In_opt_ LPCWSTR)
const void * CRYPT_ReadSerializedElement(const BYTE *pbElement, DWORD cbElement, DWORD dwContextTypeFlags, DWORD *pdwContentType) DECLSPEC_HIDDEN
static context_t * context_from_ptr(const void *ptr)
WINECRYPT_CERTSTORE * CRYPT_ProvCreateStore(DWORD dwFlags, WINECRYPT_CERTSTORE *memStore, const CERT_STORE_PROV_INFO *pProvInfo) DECLSPEC_HIDDEN
BOOL WINAPI I_CertUpdateStore(HCERTSTORE store1, HCERTSTORE store2, DWORD unk0, DWORD unk1) DECLSPEC_HIDDEN
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
BOOL WINAPI CryptReleaseContext(HCRYPTPROV hProv, DWORD dwFlags)
void Context_Release(context_t *context)
LPVOID WINAPI CryptMemAlloc(ULONG cbSize)
VOID WINAPI CryptMemFree(LPVOID pv)
HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider, DWORD dwMsgAndCertEncodingType, HCRYPTPROV_LEGACY hCryptProv, DWORD dwFlags, const void *pvPara)
const WINE_CONTEXT_INTERFACE * pCTLInterface
const WINE_CONTEXT_INTERFACE * pCertInterface
const WINE_CONTEXT_INTERFACE * pCRLInterface
BOOL WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
#define GetCurrentProcess()
#define ERROR_NO_MORE_ITEMS
#define ERROR_ACCESS_DENIED
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
GLenum GLuint GLenum GLsizei const GLchar * buf
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
#define ERROR_FILE_NOT_FOUND
static unsigned __int64 next
static BOOL WINAPI CRYPT_RegDeleteCTL(HCERTSTORE hCertStore, PCCTL_CONTEXT pCtlContext, DWORD dwFlags)
static void CRYPT_RegReadSerializedFromReg(HKEY key, DWORD contextType, HCERTSTORE store)
struct _WINE_HASH_TO_DELETE WINE_HASH_TO_DELETE
static BOOL WINAPI CRYPT_RegWriteCert(HCERTSTORE hCertStore, PCCERT_CONTEXT cert, DWORD dwFlags)
static BOOL CRYPT_RegFlushStore(WINE_REGSTOREINFO *store, BOOL force)
static BOOL WINAPI CRYPT_RegWriteCRL(HCERTSTORE hCertStore, PCCRL_CONTEXT crl, DWORD dwFlags)
WINECRYPT_CERTSTORE * CRYPT_RegOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags, const void *pvPara)
static void * regProvFuncs[]
static const WCHAR CertsW[]
static BOOL WINAPI CRYPT_RegWriteCTL(HCERTSTORE hCertStore, PCCTL_CONTEXT ctl, DWORD dwFlags)
static void CRYPT_RegReadFromReg(HKEY key, HCERTSTORE store)
struct _WINE_REGSTOREINFO WINE_REGSTOREINFO
static const WCHAR CTLsW[]
static BOOL CRYPT_RegDeleteContext(WINE_REGSTOREINFO *store, struct list *deleteList, const void *context, const WINE_CONTEXT_INTERFACE *contextInterface)
static const WCHAR CRLsW[]
static BOOL WINAPI CRYPT_RegDeleteCRL(HCERTSTORE hCertStore, PCCRL_CONTEXT pCrlContext, DWORD dwFlags)
static BOOL WINAPI CRYPT_RegControl(HCERTSTORE hCertStore, DWORD dwFlags, DWORD dwCtrlType, void const *pvCtrlPara)
BOOL CRYPT_SerializeContextsToReg(HKEY key, DWORD flags, const WINE_CONTEXT_INTERFACE *contextInterface, HCERTSTORE memStore)
static void WINAPI CRYPT_RegCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
static BOOL WINAPI CRYPT_RegDeleteCert(HCERTSTORE hCertStore, PCCERT_CONTEXT pCertContext, DWORD dwFlags)
static const WCHAR BlobW[]
static BOOL CRYPT_WriteSerializedToReg(HKEY key, DWORD flags, const BYTE *hash, const BYTE *buf, DWORD len)
static void CRYPT_HashToStr(const BYTE *hash, LPWSTR asciiHash)
static BOOL CRYPT_RegWriteContext(WINE_REGSTOREINFO *store, const void *context, DWORD dwFlags)
static BOOL CRYPT_RegWriteToReg(WINE_REGSTOREINFO *store)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
void ** rgpvStoreProvFunc
HCERTSTOREPROV hStoreProv
DWORD_PTR Spare[8/sizeof(DWORD_PTR)]
PCRITICAL_SECTION_DEBUG DebugInfo
GetContextPropertyFunc getProp
SerializeElementFunc serialize
AddContextToStoreFunc addContextToStore
EnumContextsInStoreFunc enumContextsInStore
struct list certsToDelete
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
_In_ PCCRL_CONTEXT pCrlContext
#define CERT_STORE_CTRL_COMMIT_FORCE_FLAG
#define CERT_STORE_ADD_REPLACE_EXISTING
#define CERT_STORE_CREATE_NEW_FLAG
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define CERT_STORE_CTL_CONTEXT_FLAG
#define CERT_STORE_CTRL_RESYNC
_In_ PCCTL_CONTEXT pCtlContext
#define CERT_STORE_CRL_CONTEXT_FLAG
#define CERT_STORE_PROV_MEMORY
#define CERT_STORE_CTRL_NOTIFY_CHANGE
#define CERT_STORE_CERTIFICATE_CONTEXT
#define CERT_STORE_CTRL_AUTO_RESYNC
#define CERT_STORE_CTL_CONTEXT
_In_ PCCERT_CONTEXT pCertContext
#define CERT_HASH_PROP_ID
#define CERT_STORE_PROV_WRITE_ADD_FLAG
#define CERT_STORE_CTRL_COMMIT
#define CERT_STORE_NO_CRYPT_RELEASE_FLAG
#define CERT_STORE_CERTIFICATE_CONTEXT_FLAG
#define CERT_STORE_DELETE_FLAG
#define CERT_STORE_CRL_CONTEXT
#define CERT_STORE_READONLY_FLAG
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)