# Useful variables in test scripts
#
+# The following script sets the following algorithm-related variables. These
+# are selected randomly at runtime from a list of supported algorithms. The
+# randomization is deterministic and remains stable for a period of time for a
+# given platform.
+#
# Default algorithm for testing.
-export DEFAULT_ALGORITHM=ECDSAP256SHA256
-export DEFAULT_ALGORITHM_NUMBER=13
-export DEFAULT_BITS=256
-
-# This is an alternative algorithm for test cases that require more than
-# one algorithm (for example algorithm rollover). Must be different from
+# DEFAULT_ALGORITHM
+# DEFAULT_ALGORITHM_NUMBER
+# DEFAULT_BITS
+#
+# This is an alternative algorithm for test cases that require more than one
+# algorithm (for example algorithm rollover). Must be different from
# DEFAULT_ALGORITHM.
-export ALTERNATIVE_ALGORITHM=RSASHA256
-export ALTERNATIVE_ALGORITHM_NUMBER=8
-export ALTERNATIVE_BITS=1280
-
-# This is an algorithm that is used for tests against the
-# "disable-algorithms" configuration option. Must be different from above
-# algorithms.
-export DISABLED_ALGORITHM=ECDSAP384SHA384
-export DISABLED_ALGORITHM_NUMBER=14
-export DISABLED_BITS=384
+# ALTERNATIVE_ALGORITHM
+# ALTERNATIVE_ALGORITHM_NUMBER
+# ALTERNATIVE_BITS
+#
+# This is an algorithm that is used for tests against the "disable-algorithms"
+# configuration option. Must be different from above algorithms.
+# DISABLED_ALGORITHM
+# DISABLED_ALGORITHM_NUMBER
+# DISABLED_BITS
+#
+# There are multiple algoritms sets to choose from (see get_algorithms.py). To
+# override the default choice, set the ALGORITHM_SET env var (see mkeys system
+# test for example).
+eval "$($PYTHON "$TOP_SRCDIR/bin/tests/system/get_algorithms.py")"
# Default HMAC algorithm.
export DEFAULT_HMAC=hmac-sha256
# This is not the windows build.
export CYGWIN=""
-# Load common values shared between windows and unix/linux.
-. $TOP/bin/tests/system/conf.sh.common
-
export ARPANAME=$TOP/bin/tools/arpaname
export CDS=$TOP/bin/dnssec/dnssec-cds
export CHECKCONF=$TOP/bin/check/named-checkconf
# use local keytab instead of default /etc/krb5.keytab
export KRB5_KTNAME=dns.keytab
+# Load common values shared between windows and unix/linux.
+. $TOP/bin/tests/system/conf.sh.common
+
#
# Construct the lists of tests to run
#