mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Remove configure switch --disable-strong-random
This removes a portion of infrastructure introduced by fe0a0b5
to allow
compilation of Postgres in environments where no strong random source is
available, meaning that there is no linking to OpenSSL and no
/dev/urandom (Windows having its own CryptoAPI). No systems shipped
this century lack /dev/urandom, and the buildfarm is actually not
testing this switch at all, so just remove it. This simplifies
particularly some backend code which included a fallback implementation
using shared memory, and removes a set of alternate regression output
files from pgcrypto.
Author: Michael Paquier
Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/20181230063219.GG608@paquier.xyz
This commit is contained in:
@ -36,7 +36,6 @@
|
||||
#include "port/pg_bswap.h"
|
||||
#include "replication/walsender.h"
|
||||
#include "storage/ipc.h"
|
||||
#include "utils/backend_random.h"
|
||||
#include "utils/timestamp.h"
|
||||
|
||||
|
||||
@ -835,7 +834,7 @@ CheckMD5Auth(Port *port, char *shadow_pass, char **logdetail)
|
||||
errmsg("MD5 authentication is not supported when \"db_user_namespace\" is enabled")));
|
||||
|
||||
/* include the salt to use for computing the response */
|
||||
if (!pg_backend_random(md5Salt, 4))
|
||||
if (!pg_strong_random(md5Salt, 4))
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("could not generate random MD5 salt")));
|
||||
@ -3036,7 +3035,7 @@ PerformRadiusTransaction(const char *server, const char *secret, const char *por
|
||||
/* Construct RADIUS packet */
|
||||
packet->code = RADIUS_ACCESS_REQUEST;
|
||||
packet->length = RADIUS_HEADER_LENGTH;
|
||||
if (!pg_backend_random((char *) packet->vector, RADIUS_VECTOR_LENGTH))
|
||||
if (!pg_strong_random(packet->vector, RADIUS_VECTOR_LENGTH))
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("could not generate random encryption vector")));
|
||||
|
Reference in New Issue
Block a user