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
20 .
$SYSTEMTESTTOP/conf.sh
22 RANDFILE
=..
/random.data
26 infile
="${zonefile}.in"
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
37 infile
="${zonefile}.in"
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
48 infile
="${zonefile}.in"
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
59 infile
="${zonefile}.in"
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).
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
81 infile
="${zonefile}.in"
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
92 infile
="${zonefile}.in"
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"
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.
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}.
123 zone
=rsasha256.example
124 zonefile
="${zone}.db"
125 infile
="${zonefile}.in"
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}.
134 zone
=rsasha512.example
135 zonefile
="${zone}.db"
136 infile
="${zonefile}.in"
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}.