Commit d58e33bf authored by Evan Hunt's avatar Evan Hunt

[master] testcrypto.sh in system tests

3714.	[test]		System tests that need to test for cryptography
			support before running can now use a common
			"testcrypto.sh" script to do so. [RT #35213]
parent e45d0508
3714. [test] System tests that need to test for cryptography
support before running can now use a common
"testcrypto.sh" script to do so. [RT #35213]
3713. [bug] Save memory by not storing "also-notify" addresses
in zone objects that are configured not to send
notify requests. [RT #35195]
......
......@@ -37,6 +37,7 @@ test: subdirs
testclean clean distclean::
if test -f ./cleanall.sh; then sh ./cleanall.sh; fi
rm -f systests.output
rm -f random.data
distclean::
rm -f conf.sh
......
......@@ -14,8 +14,6 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: clean.sh,v 1.15 2012/02/06 23:46:45 tbox Exp $
rm -f */K* */dsset-* */*.signed */trusted.conf */tmp* */*.jnl */*.bk
rm -f active.key inact.key del.key unpub.key standby.key rev.key
rm -f nopriv.key vanishing.key del1.key del2.key
......@@ -26,7 +24,6 @@ rm -f */core
rm -f */example.bk
rm -f */named.memstats
rm -f dig.out.*
rm -f random.data
rm -f ns1/root.db
rm -f ns2/example.db
rm -f ns2/private.secure.example.db ns2/bar.db
......
......@@ -19,8 +19,6 @@
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=../random.data
zone=.
zonefile=root.db
infile=root.db.in
......
......@@ -19,8 +19,6 @@
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=../random.data
# Have the child generate subdomain keys and pass DS sets to us.
( cd ../ns3 && sh keygen.sh )
......
......@@ -19,8 +19,6 @@
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=../random.data
dumpit () {
echo "D:${debug}: dumping ${1}"
cat "${1}" | sed 's/^/D:/'
......
......@@ -14,18 +14,4 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: prereq.sh,v 1.5 2010/01/18 23:48:39 tbox Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
../../../tools/genrandom 400 random.data
if $KEYGEN -q -a RSAMD5 -b 512 -n zone -r random.data foo > /dev/null 2>&1
then
rm -f Kfoo*
else
echo "I:This test requires cryptography" >&2
echo "I:--with-openssl, or --with-pkcs11 and --enable-native-pkcs11" >&2
exit 1
fi
exec sh ../testcrypto.sh
......@@ -14,14 +14,12 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: setup.sh,v 1.5 2010/01/18 23:48:39 tbox Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
. ./clean.sh
echo "I:generating keys and preparing zones"
. ./clean.sh
../../../tools/genrandom 400 random.data
test -e $RANDFILE || $GENRANDOM 400 $RANDFILE
echo "I:generating keys and preparing zones"
cd ns1 && sh keygen.sh
......@@ -14,13 +14,9 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id$
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=random.data
status=0
n=0
......
......@@ -56,6 +56,9 @@ VERIFY=$TOP/bin/dnssec/dnssec-verify
ARPANAME=$TOP/bin/tools/arpaname
RESOLVE=$TOP/lib/samples/resolve
RRCHECKER=$TOP/bin/tools/named-rrchecker
GENRANDOM=$TOP/bin/tools/genrandom
RANDFILE=$TOP/bin/tests/system/random.data
# The "stress" test is not run by default since it creates enough
# load on the machine to make it unusable to other users.
......
......@@ -18,4 +18,3 @@ rm -f named-compilezone
rm -f */K*.key
rm -f */K*.private
rm -rf coverage.*
rm -f random.data
#!/bin/sh
#
# Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# 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.
exec sh ../testcrypto.sh
......@@ -17,12 +17,11 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
KEYGEN="$KEYGEN -qr random.data"
KEYGEN="$KEYGEN -qr $RANDFILE"
sh clean.sh
ln -s $CHECKZONE named-compilezone
../../../tools/genrandom 400 random.data
# Test 1: KSK goes inactive before successor is active
dir=01-ksk-inactive
......
......@@ -14,9 +14,6 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: clean.sh,v 1.9 2011/05/26 23:47:28 tbox Exp $
rm -f random.data
rm -f ns*/named.run
rm -f ns1/K*
rm -f ns1/dsset-*
......
......@@ -23,8 +23,6 @@ echo "I:dlv/ns1/sign.sh"
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=../random.data
zone=.
infile=root.db.in
zonefile=root.db
......
......@@ -23,8 +23,6 @@ echo "I:dlv/ns2/sign.sh"
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=../random.data
zone=druz.
infile=druz.db.in
zonefile=druz.db
......
......@@ -23,7 +23,6 @@ echo "I:dlv/ns3/sign.sh"
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=../random.data
dlvzone=dlv.utld.
dlvsets=
dssets=
......
......@@ -14,15 +14,11 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: sign.sh,v 1.5 2011/05/26 23:47:28 tbox Exp $
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
echo "I:dlv/ns6/sign.sh"
RANDFILE=../random.data
zone=grand.child1.utld.
infile=child.db.in
zonefile=grand.child1.utld.db
......
#!/bin/sh
#
# Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# 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.
exec sh ../testcrypto.sh
......@@ -14,8 +14,9 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: setup.sh,v 1.8 2011/05/26 23:47:28 tbox Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
../../../tools/genrandom 400 random.data
test -e $RANDFILE || $GENRANDOM 400 $RANDFILE
(cd ns1 && sh -e sign.sh)
......@@ -12,9 +12,6 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: clean.sh,v 1.3 2011/03/03 16:16:43 each Exp $
rm -f random.data
rm -f ns1/K*
rm -f ns1/*.signed
rm -f ns1/*.db
......
......@@ -14,13 +14,9 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: sign.sh,v 1.3 2011/03/03 16:16:46 each Exp $
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=../random.data
zone=dlv.isc.org
infile=dlv.isc.org.db.in
zonefile=dlv.isc.org.db
......
#!/bin/sh
#
# Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# 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.
exec sh ../testcrypto.sh
......@@ -14,10 +14,11 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: setup.sh,v 1.2 2011/03/01 22:44:04 marka Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
sh clean.sh
../../../tools/genrandom 400 random.data
test -e $RANDFILE || $GENRANDOM 400 $RANDFILE
cd ns1 && sh sign.sh
......@@ -6,5 +6,4 @@
rm -f ns1/update.txt
rm -f */named.memstats
rm -f ns1/ddns.key
rm -f random.data
rm -f dig.out*
......@@ -14,10 +14,6 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: prereq.sh,v 1.7 2011/03/20 09:03:47 marka Exp $
TOP=${SYSTEMTESTTOP:=.}/../../../..
./dlopen || {
echo "I:dlopen() not supported - skipping dlzexternal test"
exit 255
......
......@@ -14,10 +14,9 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: setup.sh,v 1.3 2010/12/20 23:47:20 tbox Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
../../../tools/genrandom 400 random.data
$DDNSCONFGEN -q -r random.data -z example.nil > ns1/ddns.key
test -e $RANDFILE || $GENRANDOM 400 $RANDFILE
$DDNSCONFGEN -q -r $RANDFILE -z example.nil > ns1/ddns.key
......@@ -14,11 +14,8 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: clean.sh,v 1.4 2010/12/18 02:12:43 each Exp $
rm -f ns1/K*
rm -f ns1/signed.db*
rm -f ns1/dsset-signed.
rm -f */named.memstats
rm -f dig.out.* random.data
rm -f dig.out.*
......@@ -19,8 +19,6 @@
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=../random.data
zone=signed
infile=example.db
zonefile=signed.db
......
#!/bin/sh
#
# Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# 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.
exec sh ../testcrypto.sh
......@@ -14,10 +14,11 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: setup.sh,v 1.4 2010/12/18 11:45:01 marka Exp $
sh clean.sh
../../../tools/genrandom 400 random.data
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -e $RANDFILE || $GENRANDOM 400 $RANDFILE
cd ns1 && sh sign.sh
......@@ -15,8 +15,6 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: clean.sh,v 1.48 2012/02/22 23:47:34 tbox Exp $
rm -f */K* */keyset-* */dsset-* */dlvset-* */signedkey-* */*.signed
rm -f */trusted.conf */managed.conf */tmp* */*.jnl */*.bk */*.jbk
rm -f ns1/root.db ns2/example.db ns3/secure.example.db
......@@ -32,7 +30,6 @@ rm -f ns2/nsec3chain-test.db
rm -f */example.bk
rm -f dig.out.*
rm -f resolve.out*
rm -f random.data
rm -f ns2/dlv.db
rm -f ns3/multiple.example.db ns3/nsec3-unknown.example.db ns3/nsec3.example.db
rm -f ns3/optout-unknown.example.db ns3/optout.example.db
......
......@@ -20,8 +20,6 @@
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=../random.data
zone=.
infile=root.db.in
zonefile=root.db
......
......@@ -20,8 +20,6 @@
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=../random.data
zone=example.
infile=example.db.in
zonefile=example.db
......
......@@ -20,8 +20,6 @@
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=../random.data
zone=secure.example.
infile=secure.example.db.in
zonefile=secure.example.db
......
......@@ -19,8 +19,6 @@
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=../random.data
zone=optout-tld
infile=optout-tld.db.in
zonefile=optout-tld.db
......
......@@ -15,15 +15,4 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: prereq.sh,v 1.13 2009/10/28 00:27:10 marka Exp $
../../../tools/genrandom 400 random.data
if $KEYGEN -q -a RSAMD5 -b 512 -n zone -r random.data foo > /dev/null 2>&1
then
rm -f Kfoo*
else
echo "I:This test requires cryptography" >&2
echo "I:--with-openssl, or --with-pkcs11 and --enable-native-pkcs11" >&2
exit 1
fi
exec sh ../testcrypto.sh
......@@ -15,11 +15,12 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: setup.sh,v 1.20 2011/02/15 22:02:36 marka Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
sh clean.sh
../../../tools/genrandom 400 random.data
test -e $RANDFILE || $GENRANDOM 400 $RANDFILE
cd ns1 && sh sign.sh
......
......@@ -20,8 +20,6 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=random.data
status=0
n=1
......@@ -1741,7 +1739,7 @@ echo "I:checking that the NSEC3 record for the apex is properly signed when a DN
ret=0
(
cd ns3
kskname=`$KEYGEN -q -3 -r ../random.data -fk update-nsec3.example`
kskname=`$KEYGEN -q -3 -r $RANDFILE -fk update-nsec3.example`
(
echo zone update-nsec3.example
echo server 10.53.0.3 5300
......@@ -2115,7 +2113,6 @@ ret=0
$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 freeze expiring.example 2>&1 | sed 's/^/I:ns3 /'
(
cd ns3
RANDFILE=../random.data
for file in K*.moved; do
mv $file `basename $file .moved`
done
......
......@@ -14,14 +14,11 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id$
rm -f supported
rm -f */K* */dsset-* */*.signed */trusted.conf
rm -f ns1/root.db
rm -f ns1/signer.err
rm -f ns2/good.db ns2/bad.db
rm -f dig.out*
rm -f random.data
rm -f */named.run
rm -f */named.memstats
......@@ -19,8 +19,6 @@
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=../random.data
zone=.
infile=root.db.in
zonefile=root.db
......
......@@ -19,8 +19,6 @@
SYSTEMTESTTOP=../..
. $SYSTEMTESTTOP/conf.sh
RANDFILE=../random.data
zone1=good.
infile1=good.db.in
zonefile1=good.db
......
......@@ -14,16 +14,12 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id$
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
../../../tools/genrandom 400 random.data
gostfail=0 ecdsafail=0
$KEYGEN -q -a eccgost test > /dev/null 2>&1 || gostfail=1
$KEYGEN -q -a ecdsap256sha256 test > /dev/null 2>&1 || ecdsafail=1
rm -f Ktest* random.data
sh ../testcrypto.sh -q gost || gostfail=1
sh ../testcrypto.sh -q ecdsa || ecdsafail=1
if [ $gostfail = 0 -a $ecdsafail = 0 ]; then
echo both > supported
......
......@@ -14,8 +14,9 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id$
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
../../../tools/genrandom 400 random.data
test -e $RANDFILE || $GENRANDOM 400 $RANDFILE
cd ns1 && sh sign.sh
......@@ -14,12 +14,9 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id$
rm -f */K* */dsset-* */*.signed */trusted.conf
rm -f ns1/root.db
rm -f ns1/signer.err
rm -f dig.out*
rm -f random.data
rm -f */named.run
rm -f */named.memstats
......@@ -14,13 +14,9 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.