[vlc-devel] [PATCH] file_crypt_win32: disable encrypt on winstore for Win8.1

Steve Lhomme robux4 at videolabs.io
Tue Oct 24 14:01:03 CEST 2017


The API is not available
---
 modules/keystore/file_crypt_win32.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/keystore/file_crypt_win32.c b/modules/keystore/file_crypt_win32.c
index 9a7b3876a6..18b7143912 100644
--- a/modules/keystore/file_crypt_win32.c
+++ b/modules/keystore/file_crypt_win32.c
@@ -28,6 +28,7 @@
 #include <windows.h>
 #include <wincrypt.h>
 
+#if !VLC_WINSTORE_APP || _WIN32_WINNT >= 0x0A00
 typedef BOOL (WINAPI *ProcessFunc)(DATA_BLOB*, LPCWSTR, DATA_BLOB*, PVOID,
                                    CRYPTPROTECT_PROMPTSTRUCT*, DWORD, DATA_BLOB*);
 
@@ -71,11 +72,16 @@ static size_t Encrypt( vlc_keystore *p_keystore, void *p_ctx, const uint8_t *p_s
     VLC_UNUSED( p_ctx );
     return Process( p_src, i_src_len, pp_dst, CryptProtectData );
 }
+#endif
 
 int CryptInit(vlc_keystore *p_keystore, struct crypt *p_crypt)
 {
     VLC_UNUSED( p_keystore );
+#if !VLC_WINSTORE_APP || _WIN32_WINNT >= 0x0A00
     p_crypt->pf_decrypt = Decrypt;
     p_crypt->pf_encrypt = Encrypt;
     return VLC_SUCCESS;
+#else
+    return VLC_EGENERIC;
+#endif
 }
-- 
2.14.2



More information about the vlc-devel mailing list