diff options
Diffstat (limited to 'bin/tests/system/dnssec/tests.sh')
-rw-r--r-- | bin/tests/system/dnssec/tests.sh | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index 9ddd5184..ccebaa29 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -15,7 +15,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: tests.sh,v 1.93 2011-09-02 21:55:16 each Exp $ +# $Id: tests.sh,v 1.97 2011-10-11 19:26:06 each Exp $ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh @@ -982,11 +982,13 @@ cd signer cat example.db.in $key1.key $key2.key > example.db $SIGNER -3 - -H 10 -o example -f example.db example.db > /dev/null 2>&1 awk '/^IQF9LQTLK/ { - printf("%s ", $0); - getline; - printf ("%s ", $0); - getline; - print; + printf("%s", $0); + while (!index($0, ")")) { + if (getline <= 0) + break; + printf (" %s", $0); + } + printf("\n"); }' example.db | sed 's/[ ][ ]*/ /g' > nsec3param.out grep "IQF9LQTLKKNFK0KVIFELRAK4IC4QLTMG.example. 0 IN NSEC3 1 0 10 - ( IQF9LQTLKKNFK0KVIFELRAK4IC4QLTMG A NS SOA RRSIG DNSKEY NSEC3PARAM )" nsec3param.out > /dev/null @@ -1048,6 +1050,26 @@ n=`expr $n + 1` if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` +echo "I:checking dnssec-signzone retains unexpired signatures ($n)" +ret=0 +( +cd signer +$SIGNER -Sxt -o example example.db > signer.out.1 2>&1 +$SIGNER -Sxt -o example -f example.db.signed example.db.signed > signer.out.2 2>&1 +) || ret=1 +gen1=`awk '/generated/ {print $3}' signer/signer.out.1` +retain1=`awk '/retained/ {print $3}' signer/signer.out.1` +drop1=`awk '/dropped/ {print $3}' signer/signer.out.1` +gen2=`awk '/generated/ {print $3}' signer/signer.out.2` +retain2=`awk '/retained/ {print $3}' signer/signer.out.2` +drop2=`awk '/dropped/ {print $3}' signer/signer.out.2` +[ "$retain2" -eq `expr "$gen1" + "$retain1"` ] || ret=1 +[ "$gen2" -eq 0 ] || ret=1 +[ "$drop2" -eq 0 ] || ret=1 +n=`expr $n + 1` +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + echo "I:checking validated data are not cached longer than originalttl ($n)" ret=0 $DIG $DIGOPTS +ttl +noauth a.ttlpatch.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1 |