xref: /netbsd-src/external/mpl/bind/dist/bin/tests/system/pending/ns1/sign.sh (revision 33881f779a77dce6440bdc44610d94de75bebefe)
1#!/bin/sh
2#
3# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
4#
5# This Source Code Form is subject to the terms of the Mozilla Public
6# License, v. 2.0. If a copy of the MPL was not distributed with this
7# file, You can obtain one at http://mozilla.org/MPL/2.0/.
8#
9# See the COPYRIGHT file distributed with this work for additional
10# information regarding copyright ownership.
11
12SYSTEMTESTTOP=../..
13. $SYSTEMTESTTOP/conf.sh
14
15zone=.
16infile=root.db.in
17zonefile=root.db
18
19(cd ../ns2 && $SHELL -e sign.sh )
20
21cp ../ns2/dsset-example$TP .
22cp ../ns2/dsset-example.com$TP .
23
24keyname1=`$KEYGEN -q -a RSASHA256 -b 1024 -n zone $zone`
25keyname2=`$KEYGEN -q -a RSASHA256 -b 2048 -f KSK -n zone $zone`
26cat $infile $keyname1.key $keyname2.key > $zonefile
27
28$SIGNER -g -o $zone $zonefile > /dev/null 2>&1
29
30# Configure the resolving server with a trusted key.
31keyfile_to_trusted_keys $keyname2 > trusted.conf
32cp trusted.conf ../ns2/trusted.conf
33cp trusted.conf ../ns3/trusted.conf
34cp trusted.conf ../ns4/trusted.conf
35