~ubuntu-branches/ubuntu/maverick/bind9/maverick

« back to all changes in this revision

Viewing changes to bin/tests/system/dnssec/ns3/sign.sh

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2005-04-19 10:21:58 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050419102158-kp20cp1bqf4ivpzy
Tags: 1:9.3.1-2ubuntu1
resync with debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
#
3
3
# Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
4
 
# Copyright (C) 2000, 2001  Internet Software Consortium.
 
4
# Copyright (C) 2000-2002  Internet Software Consortium.
5
5
#
6
6
# Permission to use, copy, modify, and distribute this software for any
7
7
# purpose with or without fee is hereby granted, provided that the above
15
15
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
16
# PERFORMANCE OF THIS SOFTWARE.
17
17
 
18
 
# $Id: sign.sh,v 1.12.2.1 2004/03/09 06:09:52 marka Exp $
 
18
# $Id: sign.sh,v 1.12.12.3 2004/03/08 04:04:35 marka Exp $
19
19
 
20
20
RANDFILE=../random.data
21
21
 
23
23
infile=secure.example.db.in
24
24
zonefile=secure.example.db
25
25
 
26
 
keyname=`$KEYGEN -r $RANDFILE -a RSA -b 768 -n zone $zone`
27
 
 
28
 
$KEYSETTOOL -r $RANDFILE -t 3600 $keyname.key > /dev/null
 
26
keyname=`$KEYGEN -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone`
29
27
 
30
28
cat $infile $keyname.key >$zonefile
31
29
 
37
35
 
38
36
keyname=`$KEYGEN -r $RANDFILE -a RSA -b 768 -n zone $zone`
39
37
 
40
 
$KEYSETTOOL -r $RANDFILE -t 3600 $keyname.key > /dev/null
41
 
 
42
 
cat $infile $keyname.key >$zonefile
43
 
 
44
 
$SIGNER -r $RANDFILE -o $zone $zonefile > /dev/null
 
38
cat $infile $keyname.key >$zonefile
 
39
 
 
40
$SIGNER -r $RANDFILE -o $zone $zonefile > /dev/null
 
41
 
 
42
zone=dynamic.example.
 
43
infile=dynamic.example.db.in
 
44
zonefile=dynamic.example.db
 
45
 
 
46
keyname=`$KEYGEN -r $RANDFILE -a RSA -b 768 -n zone $zone`
 
47
 
 
48
cat $infile $keyname.key >$zonefile
 
49
 
 
50
$SIGNER -r $RANDFILE -o $zone $zonefile > /dev/null
 
51
 
 
52
zone=keyless.example.
 
53
infile=keyless.example.db.in
 
54
zonefile=keyless.example.db
 
55
 
 
56
keyname=`$KEYGEN -r $RANDFILE -a RSA -b 768 -n zone $zone`
 
57
 
 
58
cat $infile $keyname.key >$zonefile
 
59
 
 
60
$SIGNER -r $RANDFILE -o $zone $zonefile > /dev/null
 
61
 
 
62
# Change the signer field of the a.b.keyless.example SIG A
 
63
# to point to a provably nonexistent KEY record.
 
64
mv $zonefile.signed $zonefile.tmp
 
65
<$zonefile.tmp perl -p -e 's/ keyless.example/ b.keyless.example/
 
66
    if /^a.b.keyless.example/../NXT/;' >$zonefile.signed
 
67
rm -f $zonefile.tmp