sign.sh revision 1.1.1.2
1#!/bin/sh -e 2# 3# Copyright (C) Internet Systems Consortium, Inc. ("ISC") 4# 5# This Source Code Form is subject to the terms of the Mozilla Public 6# License, v. 2.0. If a copy of the MPL was not distributed with this 7# file, You can obtain one at http://mozilla.org/MPL/2.0/. 8# 9# See the COPYRIGHT file distributed with this work for additional 10# information regarding copyright ownership. 11 12SYSTEMTESTTOP=../.. 13. $SYSTEMTESTTOP/conf.sh 14 15zone=. 16zonefile=root.db 17 18keyname=`$KEYGEN -a rsasha256 -qfk $zone` 19zskkeyname=`$KEYGEN -a rsasha256 -q $zone` 20 21$SIGNER -Sg -o $zone $zonefile > /dev/null 2>/dev/null 22 23# Configure the resolving server with a managed trusted key. 24keyfile_to_managed_keys $keyname > managed.conf 25cp managed.conf ../ns2/managed.conf 26cp managed.conf ../ns4/managed.conf 27cp managed.conf ../ns5/managed.conf 28 29# Configure a trusted key statement (used by delv) 30keyfile_to_trusted_keys $keyname > trusted.conf 31 32# 33# Save keyname and keyid for managed key id test. 34# 35echo "$keyname" > managed.key 36keyid=`expr $keyname : 'K\.+00.+\([0-9]*\)'` 37keyid=`expr $keyid + 0` 38echo "$keyid" > managed.key.id 39