3 # Copyright (C) 2004, 2007, 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: sign.sh,v 1.6 2009/10/27 23:47:44 tbox Exp
20 .
$SYSTEMTESTTOP/conf.sh
22 RANDFILE
=..
/random.data
27 zonefile
=child1.utld.db
30 dlvsets
="$dlvsets dlvset-$zone"
32 keyname1
=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
33 keyname2
=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
35 cat $infile $keyname1.key
$keyname2.key
>$zonefile
37 $SIGNER -g -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev
/null
38 echo "I: signed $zone"
43 zonefile
=child3.utld.db
46 dlvsets
="$dlvsets dlvset-$zone"
48 keyname1
=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
49 keyname2
=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
51 cat $infile $keyname1.key
$keyname2.key
>$zonefile
53 $SIGNER -g -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev
/null
54 echo "I: signed $zone"
59 zonefile
=child4.utld.db
62 dlvsets
="$dlvsets dlvset-$zone"
64 keyname1
=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
65 keyname2
=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
67 cat $infile $keyname1.key
$keyname2.key
>$zonefile
69 $SIGNER -g -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev
/null
70 echo "I: signed $zone"
75 zonefile
=child5.utld.db
78 dlvsets
="$dlvsets dlvset-$zone"
80 keyname1
=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
81 keyname2
=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
83 cat $infile $keyname1.key
$keyname2.key
>$zonefile
85 $SIGNER -g -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev
/null
86 echo "I: signed $zone"
91 zonefile
=child7.utld.db
95 keyname1
=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
96 keyname2
=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
98 cat $infile $keyname1.key
$keyname2.key
>$zonefile
100 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev
/null
101 echo "I: signed $zone"
106 zonefile
=child8.utld.db
107 outfile
=child8.signed
110 keyname1
=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
111 keyname2
=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
113 cat $infile $keyname1.key
$keyname2.key
>$zonefile
115 $SIGNER -g -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev
/null
116 echo "I: signed $zone"
121 zonefile
=child9.utld.db
122 outfile
=child9.signed
124 dlvsets
="$dlvsets dlvset-$zone"
126 keyname1
=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
127 keyname2
=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
129 cat $infile $keyname1.key
$keyname2.key
>$zonefile
131 $SIGNER -g -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev
/null
132 echo "I: signed $zone"
136 zonefile
=child10.utld.db
137 outfile
=child10.signed
139 dlvsets
="$dlvsets dlvset-$zone"
141 keyname1
=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
142 keyname2
=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
144 cat $infile $keyname1.key
$keyname2.key
>$zonefile
146 $SIGNER -g -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev
/null
147 echo "I: signed $zone"
156 keyname1
=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
157 keyname2
=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
159 cat $infile $dlvsets $keyname1.key
$keyname2.key
>$zonefile
161 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev
/null
162 echo "I: signed $zone"
165 grep -v '^;' $keyname2.key |
$PERL -n -e '
166 local ($dn, $class, $type, $flags, $proto, $alg, @rest) = split;
167 local $key = join("", @rest);
170 "$dn" $flags $proto $alg "$key";
174 cp trusted.conf ..
/ns5