From: Magnus Hagander <magnus@hagander.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add pg_strong_random_init function to initialize random number g
Date: Fri, 06 Nov 2020 12:31:46 +0000
Message-ID: <E1kb0uA-0002ay-3w@gemulon.postgresql.org> (raw)
Add pg_strong_random_init function to initialize random number generator
Currently only OpenSSL requires this initialization, but in the future
other SSL implementations are likely to need it as well. Abstracting
this functionality out into a separate function makes this cleaner and
more clear, and also removes the dependency on OpenSSL headers from
fork_process.c.
OpenSSL is special in that we need to initialize this random number
generator even if we're not going to use it directly, until we drop
support for everything prior to OpenSSL 1.1.1. (And of course also if we
actually use it). All other implementations are left empty at this time,
but more are expected to be added in the future.
Author: Daniel Gustafsson <daniel@yesql.se>, Michael Paquier <michael@paquier.xyz>
Reviewed-By: Magnus Hagander <magnus@hagander.net>
Discussion: https://postgr.es/m/F6291C3C-747C-4C93-BCE0-28BB420B1FF5@yesql.se
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5ee180a3947060b98284a935f26f92c71d698f7c
Modified Files
--------------
src/backend/postmaster/fork_process.c | 13 ++--------
src/include/port.h | 1 +
src/port/pg_strong_random.c | 46 ++++++++++++++++++++++++++++++++++-
3 files changed, 48 insertions(+), 12 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: magnus@hagander.net
Subject: Re: pgsql: Add pg_strong_random_init function to initialize random number g
In-Reply-To: <E1kb0uA-0002ay-3w@gemulon.postgresql.org>
References: <E1kb0uA-0002ay-3w@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox