[v9_9] support all algorithms in ddns-confgen

3431.	[bug]		ddns-confgen: Some valid key algorithms were
			not accepted. [RT #31927]
(cherry picked from commit de5890da9b)
This commit is contained in:
Evan Hunt
2012-12-05 16:37:42 -08:00
parent bd70ec1972
commit 7bf14f04e1
6 changed files with 68 additions and 1 deletions

View File

@@ -484,5 +484,24 @@ if [ $ret -ne 0 ]; then
status=1
fi
n=`expr $n + 1`
ret=0
echo "I:check TSIG key algorithms ($n)"
for alg in md5 sha1 sha224 sha256 sha384 sha512; do
$NSUPDATE -k ns1/${alg}.key <<END > /dev/null || ret=1
server 10.53.0.1 5300
update add ${alg}.keytests.nil. 600 A 10.10.10.3
send
END
done
sleep 2
for alg in md5 sha1 sha224 sha256 sha384 sha512; do
$DIG +short @10.53.0.1 -p 5300 ${alg}.keytests.nil | grep 10.10.10.3 > /dev/null 2>&1 || ret=1
done
if [ $ret -ne 0 ]; then
echo "I:failed"
status=1
fi
echo "I:exit status: $status"
exit $status