xref: /netbsd-src/external/mpl/bind/dist/bin/tests/system/staticstub/ns3/sign.sh (revision 9fb66d812c00ebfb445c0b47dea128f32aa6fe96)
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 https://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=example.
16infile=example.db.in
17zonefile=example.db
18
19(cd ../ns4 && $SHELL -e sign.sh )
20
21cp ../ns4/dsset-sub.example$TP .
22
23keyname1=`$KEYGEN -q -a RSASHA256 -b 1024 -n zone $zone`
24keyname2=`$KEYGEN -q -a RSASHA256 -b 2048 -f KSK -n zone $zone`
25cat $infile $keyname1.key $keyname2.key > $zonefile
26
27$SIGNER -g -o $zone $zonefile > /dev/null
28
29# Configure the resolving server with a trusted key.
30keyfile_to_static_ds $keyname2 > trusted.conf
31
32zone=undelegated
33infile=undelegated.db.in
34zonefile=undelegated.db
35keyname1=`$KEYGEN -q -a RSASHA256 -b 1024 -n zone $zone`
36keyname2=`$KEYGEN -q -a RSASHA256 -b 2048 -f KSK -n zone $zone`
37cat $infile $keyname1.key $keyname2.key > $zonefile
38
39$SIGNER -g -o $zone $zonefile > /dev/null
40
41keyfile_to_static_ds $keyname2 >> trusted.conf
42cp trusted.conf ../ns2/trusted.conf
43