sign.sh revision bf8267aa453e5d2a735ed732a043b77a0b355b20
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews#!/bin/sh -e
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews#
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews#
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# Permission to use, copy, modify, and/or distribute this software for any
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# purpose with or without fee is hereby granted, provided that the above
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# copyright notice and this permission notice appear in all copies.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews#
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# PERFORMANCE OF THIS SOFTWARE.
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews
1864400107f7dc21e1797d602ab1f8523f599df9Mark Andrews# $Id: sign.sh,v 1.8 2012/02/23 06:53:15 marka Exp $
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark AndrewsSYSTEMTESTTOP=../..
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews. $SYSTEMTESTTOP/conf.sh
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark AndrewsRANDFILE=../random.data
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewszone=bits
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewsrm -f K${zone}.+*+*.key
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewsrm -f K${zone}.+*+*.private
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewskeyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewskeyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
b1c6de5456a5287b442de5620282902da39a4968Mark Andrews$DSFROMKEY -T 1200 $keyname >> ../ns1/root.db
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewszone=noixfr
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewsrm -f K${zone}.+*+*.key
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewsrm -f K${zone}.+*+*.private
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewskeyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewskeyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
b1c6de5456a5287b442de5620282902da39a4968Mark Andrews$DSFROMKEY -T 1200 $keyname >> ../ns1/root.db
24ef32426d91c5140d75031b6443397c6d24006cMark Andrews
24ef32426d91c5140d75031b6443397c6d24006cMark Andrewszone=master
24ef32426d91c5140d75031b6443397c6d24006cMark Andrewsrm -f K${zone}.+*+*.key
24ef32426d91c5140d75031b6443397c6d24006cMark Andrewsrm -f K${zone}.+*+*.private
24ef32426d91c5140d75031b6443397c6d24006cMark Andrewskeyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
24ef32426d91c5140d75031b6443397c6d24006cMark Andrewskeyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
24ef32426d91c5140d75031b6443397c6d24006cMark Andrews$DSFROMKEY -T 1200 $keyname >> ../ns1/root.db
24ef32426d91c5140d75031b6443397c6d24006cMark Andrews
24ef32426d91c5140d75031b6443397c6d24006cMark Andrewszone=dynamic
24ef32426d91c5140d75031b6443397c6d24006cMark Andrewsrm -f K${zone}.+*+*.key
24ef32426d91c5140d75031b6443397c6d24006cMark Andrewsrm -f K${zone}.+*+*.private
24ef32426d91c5140d75031b6443397c6d24006cMark Andrewskeyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
24ef32426d91c5140d75031b6443397c6d24006cMark Andrewskeyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
24ef32426d91c5140d75031b6443397c6d24006cMark Andrews$DSFROMKEY -T 1200 $keyname >> ../ns1/root.db
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Hunt
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Huntzone=updated
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Huntrm -f K${zone}.+*+*.key
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Huntrm -f K${zone}.+*+*.private
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Huntkeyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Huntkeyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Hunt$DSFROMKEY -T 1200 $keyname >> ../ns1/root.db
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Hunt$SIGNER -S -O raw -L 2000042407 -o ${zone} ${zone}.db > /dev/null 2>&1
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Huntcp master2.db.in updated.db
9a020198893d8389f1f3172d88ba6b16d7da3c04Evan Hunt
9a020198893d8389f1f3172d88ba6b16d7da3c04Evan Hunt# signatures are expired and should be regenerated on startup
9a020198893d8389f1f3172d88ba6b16d7da3c04Evan Huntzone=expired
9a020198893d8389f1f3172d88ba6b16d7da3c04Evan Huntrm -f K${zone}.+*+*.key
9a020198893d8389f1f3172d88ba6b16d7da3c04Evan Huntrm -f K${zone}.+*+*.private
9a020198893d8389f1f3172d88ba6b16d7da3c04Evan Huntkeyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
9a020198893d8389f1f3172d88ba6b16d7da3c04Evan Huntkeyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
9a020198893d8389f1f3172d88ba6b16d7da3c04Evan Hunt$DSFROMKEY -T 1200 $keyname >> ../ns1/root.db
9a020198893d8389f1f3172d88ba6b16d7da3c04Evan Hunt$SIGNER -PS -s 20100101000000 -e 20110101000000 -O raw -L 2000042407 -o ${zone} ${zone}.db > /dev/null 2>&1
1864400107f7dc21e1797d602ab1f8523f599df9Mark Andrews
1864400107f7dc21e1797d602ab1f8523f599df9Mark Andrewszone=retransfer
1864400107f7dc21e1797d602ab1f8523f599df9Mark Andrewsrm -f K${zone}.+*+*.key
1864400107f7dc21e1797d602ab1f8523f599df9Mark Andrewsrm -f K${zone}.+*+*.private
1864400107f7dc21e1797d602ab1f8523f599df9Mark Andrewskeyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
1864400107f7dc21e1797d602ab1f8523f599df9Mark Andrewskeyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
1864400107f7dc21e1797d602ab1f8523f599df9Mark Andrews$DSFROMKEY -T 1200 $keyname >> ../ns1/root.db