2011-08-30 05:16:15 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
#
|
2012-06-29 01:22:18 +00:00
|
|
|
* Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
|
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
|
|
* copyright notice and this permission notice appear in all copies.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
|
|
|
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
|
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
|
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
|
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
|
|
|
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
2011-08-30 05:16:15 +00:00
|
|
|
|
2012-02-23 06:53:15 +00:00
|
|
|
# $Id: sign.sh,v 1.8 2012/02/23 06:53:15 marka Exp $
|
2011-08-30 05:16:15 +00:00
|
|
|
|
|
|
|
SYSTEMTESTTOP=../..
|
|
|
|
. $SYSTEMTESTTOP/conf.sh
|
|
|
|
|
|
|
|
RANDFILE=../random.data
|
|
|
|
|
|
|
|
zone=bits
|
|
|
|
rm -f K${zone}.+*+*.key
|
|
|
|
rm -f K${zone}.+*+*.private
|
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
|
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
|
2011-10-25 01:54:22 +00:00
|
|
|
$DSFROMKEY -T 1200 $keyname >> ../ns1/root.db
|
2011-08-30 05:16:15 +00:00
|
|
|
|
|
|
|
zone=noixfr
|
|
|
|
rm -f K${zone}.+*+*.key
|
|
|
|
rm -f K${zone}.+*+*.private
|
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
|
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
|
2011-10-25 01:54:22 +00:00
|
|
|
$DSFROMKEY -T 1200 $keyname >> ../ns1/root.db
|
2011-10-26 20:56:45 +00:00
|
|
|
|
|
|
|
zone=master
|
|
|
|
rm -f K${zone}.+*+*.key
|
|
|
|
rm -f K${zone}.+*+*.private
|
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
|
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
|
|
|
|
$DSFROMKEY -T 1200 $keyname >> ../ns1/root.db
|
|
|
|
|
|
|
|
zone=dynamic
|
|
|
|
rm -f K${zone}.+*+*.key
|
|
|
|
rm -f K${zone}.+*+*.private
|
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
|
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
|
|
|
|
$DSFROMKEY -T 1200 $keyname >> ../ns1/root.db
|
2011-12-22 07:32:41 +00:00
|
|
|
|
|
|
|
zone=updated
|
|
|
|
rm -f K${zone}.+*+*.key
|
|
|
|
rm -f K${zone}.+*+*.private
|
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
|
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
|
|
|
|
$DSFROMKEY -T 1200 $keyname >> ../ns1/root.db
|
|
|
|
$SIGNER -S -O raw -L 2000042407 -o ${zone} ${zone}.db > /dev/null 2>&1
|
|
|
|
cp master2.db.in updated.db
|
2012-01-10 18:13:37 +00:00
|
|
|
|
|
|
|
# signatures are expired and should be regenerated on startup
|
|
|
|
zone=expired
|
|
|
|
rm -f K${zone}.+*+*.key
|
|
|
|
rm -f K${zone}.+*+*.private
|
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
|
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
|
|
|
|
$DSFROMKEY -T 1200 $keyname >> ../ns1/root.db
|
|
|
|
$SIGNER -PS -s 20100101000000 -e 20110101000000 -O raw -L 2000042407 -o ${zone} ${zone}.db > /dev/null 2>&1
|
2012-02-23 06:53:15 +00:00
|
|
|
|
|
|
|
zone=retransfer
|
|
|
|
rm -f K${zone}.+*+*.key
|
|
|
|
rm -f K${zone}.+*+*.private
|
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
|
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
|
|
|
|
$DSFROMKEY -T 1200 $keyname >> ../ns1/root.db
|