8aee18709f238406719768b8a6b843a15c5075f8Mark Andrews#!/bin/sh -e
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrews#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (C) 2010-2012, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# file, You can obtain one at http://mozilla.org/MPL/2.0/.
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrews
8aee18709f238406719768b8a6b843a15c5075f8Mark AndrewsSYSTEMTESTTOP=../..
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrews. $SYSTEMTESTTOP/conf.sh
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrews
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrewszone=nsec3param.test.
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrewsinfile=nsec3param.test.db.in
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrewszonefile=nsec3param.test.db
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrews
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrewskeyname1=`$KEYGEN -q -r $RANDFILE -a NSEC3RSASHA1 -b 1024 -n zone -f KSK $zone`
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrewskeyname2=`$KEYGEN -q -r $RANDFILE -a NSEC3RSASHA1 -b 1024 -n zone $zone`
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrews
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrewscat $infile $keyname1.key $keyname2.key >$zonefile
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrews
8aee18709f238406719768b8a6b843a15c5075f8Mark Andrews$SIGNER -P -3 - -H 1 -r $RANDFILE -o $zone -k $keyname1 $zonefile $keyname2 > /dev/null
16cc4a1f56d0f9a300419da7e75e3b72169e608aMark Andrews
16cc4a1f56d0f9a300419da7e75e3b72169e608aMark Andrewszone=dnskey.test.
16cc4a1f56d0f9a300419da7e75e3b72169e608aMark Andrewsinfile=dnskey.test.db.in
16cc4a1f56d0f9a300419da7e75e3b72169e608aMark Andrewszonefile=dnskey.test.db
16cc4a1f56d0f9a300419da7e75e3b72169e608aMark Andrews
16cc4a1f56d0f9a300419da7e75e3b72169e608aMark Andrewskeyname1=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone -f KSK $zone`
16cc4a1f56d0f9a300419da7e75e3b72169e608aMark Andrewskeyname2=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone $zone`
16cc4a1f56d0f9a300419da7e75e3b72169e608aMark Andrews
16cc4a1f56d0f9a300419da7e75e3b72169e608aMark Andrewscat $infile $keyname1.key $keyname2.key >$zonefile
16cc4a1f56d0f9a300419da7e75e3b72169e608aMark Andrews
16cc4a1f56d0f9a300419da7e75e3b72169e608aMark Andrews$SIGNER -P -r $RANDFILE -o $zone -k $keyname1 $zonefile $keyname2 > /dev/null
8d9a134fe75c57052094b30ad43a20582ad71ebfMark Andrews
8d9a134fe75c57052094b30ad43a20582ad71ebfMark Andrewszone=delegation.test.
8d9a134fe75c57052094b30ad43a20582ad71ebfMark Andrewsinfile=delegation.test.db.in
8d9a134fe75c57052094b30ad43a20582ad71ebfMark Andrewszonefile=delegation.test.db
8d9a134fe75c57052094b30ad43a20582ad71ebfMark Andrews
8d9a134fe75c57052094b30ad43a20582ad71ebfMark Andrewskeyname1=`$KEYGEN -q -r $RANDFILE -3 -f KSK $zone`
8d9a134fe75c57052094b30ad43a20582ad71ebfMark Andrewskeyname2=`$KEYGEN -q -r $RANDFILE -3 $zone`
8d9a134fe75c57052094b30ad43a20582ad71ebfMark Andrews
8d9a134fe75c57052094b30ad43a20582ad71ebfMark Andrewscat $infile $keyname1.key $keyname2.key >$zonefile
8d9a134fe75c57052094b30ad43a20582ad71ebfMark Andrews
8d9a134fe75c57052094b30ad43a20582ad71ebfMark Andrews$SIGNER -A -3 - -P -r $RANDFILE -o $zone -k $keyname1 $zonefile $keyname2 > /dev/null