1#!/bin/sh -e 2# 3# Copyright (C) Internet Systems Consortium, Inc. ("ISC") 4# 5# This Source Code Form is subject to the terms of the Mozilla Public 6# License, v. 2.0. If a copy of the MPL was not distributed with this 7# file, you can obtain one at https://mozilla.org/MPL/2.0/. 8# 9# See the COPYRIGHT file distributed with this work for additional 10# information regarding copyright ownership. 11 12SYSTEMTESTTOP=.. 13. $SYSTEMTESTTOP/conf.sh 14 15test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE 16 17pzone=parent.nil 18czone=child.parent.nil 19 20echo_i "generating keys" 21 22# active zsk 23zsk=`$KEYGEN -q -r $RANDFILE $czone` 24echo $zsk > zsk.key 25 26# not yet published or active 27pending=`$KEYGEN -q -r $RANDFILE -P none -A none $czone` 28echo $pending > pending.key 29 30# published but not active 31standby=`$KEYGEN -q -r $RANDFILE -A none $czone` 32echo $standby > standby.key 33 34# inactive 35inact=`$KEYGEN -q -r $RANDFILE -P now-24h -A now-24h -I now $czone` 36echo $inact > inact.key 37 38# active ksk 39ksk=`$KEYGEN -q -r $RANDFILE -fk $czone` 40echo $ksk > ksk.key 41 42# published but not YET active; will be active in 15 seconds 43rolling=`$KEYGEN -q -r $RANDFILE -fk $czone` 44$SETTIME -A now+15s $rolling > /dev/null 45echo $rolling > rolling.key 46 47# revoked 48revoke1=`$KEYGEN -q -r $RANDFILE -fk $czone` 49echo $revoke1 > prerev.key 50revoke2=`$REVOKE $revoke1` 51echo $revoke2 | sed -e 's#\./##' -e "s/\.key.*$//" > postrev.key 52 53pzsk=`$KEYGEN -q -r $RANDFILE $pzone` 54echo $pzsk > parent.zsk.key 55 56pksk=`$KEYGEN -q -r $RANDFILE -fk $pzone` 57echo $pksk > parent.ksk.key 58 59oldstyle=`$KEYGEN -Cq -r $RANDFILE $pzone` 60echo $oldstyle > oldstyle.key 61 62