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