tests.sh revision ffd297db793b3efa3854f32f443b9f79e0417f2c
#
# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
#
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: tests.sh,v 1.3 2009/11/30 23:48:02 tbox Exp $
status=0
n=0
pending=`sed s/^K${czone}.+005+0*// < pending.key`
postrev=`sed s/^K${czone}.+005+0*// < postrev.key`
prerev=`sed s/^K${czone}.+005+0*// < prerev.key`
rolling=`sed s/^K${czone}.+005+0*// < rolling.key`
standby=`sed s/^K${czone}.+005+0*// < standby.key`
echo "I:signing zones"
type = $3;
getline;
id = $2;
if ($3 ~ CZ) {
print type, id
}
awk '$2 ~ /DNSKEY/ {
flags = $3;
while ($0 !~ "key id =")
getline;
id = $6;
print flags, id;
echo "I:checking that KSK signed DNSKEY only ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking that ZSK signed ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking that standby ZSK did not sign ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking that inactive key did not sign ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking that pending key was not published ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking that standby KSK did not sign but is delegated ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking that key was revoked ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking that revoked key self-signed ($n)"
ret=0
n=`expr $n + 1`
echo "I:waiting 20 seconds for key changes to occur"
sleep 20
echo "I:re-signing zone"
echo "I:checking that standby KSK is now active ($n)"
ret=0
n=`expr $n + 1`
echo "I:exit status: $status"
exit $status