Blame bin/tests/system/dlv/ns2/sign.sh

Packit 5ce601
#!/bin/sh
Packit 5ce601
#
Packit 5ce601
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
Packit 5ce601
#
Packit 5ce601
# This Source Code Form is subject to the terms of the Mozilla Public
Packit 5ce601
# License, v. 2.0. If a copy of the MPL was not distributed with this
Packit Service 704ed8
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
Packit 5ce601
#
Packit 5ce601
# See the COPYRIGHT file distributed with this work for additional
Packit 5ce601
# information regarding copyright ownership.
Packit 5ce601
Packit 5ce601
SYSTEMTESTTOP=../..
Packit 5ce601
. $SYSTEMTESTTOP/conf.sh
Packit 5ce601
Packit 5ce601
SYSTESTDIR=dlv
Packit 5ce601
Packit 5ce601
(cd ../ns3 && $SHELL -e ./sign.sh || exit 1)
Packit 5ce601
Packit 5ce601
echo_i "dlv/ns2/sign.sh"
Packit 5ce601
Packit 5ce601
zone=druz.
Packit 5ce601
infile=druz.db.in
Packit 5ce601
zonefile=druz.db
Packit 5ce601
outfile=druz.pre
Packit 5ce601
dlvzone=utld.
Packit 5ce601
Packit Service d3afd5
keyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null` 
Packit Service d3afd5
keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
Packit 5ce601
Packit 5ce601
cat $infile $keyname1.key $keyname2.key >$zonefile
Packit 5ce601
Packit 5ce601
$SIGNER -r $RANDFILE -l $dlvzone -g -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
Packit 5ce601
Packit 5ce601
$CHECKZONE -q -D -i none druz druz.pre |
Packit 5ce601
sed '/IN DNSKEY/s/\([a-z0-9A-Z+/]\{10\}\)[a-z0-9A-Z+/]\{16\}/\1XXXXXXXXXXXXXXXX/'> druz.signed
Packit 5ce601
Packit 5ce601
echo_i "signed $zone"