crypt32: Cert(Un)RegisterSystemStore semi-stubs.

Signed-off-by: Donat Enikeev <donat@enikeev.net>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Donat Enikeev 2016-10-14 09:37:09 +03:00 committed by Alexandre Julliard
parent dc208e7216
commit 71bd13391b
2 changed files with 47 additions and 0 deletions

View File

@ -78,6 +78,7 @@
@ stdcall CertRDNValueToStrA(long ptr ptr long)
@ stdcall CertRDNValueToStrW(long ptr ptr long)
@ stdcall CertRegisterPhysicalStore(ptr long wstr ptr ptr)
@ stdcall CertRegisterSystemStore(ptr long ptr ptr)
@ stdcall CertRemoveEnhancedKeyUsageIdentifier(ptr str)
@ stdcall CertRemoveStoreFromCollection(ptr ptr)
@ stdcall CertSaveStore(ptr long long long ptr long)
@ -190,6 +191,7 @@
@ stdcall CryptUnprotectMemory(ptr long long)
@ stdcall CryptUnregisterDefaultOIDFunction(long str wstr)
@ stdcall CryptUnregisterOIDFunction(long str str)
@ stdcall CertUnregisterSystemStore(ptr long)
@ stub CryptUnregisterOIDInfo
@ stdcall CryptVerifyCertificateSignature(long long ptr long ptr)
@ stdcall CryptVerifyCertificateSignatureEx(long long long ptr long ptr long ptr)

View File

@ -1390,6 +1390,51 @@ BOOL WINAPI CertRegisterPhysicalStore(const void *pvSystemStore, DWORD dwFlags,
return FALSE;
}
BOOL WINAPI CertRegisterSystemStore(const void *pvSystemStore, DWORD dwFlags,
PCERT_SYSTEM_STORE_INFO pStoreInfo, void *pvReserved)
{
HCERTSTORE hstore;
if (dwFlags & CERT_SYSTEM_STORE_RELOCATE_FLAG )
{
FIXME("(%p, %08x, %p, %p): flag not supported\n", pvSystemStore, dwFlags, pStoreInfo, pvReserved);
return FALSE;
}
TRACE("(%s, %08x, %p, %p)\n", debugstr_w(pvSystemStore), dwFlags, pStoreInfo, pvReserved);
hstore = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY_W, 0, 0, dwFlags, pvSystemStore);
if (hstore)
{
CertCloseStore(hstore, 0);
return TRUE;
}
return FALSE;
}
BOOL WINAPI CertUnregisterSystemStore(void *pvSystemStore, DWORD dwFlags)
{
HCERTSTORE hstore;
if (dwFlags & CERT_SYSTEM_STORE_RELOCATE_FLAG)
{
FIXME("(%p, %08x): flag not supported\n", pvSystemStore, dwFlags);
return FALSE;
}
TRACE("(%s, %08x)\n", debugstr_w(pvSystemStore), dwFlags);
hstore = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY_W, 0, 0, dwFlags | CERT_STORE_OPEN_EXISTING_FLAG, pvSystemStore);
if (hstore == NULL)
return FALSE;
hstore = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY_W, 0, 0, dwFlags | CERT_STORE_DELETE_FLAG, pvSystemStore);
if (hstore == NULL && GetLastError() == 0)
return TRUE;
return FALSE;
}
static void EmptyStore_addref(WINECRYPT_CERTSTORE *store)
{
TRACE("(%p)\n", store);