diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2017-07-03 12:10:11 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2017-07-03 12:10:11 +0300 |
commit | bf723a274cbb00c7fba66c66312a77940af13d79 (patch) | |
tree | 92a84fb0c3060a9fbcbd90013cdaafdf44ec46d9 /contrib/pgcrypto/px.c | |
parent | 647675228f2b18964d8ade8a1061a719e527acfb (diff) |
Forbid gen_random_uuid() with --disable-strong-random
Previously, gen_random_uuid() would fall back to a weak random number
generator, unlike gen_random_bytes() which would just fail. And this was
not made very clear in the docs. For consistency, also make
gen_random_uuid() fail outright, if compiled with --disable-strong-random.
Re-word the error message you get with --disable-strong-random. It is also
used by pgp functions that require random salts, and now also
gen_random_uuid().
Reported by Radek Slupik.
Discussion: https://www.postgresql.org/message-id/20170101232054.10135.50528@wrigleys.postgresql.org
Diffstat (limited to 'contrib/pgcrypto/px.c')
-rw-r--r-- | contrib/pgcrypto/px.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/pgcrypto/px.c b/contrib/pgcrypto/px.c index a5c02f3612d..8ec920224ad 100644 --- a/contrib/pgcrypto/px.c +++ b/contrib/pgcrypto/px.c @@ -104,7 +104,7 @@ px_THROW_ERROR(int err) #else ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("pg_random_bytes() is not supported by this build"), + errmsg("generating random data is not supported by this build"), errdetail("This functionality requires a source of strong random numbers"), errhint("You need to rebuild PostgreSQL using --enable-strong-random"))); #endif |