Blame bin/tests/system/ecdsa/ns1/sign.sh

Packit 5ce601
#!/bin/sh -e
Packit 5ce601
#
Packit 5ce601
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
Packit 5ce601
#
Packit 5ce601
# This Source Code Form is subject to the terms of the Mozilla Public
Packit 5ce601
# License, v. 2.0. If a copy of the MPL was not distributed with this
Packit Service 704ed8
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
Packit 5ce601
#
Packit 5ce601
# See the COPYRIGHT file distributed with this work for additional
Packit 5ce601
# information regarding copyright ownership.
Packit 5ce601
Packit 5ce601
SYSTEMTESTTOP=../..
Packit 5ce601
. $SYSTEMTESTTOP/conf.sh
Packit 5ce601
Packit 5ce601
zone=.
Packit 5ce601
infile=root.db.in
Packit 5ce601
zonefile=root.db
Packit 5ce601
Packit 5ce601
key1=`$KEYGEN -q -r $RANDFILE -a ECDSAP256SHA256 -n zone $zone`
Packit 5ce601
key2=`$KEYGEN -q -r $RANDFILE -a ECDSAP384SHA384 -n zone -f KSK $zone`
Packit 5ce601
$DSFROMKEY -a sha-384 $key2.key > dsset-384
Packit 5ce601
Packit 5ce601
cat $infile $key1.key $key2.key > $zonefile
Packit 5ce601
Packit 5ce601
$SIGNER -P -g -r $RANDFILE -o $zone $zonefile > /dev/null 2> signer.err || cat signer.err
Packit 5ce601
Packit 5ce601
# Configure the resolving server with a trusted key.
Packit 5ce601
keyfile_to_trusted_keys $key1 > trusted.conf
Packit 5ce601
cp trusted.conf ../ns2/trusted.conf