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:
65
configure
vendored
65
configure
vendored
@ -761,7 +761,6 @@ GENHTML
|
||||
LCOV
|
||||
GCOV
|
||||
enable_debug
|
||||
enable_strong_random
|
||||
enable_rpath
|
||||
default_port
|
||||
WANTED_LANGUAGES
|
||||
@ -829,7 +828,6 @@ with_pgport
|
||||
enable_rpath
|
||||
enable_spinlocks
|
||||
enable_atomics
|
||||
enable_strong_random
|
||||
enable_debug
|
||||
enable_profiling
|
||||
enable_coverage
|
||||
@ -1512,7 +1510,6 @@ Optional Features:
|
||||
executables
|
||||
--disable-spinlocks do not use spinlocks
|
||||
--disable-atomics do not use atomic operations
|
||||
--disable-strong-random do not use a strong random number source
|
||||
--enable-debug build with debugging symbols (-g)
|
||||
--enable-profiling build with profiling enabled
|
||||
--enable-coverage build with coverage testing instrumentation
|
||||
@ -3272,34 +3269,6 @@ fi
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Random number generation
|
||||
#
|
||||
|
||||
|
||||
# Check whether --enable-strong-random was given.
|
||||
if test "${enable_strong_random+set}" = set; then :
|
||||
enableval=$enable_strong_random;
|
||||
case $enableval in
|
||||
yes)
|
||||
:
|
||||
;;
|
||||
no)
|
||||
:
|
||||
;;
|
||||
*)
|
||||
as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
enable_strong_random=yes
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# --enable-debug adds -g to compiler flags
|
||||
#
|
||||
@ -17937,7 +17906,7 @@ fi
|
||||
# in the template or configure command line.
|
||||
|
||||
# If not selected manually, try to select a source automatically.
|
||||
if test "$enable_strong_random" = "yes" && test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
|
||||
if test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
|
||||
if test x"$with_openssl" = x"yes" ; then
|
||||
USE_OPENSSL_RANDOM=1
|
||||
elif test "$PORTNAME" = "win32" ; then
|
||||
@ -17971,42 +17940,28 @@ fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
|
||||
$as_echo_n "checking which random number source to use... " >&6; }
|
||||
if test "$enable_strong_random" = yes ; then
|
||||
if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
|
||||
if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
|
||||
|
||||
$as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
|
||||
$as_echo "OpenSSL" >&6; }
|
||||
elif test x"$USE_WIN32_RANDOM" = x"1" ; then
|
||||
elif test x"$USE_WIN32_RANDOM" = x"1" ; then
|
||||
|
||||
$as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
|
||||
$as_echo "Windows native" >&6; }
|
||||
elif test x"$USE_DEV_URANDOM" = x"1" ; then
|
||||
elif test x"$USE_DEV_URANDOM" = x"1" ; then
|
||||
|
||||
$as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
|
||||
$as_echo "/dev/urandom" >&6; }
|
||||
else
|
||||
as_fn_error $? "
|
||||
no source of strong random numbers was found
|
||||
PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
|
||||
for authentication protocols. You can use --disable-strong-random to use a
|
||||
built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
|
||||
fi
|
||||
|
||||
$as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
|
||||
$as_echo "weak builtin PRNG" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
|
||||
*** Not using a strong random number source may be insecure." >&5
|
||||
$as_echo "$as_me: WARNING:
|
||||
*** Not using a strong random number source may be insecure." >&2;}
|
||||
as_fn_error $? "
|
||||
no source of strong random numbers was found
|
||||
PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers." "$LINENO" 5
|
||||
fi
|
||||
|
||||
# If not set in template file, set bytes to use libc memset()
|
||||
|
Reference in New Issue
Block a user