No empty .Rs/.Re
[netbsd-mini2440.git] / external / bsd / bind / dist / bin / tests / system / autosign / ns3 / keygen.sh
blobf0114043750a429a1358bd7936510a613eaecdf7
1 #!/bin/sh -e
3 # Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
9 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 # PERFORMANCE OF THIS SOFTWARE.
17 # Id: keygen.sh,v 1.3 2009/11/30 23:48:02 tbox Exp
19 SYSTEMTESTTOP=../..
20 . $SYSTEMTESTTOP/conf.sh
22 RANDFILE=../random.data
24 zone=secure.example
25 zonefile="${zone}.db"
26 infile="${zonefile}.in"
27 cp $infile $zonefile
28 ksk=`$KEYGEN -q -r $RANDFILE -fk $zone`
29 $KEYGEN -q -r $RANDFILE $zone > /dev/null
30 $DSFROMKEY $ksk.key > dsset-${zone}.
33 # NSEC3/NSEC test zone
35 zone=secure.nsec3.example
36 zonefile="${zone}.db"
37 infile="${zonefile}.in"
38 cp $infile $zonefile
39 ksk=`$KEYGEN -q -3 -r $RANDFILE -fk $zone`
40 $KEYGEN -q -3 -r $RANDFILE $zone > /dev/null
41 $DSFROMKEY $ksk.key > dsset-${zone}.
44 # NSEC3/NSEC3 test zone
46 zone=nsec3.nsec3.example
47 zonefile="${zone}.db"
48 infile="${zonefile}.in"
49 cp $infile $zonefile
50 ksk=`$KEYGEN -q -3 -r $RANDFILE -fk $zone`
51 $KEYGEN -q -3 -r $RANDFILE $zone > /dev/null
52 $DSFROMKEY $ksk.key > dsset-${zone}.
55 # OPTOUT/NSEC3 test zone
57 zone=optout.nsec3.example
58 zonefile="${zone}.db"
59 infile="${zonefile}.in"
60 cp $infile $zonefile
61 ksk=`$KEYGEN -q -3 -r $RANDFILE -fk $zone`
62 $KEYGEN -q -3 -r $RANDFILE $zone > /dev/null
63 $DSFROMKEY $ksk.key > dsset-${zone}.
66 # A nsec3 zone (non-optout).
68 zone=nsec3.example
69 zonefile="${zone}.db"
70 infile="${zonefile}.in"
71 cat $infile dsset-*.${zone}. > $zonefile
72 ksk=`$KEYGEN -q -3 -r $RANDFILE -fk $zone`
73 $KEYGEN -q -3 -r $RANDFILE $zone > /dev/null
74 $DSFROMKEY $ksk.key > dsset-${zone}.
77 # OPTOUT/NSEC test zone
79 zone=secure.optout.example
80 zonefile="${zone}.db"
81 infile="${zonefile}.in"
82 cp $infile $zonefile
83 ksk=`$KEYGEN -q -3 -r $RANDFILE -fk $zone`
84 $KEYGEN -q -3 -r $RANDFILE $zone > /dev/null
85 $DSFROMKEY $ksk.key > dsset-${zone}.
88 # OPTOUT/NSEC3 test zone
90 zone=nsec3.optout.example
91 zonefile="${zone}.db"
92 infile="${zonefile}.in"
93 cp $infile $zonefile
94 ksk=`$KEYGEN -q -3 -r $RANDFILE -fk $zone`
95 $KEYGEN -q -3 -r $RANDFILE $zone > /dev/null
96 $DSFROMKEY $ksk.key > dsset-${zone}.
99 # OPTOUT/OPTOUT test zone
101 zone=optout.optout.example
102 zonefile="${zone}.db"
103 infile="${zonefile}.in"
104 cp $infile $zonefile
105 ksk=`$KEYGEN -q -r $RANDFILE -fk $zone`
106 $KEYGEN -q -r $RANDFILE $zone > /dev/null
107 $DSFROMKEY $ksk.key > dsset-${zone}.
110 # A optout nsec3 zone.
112 zone=optout.example
113 zonefile="${zone}.db"
114 infile="${zonefile}.in"
115 cat $infile dsset-*.${zone}. > $zonefile
116 ksk=`$KEYGEN -q -3 -r $RANDFILE -fk $zone`
117 $KEYGEN -q -3 -r $RANDFILE $zone > /dev/null
118 $DSFROMKEY $ksk.key > dsset-${zone}.
121 # A RSASHA256 zone.
123 zone=rsasha256.example
124 zonefile="${zone}.db"
125 infile="${zonefile}.in"
126 cp $infile $zonefile
127 ksk=`$KEYGEN -q -a RSASHA256 -b 2048 -r $RANDFILE -fk $zone`
128 $KEYGEN -q -a RSASHA256 -b 1024 -r $RANDFILE $zone > /dev/null
129 $DSFROMKEY $ksk.key > dsset-${zone}.
132 # A RSASHA512 zone.
134 zone=rsasha512.example
135 zonefile="${zone}.db"
136 infile="${zonefile}.in"
137 cp $infile $zonefile
138 ksk=`$KEYGEN -q -a RSASHA512 -b 2048 -r $RANDFILE -fk $zone`
139 $KEYGEN -q -a RSASHA512 -b 1024 -r $RANDFILE $zone > /dev/null
140 $DSFROMKEY $ksk.key > dsset-${zone}.