On Mon, Dec 16, 2019 at 09:18:10PM +0000, Ranier Vilela wrote:
> According to microsoft documentation at:
> https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptgenrandom
> The function CryptGenRandom is deprecated, and may can be removed in future 
> release.
> This patch add support to use BCryptGenRandom.

+#if defined(_MSC_VER) && _MSC_VER >= 1900 \
+     && defined(MIN_WINNT) && MIN_WINNT >= 0x0600
+#define USE_WIN32_BCRYPTGENRANDOM
[...]
+       $postgres->AddLibrary('bcrypt.lib') if ($vsVersion > '12.00');
 
And looking at this page, it is said that the minimum version
supported by this function is Windows 2008:
https://docs.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcryptgenrandom

Now, your changes in MkvcBuild.pm and the backend code assume that
we need to include bcrypt.lib since MSVC 2015 (at least version
14.00 or _MSC_VER >= 1900.  Do you have a reference about when this
has been introduced in VS?  The MS docs don't seem to hold a hint
about that..
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to