Juan Lang : crypt32: Add stubs for some stores.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jul 12 14:21:07 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 39859971bb4259279ea42d51c91de4c7cb38a927
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=39859971bb4259279ea42d51c91de4c7cb38a927

Author: Juan Lang <juan_lang at yahoo.com>
Date:   Wed Jul 12 07:20:56 2006 -0700

crypt32: Add stubs for some stores.

---

 dlls/crypt32/store.c |   57 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c
index 95b91da..f1cca0e 100644
--- a/dlls/crypt32/store.c
+++ b/dlls/crypt32/store.c
@@ -1723,6 +1723,54 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpe
     return ret;
 }
 
+static PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
+ DWORD dwFlags, const void *pvPara)
+{
+    FIXME("(%ld, %08lx, %s): stub\n", hCryptProv, dwFlags,
+     debugstr_w((LPCWSTR)pvPara));
+    return NULL;
+}
+
+static PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreA(HCRYPTPROV hCryptProv,
+ DWORD dwFlags, const void *pvPara)
+{
+    int len;
+    PWINECRYPT_CERTSTORE ret = NULL;
+
+    TRACE("(%ld, %08lx, %s)\n", hCryptProv, dwFlags,
+     debugstr_a((LPCSTR)pvPara));
+
+    if (!pvPara)
+    {
+        SetLastError(ERROR_FILE_NOT_FOUND);
+        return NULL;
+    }
+    len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pvPara, -1, NULL, 0);
+    if (len)
+    {
+        LPWSTR storeName = CryptMemAlloc(len * sizeof(WCHAR));
+
+        if (storeName)
+        {
+            MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pvPara, -1, storeName, len);
+            ret = CRYPT_FileNameOpenStoreW(hCryptProv, dwFlags, storeName);
+            CryptMemFree(storeName);
+        }
+    }
+    return ret;
+}
+
+static PWINECRYPT_CERTSTORE CRYPT_PhysOpenStoreW(HCRYPTPROV hCryptProv,
+ DWORD dwFlags, const void *pvPara)
+{
+    if (dwFlags & CERT_SYSTEM_STORE_RELOCATE_FLAG)
+        FIXME("(%ld, %08lx, %p): stub\n", hCryptProv, dwFlags, pvPara);
+    else
+        FIXME("(%ld, %08lx, %s): stub\n", hCryptProv, dwFlags,
+         debugstr_w((LPCWSTR)pvPara));
+    return NULL;
+}
+
 HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider,
  DWORD dwMsgAndCertEncodingType, HCRYPTPROV hCryptProv, DWORD dwFlags,
  const void* pvPara)
@@ -1743,6 +1791,12 @@ HCERTSTORE WINAPI CertOpenStore(LPCSTR l
         case (int)CERT_STORE_PROV_REG:
             openFunc = CRYPT_RegOpenStore;
             break;
+        case (int)CERT_STORE_PROV_FILENAME_A:
+            openFunc = CRYPT_FileNameOpenStoreA;
+            break;
+        case (int)CERT_STORE_PROV_FILENAME_W:
+            openFunc = CRYPT_FileNameOpenStoreW;
+            break;
         case (int)CERT_STORE_PROV_COLLECTION:
             openFunc = CRYPT_CollectionOpenStore;
             break;
@@ -1758,6 +1812,9 @@ HCERTSTORE WINAPI CertOpenStore(LPCSTR l
         case (int)CERT_STORE_PROV_SYSTEM_REGISTRY_W:
             openFunc = CRYPT_SysRegOpenStoreW;
             break;
+        case (int)CERT_STORE_PROV_PHYSICAL_W:
+            openFunc = CRYPT_PhysOpenStoreW;
+            break;
         default:
             if (LOWORD(lpszStoreProvider))
                 FIXME("unimplemented type %d\n", LOWORD(lpszStoreProvider));




More information about the wine-cvs mailing list