From: Mark Andrews Date: Fri, 8 Jul 2022 01:37:39 +0000 (+1000) Subject: rpz: use $DEFAULT_ALGORITHM X-Git-Tag: v9.19.4~44^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1861c3e503d547d86e432c69e56c240c5d77cf3f;p=thirdparty%2Fbind9.git rpz: use $DEFAULT_ALGORITHM --- diff --git a/bin/tests/system/rpz/setup.sh b/bin/tests/system/rpz/setup.sh index 2f29ed45e8c..745b96dd50d 100644 --- a/bin/tests/system/rpz/setup.sh +++ b/bin/tests/system/rpz/setup.sh @@ -17,7 +17,7 @@ set -e . ../conf.sh -QPERF=`$SHELL qperf.sh` +QPERF=$($SHELL qperf.sh) USAGE="$0: [-DNx]" DEBUG= @@ -29,7 +29,7 @@ while getopts "DNx" c; do *) echo "$USAGE" 1>&2; exit 1 ;; esac done -shift `expr $OPTIND - 1 || true` +shift $((OPTIND - 1)) if test "$#" -ne 0; then echo "$USAGE" 1>&2 exit 1 @@ -61,7 +61,7 @@ copy_setports dnsrpzd.conf.in dnsrpzd.conf # Note that dnsrps.conf and dnsrps-secondary.conf are included in named.conf # and differ from dnsrpz.conf which is used by dnsrpzd. $SHELL ../ckdnsrps.sh -A $TEST_DNSRPS $DEBUG -test -z "`grep 'dnsrps-enable yes' dnsrps.conf`" && TEST_DNSRPS= +test -z "$(grep 'dnsrps-enable yes' dnsrps.conf)" && TEST_DNSRPS= # set up test policy zones. # bl is the main test zone @@ -87,7 +87,7 @@ cp ns5/expire.conf.in ns5/expire.conf # $3=input zone file # $4=output file signzone () { - KEYNAME=`$KEYGEN -q -a rsasha256 -K $1 $2` + KEYNAME=$($KEYGEN -q -a ${DEFAULT_ALGORITHM} -K $1 $2) cat $1/$3 $1/$KEYNAME.key > $1/tmp $SIGNER -P -K $1 -o $2 -f $1/$4 $1/tmp >/dev/null sed -n -e 's/\(.*\) IN DNSKEY \([0-9]\{1,\} [0-9]\{1,\} [0-9]\{1,\}\) \(.*\)/trust-anchors {"\1" static-key \2 "\3";};/p' $1/$KEYNAME.key >>trusted.conf @@ -171,7 +171,7 @@ cp ns5/empty.db.in ns5/policy2.db # Run dnsrpzd to get the license and prime the static policy zones if test -n "$TEST_DNSRPS"; then - DNSRPZD="`../rpz/dnsrps -p`" + DNSRPZD="$(../rpz/dnsrps -p)" cd ns3 "$DNSRPZ" -D../dnsrpzd.rpzf -S../dnsrpzd.sock -C../dnsrpzd.conf \ -w 0 -dddd -L stdout >./dnsrpzd.run 2>&1