sign.sh revision 35da39a7f16d76d29ee295c4e4a0598649dfda9c
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (C) 2000-2003 Internet Software Consortium.
9e77d51069a97a21c68184134a0c9847e95490ffMark Andrews# Permission to use, copy, modify, and distribute this software for any
12178c86525332bb0ab66155feb61fbf32eca6acEvan Hunt# purpose with or without fee is hereby granted, provided that the above
9e77d51069a97a21c68184134a0c9847e95490ffMark Andrews# copyright notice and this permission notice appear in all copies.
9e77d51069a97a21c68184134a0c9847e95490ffMark Andrews# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9e77d51069a97a21c68184134a0c9847e95490ffMark Andrews# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9e77d51069a97a21c68184134a0c9847e95490ffMark Andrews# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
e13d04fda918c0c14c2247475bb99e0760d9a6a4Evan Hunt# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
a26ad011f382d12058478704cb5e90e6f4366d01Andreas Gustafsson# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
c2bc56dc65b4b103a5600565680eb5f33fa4c90bMark Andrews# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
9e77d51069a97a21c68184134a0c9847e95490ffMark Andrews# PERFORMANCE OF THIS SOFTWARE.
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki# $Id: sign.sh,v 1.26 2006/01/04 00:37:24 marka Exp $
9e77d51069a97a21c68184134a0c9847e95490ffMark Andrews# Have the child generate a zone key and pass it to us.
9e77d51069a97a21c68184134a0c9847e95490ffMark Andrewskeyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
9e77d51069a97a21c68184134a0c9847e95490ffMark Andrewskeyname2=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
9e77d51069a97a21c68184134a0c9847e95490ffMark Andrewscat $infile $keyname1.key $keyname2.key >$zonefile
bb1cf189bb9fd9059cf13b785d15b0e50c0be8fbAndreas Gustafsson$SIGNER -g -r $RANDFILE -o $zone -k $keyname1 $zonefile $keyname2 > /dev/null
01b8865b1462ba219c90cf6c00f1bf0fdf780d9bBrian Wellington# Sign the privately secure file
9e77d51069a97a21c68184134a0c9847e95490ffMark Andrewsprivkeyname=`$KEYGEN -r $RANDFILE -a RSAMD5 -b 768 -n zone $privzone`
a26ad011f382d12058478704cb5e90e6f4366d01Andreas Gustafssoncat $privinfile $privkeyname.key >$privzonefile
74cb99072c4b0ebd2ccafcfa284288fa760f7a1aMark Andrews$SIGNER -g -r $RANDFILE -o $privzone -l dlv $privzonefile > /dev/null
a26ad011f382d12058478704cb5e90e6f4366d01Andreas Gustafsson# Sign the DLV secure zone.
0c2313eb367de3b58801d643d52c0fd9bc0e5df7Evan Huntdlvkeyname=`$KEYGEN -r $RANDFILE -a RSAMD5 -b 768 -n zone $dlvzone`
dbb012765c735ee0d82dedb116cdc7cf18957814Evan Huntcat $dlvinfile $dlvkeyname.key dlvset-$privzone > $dlvzonefile