1#!/bin/sh -e
2
3# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
4#
5# SPDX-License-Identifier: MPL-2.0
6#
7# This Source Code Form is subject to the terms of the Mozilla Public
8# License, v. 2.0.  If a copy of the MPL was not distributed with this
9# file, you can obtain one at https://mozilla.org/MPL/2.0/.
10#
11# See the COPYRIGHT file distributed with this work for additional
12# information regarding copyright ownership.
13
14. ../../conf.sh
15
16# We sign the zone here and move the signed zone to ns6.
17# The ns5 server actually does not serve this zone but
18# the DS and NS records are in the test root zone, and
19# delegate to ns6.
20zone=signed.
21infile=signed.db.in
22zonefile=signed.db
23
24key1=$($KEYGEN -q -a $DEFAULT_ALGORITHM -b $DEFAULT_BITS $zone 2>/dev/null)
25key2=$($KEYGEN -q -a $DEFAULT_ALGORITHM -b $DEFAULT_BITS -fk $zone 2>/dev/null)
26
27cat $infile $key1.key $key2.key >$zonefile
28
29$SIGNER -P -g -O full -o $zone $zonefile >sign.ns5.signed.out
30
31cp signed.db.signed ../ns6
32
33# Root zone.
34zone=.
35infile=root.db.in
36zonefile=root.db
37
38key1=$($KEYGEN -q -a $DEFAULT_ALGORITHM -b $DEFAULT_BITS $zone 2>/dev/null)
39key2=$($KEYGEN -q -a $DEFAULT_ALGORITHM -b $DEFAULT_BITS -fk $zone 2>/dev/null)
40
41# cat $infile $key1.key $key2.key > $zonefile
42cat $infile dsset-signed. $key1.key $key2.key >$zonefile
43
44$SIGNER -P -g -O full -o $zone $zonefile >sign.ns5.root.out
45