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