sign.sh revision 1.1.1.6
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 https://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 an initializing key. 24keyfile_to_initial_ds $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 static key to be used by delv. 30keyfile_to_static_ds $keyname > trusted.conf 31 32# Prepare an unsupported algorithm key. 33unsupportedkey=Kunknown.+255+00000 34cp unsupported.key "${unsupportedkey}.key" 35 36# 37# Save keyname and keyid for managed key id test. 38# 39echo "$keyname" > managed.key 40echo "$zskkeyname" > zone.key 41keyfile_to_key_id $keyname > managed.key.id 42