From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Move OpenSSL random under USE_OPENSSL_RANDOM |
Date: | 2020-11-18 09:43:35 |
Message-ID: | 168426A3-D05C-4B4A-9E64-1DC7AC4DEC67@yesql.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 18 Nov 2020, at 09:54, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Wed, Nov 18, 2020 at 09:25:44AM +0100, Daniel Gustafsson wrote:
>> Technically that is what it does, except for setting the USE_*RANDOM variables
>> for non-OpenSSL builds. We could skip that too, which I think is what you're
>> proposing, but it seems to me that we'll end up with another set of entangled
>> logic in pg_strong_random if we do since there then needs to be precedence in
>> checking (one might be on Windows with OpenSSL for example, where OpenSSL >
>> Windows API).
>
> Yes, I am suggesting to just remove both USE_*_RANDOM flags, and use
> the following structure instead in pg_strong_random.c for both the
> init and main functions:
> #ifdef USE_OPENSSL
> /* foo */
> #elif WIN32
> /* bar*/
> #else
> /* hoge urandom */
> #endif
>
> And complain in configure.ac if we miss urandom for the fallback case.
>
> Now, it would not be the first time I suggest something on this thread
> that nobody likes :)
While it does simplify configure.ac, I'm just not a fan of the strict ordering
which is required without the labels even implying it. But that might just be
my personal preference.
cheers ./daniel
From | Date | Subject | |
---|---|---|---|
Next Message | vignesh C | 2020-11-18 09:56:09 | Re: Parallel copy |
Previous Message | Heikki Linnakangas | 2020-11-18 09:25:26 | Re: Add LWLock blocker(s) information |