Move OpenSSL random under USE_OPENSSL_RANDOM - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Move OpenSSL random under USE_OPENSSL_RANDOM
Date
Msg-id F6291C3C-747C-4C93-BCE0-28BB420B1FF5@yesql.se
Whole thread Raw
Responses Re: Move OpenSSL random under USE_OPENSSL_RANDOM
List pgsql-hackers
The USE_OPENSSL_RANDOM macro is defined when OpenSSL is used as a randomness
provider, but the implementation of strong randomness is guarded by USE_OPENSSL
in most places.  This is technically the same thing today, but it seems
hygienic to use the appropriate macro in case we ever want to allow OS
randomness together with OpenSSL or something similar (or just make git grep
easier which is my itch to scratch with this).

The attached moves all invocations under the correct guards.  RAND_poll() in
fork_process.c needs to happen for both OpenSSL and OpenSSL random, thus the
check for both.

cheers ./daniel


Attachment

pgsql-hackers by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: passwordcheck: Log cracklib diagnostics
Next
From: Peter Eisentraut
Date:
Subject: Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur