summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHugo Beauzée-Luyssen <hugo@beauzee.fr>2018-12-13 17:31:29 +0100
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>2018-12-19 09:46:43 +0100
commitfd91542eb82c61feeb3b9483afa6ab303b6ef1b7 (patch)
tree80ef0d33b01de54ada60ace386ec692635b323b0 /tests
parent62f162f64c23a5e6b872ff8ee540d375b7e27168 (diff)
downloadgnutls-fd91542eb82c61feeb3b9483afa6ab303b6ef1b7.tar.gz
win32: Use CertOpenStore instead of CertOpenSystemStore
CertOpenSystemStore is not available when building for windows store. Both functions are available since windows XP, so there is no compatibility change. CertOpenSystemStore documentation states "Only current user certificates are accessible using this method, not the local machine store." hence we pass CERT_SYSTEM_STORE_CURRENT_USER. We also use the wide chars variants, in the event the ansi ones are silently rejected by windows store applications (which is not documented, but which I strongly suspect) This is equivalent to Wine's implementation of CertOpenSystemStore: https://github.com/wine-mirror/wine/blob/master/dlls/crypt32/store.c#L904
Diffstat (limited to 'tests')
-rw-r--r--tests/windows/crypt32.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/windows/crypt32.c b/tests/windows/crypt32.c
index 11325f7beb..6987f1faf9 100644
--- a/tests/windows/crypt32.c
+++ b/tests/windows/crypt32.c
@@ -57,6 +57,15 @@ HCERTSTORE WINAPI CertOpenSystemStore(
}
__declspec(dllexport)
+HCERTSTORE WINAPI CertOpenStore(
+ LPCSTR lpszStoreProvider, DWORD dwEncodingType,
+ HCRYPTPROV_LEGACY hCryptProv, DWORD dwFlags,
+ const void *pvPara)
+{
+ return VALID_PTR;
+}
+
+__declspec(dllexport)
BOOL WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
{
assert_int_nequal(hCertStore, VALID_PTR);