2010-12-16 09:51:30 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2018-02-23 09:53:12 +01:00
|
|
|
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
2012-06-29 11:39:47 +10:00
|
|
|
#
|
2016-06-27 14:56:38 +10:00
|
|
|
# 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/.
|
2018-02-23 09:53:12 +01:00
|
|
|
#
|
|
|
|
# See the COPYRIGHT file distributed with this work for additional
|
|
|
|
# information regarding copyright ownership.
|
2010-12-16 09:51:30 +00:00
|
|
|
|
|
|
|
SYSTEMTESTTOP=../..
|
|
|
|
. $SYSTEMTESTTOP/conf.sh
|
|
|
|
|
|
|
|
zone=example.
|
2010-12-17 00:57:39 +00:00
|
|
|
infile=example.db.in
|
|
|
|
zonefile=example.db
|
2010-12-16 09:51:30 +00:00
|
|
|
|
2014-05-06 22:06:04 -07:00
|
|
|
(cd ../ns4 && $SHELL -e sign.sh )
|
2010-12-16 09:51:30 +00:00
|
|
|
|
2016-10-19 17:18:42 +02:00
|
|
|
cp ../ns4/dsset-sub.example$TP .
|
2010-12-16 09:51:30 +00:00
|
|
|
|
2018-04-24 16:01:23 +02:00
|
|
|
keyname1=`$KEYGEN -q -a RSASHA256 -b 1024 -n zone $zone`
|
|
|
|
keyname2=`$KEYGEN -q -a RSASHA256 -b 2048 -f KSK -n zone $zone`
|
2010-12-16 09:51:30 +00:00
|
|
|
cat $infile $keyname1.key $keyname2.key > $zonefile
|
|
|
|
|
2018-04-24 16:01:23 +02:00
|
|
|
$SIGNER -g -o $zone $zonefile > /dev/null 2>&1
|
2010-12-16 09:51:30 +00:00
|
|
|
|
|
|
|
# Configure the resolving server with a trusted key.
|
2019-06-04 18:36:59 -07:00
|
|
|
keyfile_to_static_keys $keyname2 > trusted.conf
|
2015-02-27 12:46:45 +11:00
|
|
|
|
|
|
|
zone=undelegated
|
|
|
|
infile=undelegated.db.in
|
|
|
|
zonefile=undelegated.db
|
2018-04-24 16:01:23 +02:00
|
|
|
keyname1=`$KEYGEN -q -a RSASHA256 -b 1024 -n zone $zone`
|
|
|
|
keyname2=`$KEYGEN -q -a RSASHA256 -b 2048 -f KSK -n zone $zone`
|
2015-02-27 12:46:45 +11:00
|
|
|
cat $infile $keyname1.key $keyname2.key > $zonefile
|
|
|
|
|
2018-04-24 16:01:23 +02:00
|
|
|
$SIGNER -g -o $zone $zonefile > /dev/null 2>&1
|
2015-02-27 12:46:45 +11:00
|
|
|
|
2019-06-04 18:36:59 -07:00
|
|
|
keyfile_to_static_keys $keyname2 >> trusted.conf
|
2010-12-16 09:51:30 +00:00
|
|
|
cp trusted.conf ../ns2/trusted.conf
|