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
14# shellcheck source=conf.sh
15. ../conf.sh
16
17set -e
18
19$SHELL clean.sh
20
21mkdir keys
22mkdir ns3/keys
23
24copy_setports ns2/named.conf.in ns2/named.conf
25if ! $SHELL ../testcrypto.sh -q RSASHA1; then
26  copy_setports ns3/named-fips.conf.in ns3/named.conf
27else
28  copy_setports ns3/named-fips.conf.in ns3/named-fips.conf
29  copy_setports ns3/named.conf.in ns3/named.conf
30fi
31copy_setports ns4/named.conf.in ns4/named.conf
32copy_setports ns5/named.conf.in ns5/named.conf
33copy_setports ns6/named.conf.in ns6/named.conf
34
35if $SHELL ../testcrypto.sh ed25519; then
36  echo "yes" >ed25519-supported.file
37fi
38
39if $SHELL ../testcrypto.sh ed448; then
40  echo "yes" >ed448-supported.file
41fi
42
43copy_setports ns3/policies/autosign.conf.in ns3/policies/autosign.conf
44copy_setports ns3/policies/kasp-fips.conf.in ns3/policies/kasp-fips.conf
45copy_setports ns3/policies/kasp.conf.in ns3/policies/kasp.conf
46if ! $SHELL ../testcrypto.sh -q RSASHA1; then
47  cp ns3/policies/kasp-fips.conf ns3/policies/kasp.conf
48fi
49
50copy_setports ns6/policies/csk1.conf.in ns6/policies/csk1.conf
51copy_setports ns6/policies/csk2.conf.in ns6/policies/csk2.conf
52copy_setports ns6/policies/kasp-fips.conf.in ns6/policies/kasp-fips.conf
53copy_setports ns6/policies/kasp.conf.in ns6/policies/kasp.conf
54if ! $SHELL ../testcrypto.sh -q RSASHA1; then
55  cp ns6/policies/kasp-fips.conf ns6/policies/kasp.conf
56fi
57
58# Setup zones
59(
60  cd ns2
61  $SHELL setup.sh
62)
63(
64  cd ns3
65  $SHELL setup.sh
66)
67(
68  cd ns4
69  $SHELL setup.sh
70)
71(
72  cd ns5
73  $SHELL setup.sh
74)
75(
76  cd ns6
77  $SHELL setup.sh
78)
79