diff options
Diffstat (limited to 'bin/tests/system/gost')
-rw-r--r-- | bin/tests/system/gost/clean.sh | 18 | ||||
-rw-r--r-- | bin/tests/system/gost/ns1/named.conf | 35 | ||||
-rw-r--r-- | bin/tests/system/gost/ns1/root.db.in | 19 | ||||
-rw-r--r-- | bin/tests/system/gost/ns1/sign.sh | 38 | ||||
-rw-r--r-- | bin/tests/system/gost/ns2/named.conf | 35 | ||||
-rw-r--r-- | bin/tests/system/gost/prereq.sh | 15 | ||||
-rw-r--r-- | bin/tests/system/gost/setup.sh | 17 | ||||
-rw-r--r-- | bin/tests/system/gost/tests.sh | 35 |
8 files changed, 212 insertions, 0 deletions
diff --git a/bin/tests/system/gost/clean.sh b/bin/tests/system/gost/clean.sh new file mode 100644 index 0000000..3779676 --- /dev/null +++ b/bin/tests/system/gost/clean.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + +rm -f */K* */dsset-* */*.signed */trusted.conf +rm -f ns1/root.db +rm -f ns1/signer.err +rm -f dig.out* +rm -f */named.run +rm -f */named.memstats +rm -f ns*/named.lock diff --git a/bin/tests/system/gost/ns1/named.conf b/bin/tests/system/gost/ns1/named.conf new file mode 100644 index 0000000..715f7d3 --- /dev/null +++ b/bin/tests/system/gost/ns1/named.conf @@ -0,0 +1,35 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +// NS1 + +controls { /* empty */ }; + +options { + query-source address 10.53.0.1; + notify-source 10.53.0.1; + transfer-source 10.53.0.1; + port 5300; + pid-file "named.pid"; + listen-on { 10.53.0.1; }; + listen-on-v6 { none; }; + recursion no; + notify yes; + dnssec-enable yes; + dnssec-validation yes; +}; + +zone "." { + type master; + file "root.db.signed"; +}; + +include "trusted.conf"; diff --git a/bin/tests/system/gost/ns1/root.db.in b/bin/tests/system/gost/ns1/root.db.in new file mode 100644 index 0000000..e882893 --- /dev/null +++ b/bin/tests/system/gost/ns1/root.db.in @@ -0,0 +1,19 @@ +; Copyright (C) Internet Systems Consortium, Inc. ("ISC") +; +; This Source Code Form is subject to the terms of the Mozilla Public +; License, v. 2.0. If a copy of the MPL was not distributed with this +; file, You can obtain one at http://mozilla.org/MPL/2.0/. +; +; See the COPYRIGHT file distributed with this work for additional +; information regarding copyright ownership. + +$TTL 300 +. IN SOA marka.isc.org. a.root.servers.nil. ( + 2010121600 ; serial + 600 ; refresh + 600 ; retry + 1200 ; expire + 600 ; minimum + ) +. NS a.root-servers.nil. +a.root-servers.nil. A 10.53.0.1 diff --git a/bin/tests/system/gost/ns1/sign.sh b/bin/tests/system/gost/ns1/sign.sh new file mode 100644 index 0000000..bdd78d5 --- /dev/null +++ b/bin/tests/system/gost/ns1/sign.sh @@ -0,0 +1,38 @@ +#!/bin/sh -e +# +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + +SYSTEMTESTTOP=../.. +. $SYSTEMTESTTOP/conf.sh + +zone=. +infile=root.db.in +zonefile=root.db + +key1=`$KEYGEN -q -r $RANDFILE -a ECCGOST -n zone $zone` +key2=`$KEYGEN -q -r $RANDFILE -a ECCGOST -n zone -f KSK $zone` +$DSFROMKEY -a gost $key2.key > dsset-gost + +cat $infile $key1.key $key2.key > $zonefile + +$SIGNER -P -g -r $RANDFILE -o $zone $zonefile > /dev/null 2> signer.err || cat signer.err + +# Configure the resolving server with a trusted key. + +cat $key1.key | grep -v '^; ' | $PERL -n -e ' +local ($dn, $class, $type, $flags, $proto, $alg, @rest) = split; +local $key = join("", @rest); +print <<EOF +trusted-keys { + "$dn" $flags $proto $alg "$key"; +}; +EOF +' > trusted.conf +cp trusted.conf ../ns2/trusted.conf diff --git a/bin/tests/system/gost/ns2/named.conf b/bin/tests/system/gost/ns2/named.conf new file mode 100644 index 0000000..50621a5 --- /dev/null +++ b/bin/tests/system/gost/ns2/named.conf @@ -0,0 +1,35 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +// NS2 + +controls { /* empty */ }; + +options { + query-source address 10.53.0.2; + notify-source 10.53.0.2; + transfer-source 10.53.0.2; + port 5300; + pid-file "named.pid"; + listen-on { 10.53.0.2; }; + listen-on-v6 { none; }; + recursion yes; + notify yes; + dnssec-enable yes; + dnssec-validation yes; +}; + +zone "." { + type hint; + file "../../common/root.hint"; +}; + +include "trusted.conf"; diff --git a/bin/tests/system/gost/prereq.sh b/bin/tests/system/gost/prereq.sh new file mode 100644 index 0000000..f5295b7 --- /dev/null +++ b/bin/tests/system/gost/prereq.sh @@ -0,0 +1,15 @@ +#!/bin/sh -e +# +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + +SYSTEMTESTTOP=.. +. $SYSTEMTESTTOP/conf.sh + +exec $SHELL ../testcrypto.sh gost diff --git a/bin/tests/system/gost/setup.sh b/bin/tests/system/gost/setup.sh new file mode 100644 index 0000000..96b421c --- /dev/null +++ b/bin/tests/system/gost/setup.sh @@ -0,0 +1,17 @@ +#!/bin/sh -e +# +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + +SYSTEMTESTTOP=.. +. $SYSTEMTESTTOP/conf.sh + +test -r $RANDFILE || $GENRANDOM 400 $RANDFILE + +cd ns1 && $SHELL sign.sh diff --git a/bin/tests/system/gost/tests.sh b/bin/tests/system/gost/tests.sh new file mode 100644 index 0000000..516f0c1 --- /dev/null +++ b/bin/tests/system/gost/tests.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + +SYSTEMTESTTOP=.. +. $SYSTEMTESTTOP/conf.sh + +status=0 +n=0 + +rm -f dig.out.* + +DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p 5300" + +# Check the example. domain + +echo "I:checking that positive validation works ($n)" +ret=0 +$DIG $DIGOPTS . @10.53.0.1 soa > dig.out.ns1.test$n || ret=1 +$DIG $DIGOPTS . @10.53.0.2 soa > dig.out.ns2.test$n || ret=1 +$PERL ../digcomp.pl dig.out.ns1.test$n dig.out.ns2.test$n || ret=1 +grep "flags:.*ad.*QUERY" dig.out.ns2.test$n > /dev/null || ret=1 +n=`expr $n + 1` +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + +echo "I:exit status: $status" +[ $status -eq 0 ] || exit 1 |