Re: [PATCH] Windows port add support to BCryptGenRandom - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] Windows port add support to BCryptGenRandom
Date
Msg-id 20191217043430.GF2344@paquier.xyz
Whole thread Raw
In response to RE: [PATCH] Windows port add support to BCryptGenRandom  (Ranier Vilela <ranier_gyn@hotmail.com>)
List pgsql-hackers
On Tue, Dec 17, 2019 at 03:57:56AM +0000, Ranier Vilela wrote:
> Windows Vista I believe.
> https://github.com/openssl/openssl/blob/master/crypto/rand/rand_win.c
> is the primary font and have more information.

So, this basically matches with what the MS documents tell us, and my
impression: this API is available down to at least MSVC 2008, which is
much more than what we support on HEAD where one can use MSVC 2013 and
newer versions.  Note that for the minimal platforms supported our
documentation cite Windows Server 2008 R2 SP1 and Windows 7, implying
_WIN32_WINNT >= 0x0600.

In short, this means two things:
- Your patch, as presented, is wrong.
- There is no need to make conditional the use of BCryptGenRandom.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Allow cluster owner to bypass authentication
Next
From: Amit Kapila
Date:
Subject: Re: segmentation fault when cassert enabled