Remove ability to independently select random number generator

Enterprise / PostgreSQL - Magnus Hagander [hagander.net] - 20 November 2020 12:57 UTC

Remove the ability to select random number generator independently from SSL library. Instead, use the random number generator from the SSL library (today only OpenSSL supported) if one is configured. If no SSL library is configured, use the platform default (which means use CryptoAPI on Win32 and /dev/urandom on Linux).

This also restructures pg_strong_random.c to have three clearly separate sections, one for each implementation, with two functions in each, instead of a scattered set of ifdefs throughout the whole file.

Author: Daniel Gustafsson, Magnus Hagander, Michael Paquier Discussion: https://postgr.es/m/632623.1605460616@sss.pgh.pa.us

16f96c74d4 Remove ability to independently select random number generator
configure | 61 +++++---------
configure.ac | 41 +++------
src/include/pg_config.h.in | 9 --
src/port/pg_strong_random.c | 201 ++++++++++++++++++--------------------------
src/tools/msvc/Solution.pm | 3 -
5 files changed, 114 insertions(+), 201 deletions(-)

Upstream: git.postgresql.org


  • Share