setup.sh revision 60988462e5d6db53205851d056e3482a29239be9
d0be1e954bd4674fc27f2616c72adb37cf3525a2David Lawrence#!/bin/sh -e
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# Copyright (C) 2009, 2011, 2012, 2014 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Permission to use, copy, modify, and/or distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# purpose with or without fee is hereby granted, provided that the above
d0be1e954bd4674fc27f2616c72adb37cf3525a2David Lawrence# copyright notice and this permission notice appear in all copies.
d0be1e954bd4674fc27f2616c72adb37cf3525a2David Lawrence#
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
821644d49b73b49f2abc5463bc53a3132f612478Mark Andrews# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
821644d49b73b49f2abc5463bc53a3132f612478Mark Andrews# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyer# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
ee6fe1d1975604af266af6c370fc6193dae80fddMichael Sawyer# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dfd7798d8b870abf03795d8095297a4b982ab6e9Mark Andrews# PERFORMANCE OF THIS SOFTWARE.
533df4efdafcf7a8b7292a298f45df9ab7f7f7f9Mark Andrews
10bc8ffed60f064a2950527a82d7fdffe91b6206Michael SawyerSYSTEMTESTTOP=..
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyer. $SYSTEMTESTTOP/conf.sh
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyer
5a77e9620a0b2f7417469c98be374de49d0eccc6Andreas Gustafsson$SHELL ./clean.sh
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyer
429e23d2f56d28d86439f75c13cda2b4ac5ab67bMark Andrewstest -r $RANDFILE || $GENRANDOM 400 $RANDFILE
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyer
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyerpzone=parent.nil
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyerczone=child.parent.nil
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyer
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyerecho "I:generating keys"
1988fd60faefcc65119896996e0f33d91440b1d2Andreas Gustafsson
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyer# active zsk
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyerzsk=`$KEYGEN -q -r $RANDFILE $czone`
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyerecho $zsk > zsk.key
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyer
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyer# not yet published or active
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyerpending=`$KEYGEN -q -r $RANDFILE -P none -A none $czone`
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyerecho $pending > pending.key
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyer
bd334e0366c0f21bf15de9282b02f1bed4ccde14Michael Sawyer# published but not active
standby=`$KEYGEN -q -r $RANDFILE -A none $czone`
echo $standby > standby.key
# inactive
inact=`$KEYGEN -q -r $RANDFILE -P now-24h -A now-24h -I now $czone`
echo $inact > inact.key
# active ksk
ksk=`$KEYGEN -q -r $RANDFILE -fk $czone`
echo $ksk > ksk.key
# published but not YET active; will be active in 15 seconds
rolling=`$KEYGEN -q -r $RANDFILE -fk $czone`
$SETTIME -A now+15s $rolling > /dev/null
echo $rolling > rolling.key
# revoked
revoke1=`$KEYGEN -q -r $RANDFILE -fk $czone`
echo $revoke1 > prerev.key
revoke2=`$REVOKE $revoke1`
echo $revoke2 | sed -e 's#\./##' -e "s/\.key.*$//" > postrev.key
pzsk=`$KEYGEN -q -r $RANDFILE $pzone`
echo $pzsk > parent.zsk.key
pksk=`$KEYGEN -q -r $RANDFILE -fk $pzone`
echo $pksk > parent.ksk.key
oldstyle=`$KEYGEN -Cq -r $RANDFILE $pzone`
echo $oldstyle > oldstyle.key