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 http://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
15pzone=parent.nil
16czone=child.parent.nil
17
18echo_i "generating keys"
19
20# active zsk
21zsk=`$KEYGEN -q -a rsasha1 $czone`
22echo $zsk > zsk.key
23
24# not yet published or active
25pending=`$KEYGEN -q -a rsasha1 -P none -A none $czone`
26echo $pending > pending.key
27
28# published but not active
29standby=`$KEYGEN -q -a rsasha1 -A none $czone`
30echo $standby > standby.key
31
32# inactive
33inact=`$KEYGEN -q -a rsasha1 -P now-24h -A now-24h -I now $czone`
34echo $inact > inact.key
35
36# active ksk
37ksk=`$KEYGEN -q -a rsasha1 -fk $czone`
38echo $ksk > ksk.key
39
40# published but not YET active; will be active in 15 seconds
41rolling=`$KEYGEN -q -a rsasha1 -fk $czone`
42$SETTIME -A now+15s $rolling > /dev/null
43echo $rolling > rolling.key
44
45# revoked
46revoke1=`$KEYGEN -q -a rsasha1 -fk $czone`
47echo $revoke1 > prerev.key
48revoke2=`$REVOKE $revoke1`
49echo $revoke2 | sed -e 's#\./##' -e "s/\.key.*$//" > postrev.key
50
51pzsk=`$KEYGEN -q -a rsasha1 $pzone`
52echo $pzsk > parent.zsk.key
53
54pksk=`$KEYGEN -q -a rsasha1 -fk $pzone`
55echo $pksk > parent.ksk.key
56
57oldstyle=`$KEYGEN -Cq -a rsasha1 $pzone`
58echo $oldstyle > oldstyle.key
59
60