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