sign.sh revision bf13e709db49bb19e0c2e73f0a964fe9d7bea4df
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# Copyright (C) 2004, 2006-2009 Internet Systems Consortium, Inc. ("ISC")
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# Copyright (C) 2000-2003 Internet Software Consortium.
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# Permission to use, copy, modify, and/or distribute this software for any
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# purpose with or without fee is hereby granted, provided that the above
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# copyright notice and this permission notice appear in all copies.
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# PERFORMANCE OF THIS SOFTWARE.
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# $Id: sign.sh,v 1.31 2010/06/25 03:24:05 marka Exp $
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp(cd ../ns2 && sh sign.sh )
7d87efa8fdfb9453670f2832df666fdae8291a84jmcpkeyname=`$KEYGEN -q -r $RANDFILE -a RSAMD5 -b 768 -n zone $zone`
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp$SIGNER -P -g -r $RANDFILE -o $zone $zonefile > /dev/null
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# Configure the resolving server with a trusted key.
7d87efa8fdfb9453670f2832df666fdae8291a84jmcplocal ($dn, $class, $type, $flags, $proto, $alg, @rest) = split;
7d87efa8fdfb9453670f2832df666fdae8291a84jmcplocal $key = join("", @rest);
7d87efa8fdfb9453670f2832df666fdae8291a84jmcpprint <<EOF
7d87efa8fdfb9453670f2832df666fdae8291a84jmcptrusted-keys {
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp "$dn" $flags $proto $alg "$key";
7d87efa8fdfb9453670f2832df666fdae8291a84jmcp# Save keyid for managed key id test.