Move OpenSSL random under USE_OPENSSL_RANDOM

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Move OpenSSL random under USE_OPENSSL_RANDOM
Date: 2020-08-25 13:52:14
Message-ID: F6291C3C-747C-4C93-BCE0-28BB420B1FF5@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
openssl_random_macros.patch application/octet-stream 1.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2020-08-25 13:57:11 Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur
Previous Message Laurenz Albe 2020-08-25 13:32:18 Re: passwordcheck: Log cracklib diagnostics