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 echo_i "ns4/setup.sh" 18 19 # Make lines shorter by storing key states in environment variables. 20 H="HIDDEN" 21 R="RUMOURED" 22 O="OMNIPRESENT" 23 U="UNRETENTIVE" 24 25 zone="view-rsasha256.kasp" 26 algo="RSASHA256" 27 num="8" 28 echo "$zone" >>zones 29 30 # Set up zones in views with auto-dnssec maintain to migrate to dnssec-policy. 31 # The keys for these zones are in use long enough that they should start a 32 # rollover for the ZSK (P3M), but not long enough to initiate a KSK rollover (P1Y). 33 ksktimes="-P -93d -A -93d -P sync -93d" 34 zsktimes="-P -93d -A -93d" 35 KSK=$($KEYGEN -a $algo -L 300 -b 2048 -f KSK $ksktimes $zone 2>keygen.out.$zone.1) 36 ZSK=$($KEYGEN -a $algo -L 300 -b 2048 $zsktimes $zone 2>keygen.out.$zone.2) 37 38 echo_i "setting up zone $zone (external)" 39 view="ext" 40 zonefile="${zone}.${view}.db" 41 cat template.$view.db.in "${KSK}.key" "${ZSK}.key" >"$zonefile" 42 43 echo_i "setting up zone $zone (internal)" 44 view="int" 45 zonefile="${zone}.${view}.db" 46 cat template.$view.db.in "${KSK}.key" "${ZSK}.key" >"$zonefile" 47