2023-06-07 16:00:00 +02:00
|
|
|
#!/bin/sh
|
2021-06-03 08:37:05 +02:00
|
|
|
|
2018-02-23 09:53:12 +01:00
|
|
|
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
2012-06-29 11:39:47 +10:00
|
|
|
#
|
2021-06-03 08:37:05 +02:00
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
#
|
2016-06-27 14:56:38 +10:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
2021-06-03 08:37:05 +02:00
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
2020-09-14 16:20:40 -07:00
|
|
|
# file, you can obtain one at https://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
|
|
|
|
2020-07-21 12:12:59 +02:00
|
|
|
. ../../conf.sh
|
2010-12-16 09:51:30 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2021-10-15 00:05:36 -07:00
|
|
|
cp ../ns4/dsset-sub.example. .
|
2010-12-16 09:51:30 +00:00
|
|
|
|
2022-07-08 11:22:03 +10:00
|
|
|
keyname1=$($KEYGEN -q -a ${DEFAULT_ALGORITHM} -n zone $zone)
|
|
|
|
keyname2=$($KEYGEN -q -a ${DEFAULT_ALGORITHM} -f KSK -n zone $zone)
|
2010-12-16 09:51:30 +00:00
|
|
|
cat $infile $keyname1.key $keyname2.key > $zonefile
|
|
|
|
|
2019-07-20 18:06:16 -04:00
|
|
|
$SIGNER -g -o $zone $zonefile > /dev/null
|
2010-12-16 09:51:30 +00:00
|
|
|
|
|
|
|
# Configure the resolving server with a trusted key.
|
2019-09-18 19:41:40 -07:00
|
|
|
keyfile_to_static_ds $keyname2 > trusted.conf
|
2015-02-27 12:46:45 +11:00
|
|
|
|
|
|
|
zone=undelegated
|
|
|
|
infile=undelegated.db.in
|
|
|
|
zonefile=undelegated.db
|
2022-07-08 11:22:03 +10:00
|
|
|
keyname1=$($KEYGEN -q -a ${DEFAULT_ALGORITHM} -n zone $zone)
|
|
|
|
keyname2=$($KEYGEN -q -a ${DEFAULT_ALGORITHM} -f KSK -n zone $zone)
|
2015-02-27 12:46:45 +11:00
|
|
|
cat $infile $keyname1.key $keyname2.key > $zonefile
|
|
|
|
|
2019-07-20 18:06:16 -04:00
|
|
|
$SIGNER -g -o $zone $zonefile > /dev/null
|
2015-02-27 12:46:45 +11:00
|
|
|
|
2019-09-18 19:41:40 -07:00
|
|
|
keyfile_to_static_ds $keyname2 >> trusted.conf
|
2010-12-16 09:51:30 +00:00
|
|
|
cp trusted.conf ../ns2/trusted.conf
|