xref: /netbsd-src/external/mpl/bind/dist/bin/tests/system/mkeys/ns6/setup.sh (revision c64d4171c6f912972428361000d29636c687d68b)
1#!/bin/sh -e
2
3# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
4#
5# SPDX-License-Identifier: MPL-2.0
6#
7# This Source Code Form is subject to the terms of the Mozilla Public
8# License, v. 2.0.  If a copy of the MPL was not distributed with this
9# file, you can obtain one at https://mozilla.org/MPL/2.0/.
10#
11# See the COPYRIGHT file distributed with this work for additional
12# information regarding copyright ownership.
13
14SYSTEMTESTTOP=../..
15. $SYSTEMTESTTOP/conf.sh
16
17zone=.
18zonefile=root.db
19
20# a key for a trust island
21islandkey=$($KEYGEN -a ${DEFAULT_ALGORITHM} -qfk island.)
22
23# a key with unsupported algorithm
24unsupportedkey=Kunknown.+255+00000
25cp unsupported-managed.key "${unsupportedkey}.key"
26
27# root key
28rootkey=$(cat ../ns1/managed.key)
29cp "../ns1/${rootkey}.key" .
30
31# Configure the resolving server with an initializing key.
32# (We use key-format trust anchors here because otherwise the
33# unsupported algorithm test won't work.)
34keyfile_to_initial_keys $unsupportedkey $islandkey $rootkey > managed.conf
35