0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (C) 2004, 2007, 2009-2012, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# file, You can obtain one at http://mozilla.org/MPL/2.0/.
60988462e5d6db53205851d056e3482a29239be9Evan Hunt(cd ../ns6 && $SHELL -e ./sign.sh)
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidsfilename=../ns6/dsset-grand.`echo $zone |sed -e "s/\.$//g"`$TP
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickicat $infile $keyname1.key $keyname2.key $dsfilename >$zonefile
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrews$SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewsecho "I: signed $zone"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidsfilename=../ns6/dsset-grand.`echo $zone |sed -e "s/\.$//g"`$TP
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickicat $infile $keyname1.key $keyname2.key $dsfilename >$zonefile
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrews$SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewsecho "I: signed $zone"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewscat $infile $keyname1.key $keyname2.key >$zonefile
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrews$SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewsecho "I: signed $zone"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidsfilename=../ns6/dsset-grand.`echo $zone |sed -e "s/\.$//g"`$TP
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickicat $infile $keyname1.key $keyname2.key $dsfilename >$zonefile
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrews$SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewsecho "I: signed $zone"
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidsfilename=../ns6/dsset-grand.`echo $zone |sed -e "s/\.$//g"`$TP
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickicat $infile $keyname1.key $keyname2.key $dsfilename >$zonefile
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrews$SIGNER -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewsecho "I: signed $zone"
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewscat $infile $keyname1.key $keyname2.key >$zonefile
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrews$SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewsecho "I: signed $zone"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewscat $infile $keyname1.key $keyname2.key >$zonefile
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrews$SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewsecho "I: signed $zone"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewscat $infile $keyname1.key $keyname2.key >$zonefile
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrews$SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewsecho "I: signed $zone"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidssets="$dssets dsset-`echo $zone |sed -e "s/.$//g"`$TP"
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidsfilename=../ns6/dsset-grand.`echo $zone |sed -e "s/\.$//g"`$TP
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickicat $infile $keyname1.key $keyname2.key $dsfilename >$zonefile
ea8278253210df030a24f0c89342b43fe279a127Mark Andrews$SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewsecho "I: signed $zone"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidssets="$dssets dsset-`echo $zone |sed -e "s/.$//g"`$TP"
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidsfilename=../ns6/dsset-grand.`echo $zone |sed -e "s/\.$//g"`$TP
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickicat $infile $keyname1.key $keyname2.key $dsfilename >$zonefile
ea8278253210df030a24f0c89342b43fe279a127Mark Andrews$SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewsecho "I: signed $zone"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidssets="$dssets dsset-`echo $zone |sed -e "s/.$//g"`$TP"
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewscat $infile $keyname1.key $keyname2.key >$zonefile
ea8278253210df030a24f0c89342b43fe279a127Mark Andrews$SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewsecho "I: signed $zone"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidssets="$dssets dsset-`echo $zone |sed -e "s/.$//g"`$TP"
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidsfilename=../ns6/dsset-grand.`echo $zone |sed -e "s/\.$//g"`$TP
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickicat $infile $keyname1.key $keyname2.key $dsfilename >$zonefile
ea8278253210df030a24f0c89342b43fe279a127Mark Andrews$SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewsecho "I: signed $zone"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidssets="$dssets dsset-`echo $zone |sed -e "s/.$//g"`$TP"
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidsfilename=../ns6/dsset-grand.`echo $zone |sed -e "s/\.$//g"`$TP
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickicat $infile $keyname1.key $keyname2.key $dsfilename >$zonefile
ea8278253210df030a24f0c89342b43fe279a127Mark Andrews$SIGNER -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewsecho "I: signed $zone"
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewscat $infile $keyname1.key $keyname2.key >$zonefile
ea8278253210df030a24f0c89342b43fe279a127Mark Andrews$SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewsecho "I: signed $zone"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewscat $infile $keyname1.key $keyname2.key >$zonefile
ea8278253210df030a24f0c89342b43fe279a127Mark Andrews$SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewsecho "I: signed $zone"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickidssets="$dssets dsset-`echo $zone |sed -e "s/.$//g"`$TP"
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewscat $infile $keyname1.key $keyname2.key >$zonefile
ea8278253210df030a24f0c89342b43fe279a127Mark Andrews$SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
ea8278253210df030a24f0c89342b43fe279a127Mark Andrewsecho "I: signed $zone"
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrewskeyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewscat $infile $dlvsets $keyname1.key $keyname2.key >$zonefile
e27d55e3ee06b6edcf625b8920a5c809da7f0b98Mark Andrews$SIGNER -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewsecho "I: signed $zone"
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewslocal ($dn, $class, $type, $flags, $proto, $alg, @rest) = split;
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewslocal $key = join("", @rest);
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrewstrusted-keys {
2cd8fa3ef9b168429dcf76603e7b95c58317dd28Mark Andrews "$dn" $flags $proto $alg "$key";