sign.sh revision bf8267aa453e5d2a735ed732a043b77a0b355b20
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#!/bin/sh -e
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Permission to use, copy, modify, and/or distribute this software for any
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# purpose with or without fee is hereby granted, provided that the above
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# copyright notice and this permission notice appear in all copies.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# PERFORMANCE OF THIS SOFTWARE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# $Id: sign.sh,v 1.2 2010/06/21 02:31:46 marka Exp $
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSYSTEMTESTTOP=../..
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte. $SYSTEMTESTTOP/conf.sh
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
a79493184c9332129c9c91500069322f6f3fafddReedRANDFILE=../random.data1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteRANDFILE2=../random.data2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortezone=example.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinfile=example.db.in
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortezonefile=example.db
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortezskname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortekskname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -f KSK -n zone $zone`
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortecat $infile $zskname.key $kskname.key > $zonefile
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte$SIGNER -P -e +1000d -r $RANDFILE -o $zone $zonefile > /dev/null
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# zsk, no -R
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortekeyname=`$KEYGEN -q -r $RANDFILE2 -a RSASHA1 -b 768 -n zone \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -P +20 -A +1h -I +1d -D +1mo $zone`
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteecho $keyname > keyname
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte