Commit ce4939ff authored by Noah Misch's avatar Noah Misch

Use RAND_poll() for seeding randomness after fork().

OpenSSL deprecated RAND_cleanup(), and OpenSSL 1.1.0 made it into a
no-op.  Replace it with RAND_poll(), per an OpenSSL community
recommendation.  While this has no user-visible consequences under
OpenSSL defaults, it might help under non-default settings.

Daniel Gustafsson, reviewed by David Steele and Michael Paquier.

Discussion: https://postgr.es/m/9B038FA5-23E8-40D0-B932-D515E1D8F66A@yesql.se
parent 0a0727cc
......@@ -109,10 +109,12 @@ fork_process(void)
}
/*
* Make sure processes do not share OpenSSL randomness state.
* Make sure processes do not share OpenSSL randomness state. This is
* no longer required in OpenSSL 1.1.1 and later versions, but until
* we drop support for version < 1.1.1 we need to do this.
*/
#ifdef USE_OPENSSL
RAND_cleanup();
RAND_poll();
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment