xref: /netbsd-src/external/mpl/bind/dist/bin/tests/system/nsupdate/ns3/sign.sh (revision d90047b5d07facf36e6c01dcc0bded8997ce9cc2)
1#!/bin/sh -e
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=nsec3param.test.
16infile=nsec3param.test.db.in
17zonefile=nsec3param.test.db
18
19keyname1=`$KEYGEN -q -a NSEC3RSASHA1 -b 1024 -n zone -f KSK $zone`
20keyname2=`$KEYGEN -q -a NSEC3RSASHA1 -b 1024 -n zone $zone`
21
22cat $infile $keyname1.key $keyname2.key >$zonefile
23
24$SIGNER -P -3 - -H 1 -o $zone -k $keyname1 $zonefile $keyname2 > /dev/null
25
26zone=dnskey.test.
27infile=dnskey.test.db.in
28zonefile=dnskey.test.db
29
30keyname1=`$KEYGEN -q -a RSASHA1 -b 1024 -n zone -f KSK $zone`
31keyname2=`$KEYGEN -q -a RSASHA1 -b 1024 -n zone $zone`
32
33cat $infile $keyname1.key $keyname2.key >$zonefile
34
35$SIGNER -P -o $zone -k $keyname1 $zonefile $keyname2 > /dev/null
36
37zone=delegation.test.
38infile=delegation.test.db.in
39zonefile=delegation.test.db
40
41keyname1=`$KEYGEN -q -a RSASHA256 -3 -f KSK $zone`
42keyname2=`$KEYGEN -q -a RSASHA256 -3 $zone`
43
44cat $infile $keyname1.key $keyname2.key >$zonefile
45
46$SIGNER -A -3 - -P -o $zone -k $keyname1 $zonefile $keyname2 > /dev/null
47