Debian Codegraph @

bin/tests/system/dnssec_unsupported_ds/ns1/sign.sh

raw
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
17 set -e
18
19 echo_i "ns1/sign.sh"
20
21 zone=.
22
23 mkdir -p keys
24 ksk=$("$KEYGEN" -K keys -q -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" -f KSK "${zone}")
25 zsk=$("$KEYGEN" -K keys -q -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" "${zone}")
26
27 cat "zones/root.db.in" "keys/$ksk.key" "keys/$zsk.key" ../ns2/dsset-example. >"zones/root.db"
28
29 "$SIGNER" -S -K "keys" \
30 -o . \
31 -f "zones/root.db.signed" \
32 "zones/root.db" >/dev/null 2>&1
33
34 keyfile_to_static_ds "keys/$ksk" >trusted.conf
35 cp trusted.conf ../ns2/trusted.conf
36 cp trusted.conf ../ns3/trusted.conf
37 cp trusted.conf ../ns4/trusted.conf