+2008-08-19 Adam Strzelecki <ono@java.pl> (tiny change)
+
+ * lib/gc-gnulib.c: Use CRYPT_VERIFY_CONTEXT. Try to use Intel CSP
+ if present, for intel RND. Return error on failures.
+
2008-08-18 Ben Pfaff <blp@gnu.org>
gitlog-to-changelog: give better diagnostic for failed pipe-open
# include <windows.h>
# include <wincrypt.h>
HCRYPTPROV g_hProv = 0;
+# ifndef PROV_INTEL_SEC
+# define PROV_INTEL_SEC 22
+# endif
+# ifndef CRYPT_VERIFY_CONTEXT
+# define CRYPT_VERIFY_CONTEXT 0xF0000000
+# endif
# endif
#endif
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
if(g_hProv)
CryptReleaseContext(g_hProv, 0);
- CryptAcquireContext(&g_hProv, NULL, NULL, PROV_RSA_FULL, 0);
+ if(!CryptAcquireContext(&g_hProv, NULL, NULL, PROV_INTEL_SEC, CRYPT_VERIFY_CONTEXT))
+ if(!CryptAcquireContext(&g_hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFY_CONTEXT))
+ return GC_RANDOM_ERROR;
# endif
#endif