Remove building with NOCRYPTO option
[minix.git] / external / bsd / bind / dist / bin / tests / system / nsupdate / setup.sh
blob828255ee530be5045ae7d3bfebf8c5c2f7d60d92
1 #!/bin/sh
3 # Copyright (C) 2004, 2007, 2009-2012, 2014 Internet Systems Consortium, Inc. ("ISC")
4 # Copyright (C) 2000, 2001 Internet Software Consortium.
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 # PERFORMANCE OF THIS SOFTWARE.
18 SYSTEMTESTTOP=..
19 . $SYSTEMTESTTOP/conf.sh
21 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
24 # jnl and database files MUST be removed before we start
27 rm -f ns1/*.jnl ns1/example.db ns2/*.jnl ns2/example.bk
28 rm -f ns2/update.bk ns2/update.alt.bk
29 rm -f ns3/example.db.jnl
31 cp -f ns1/example1.db ns1/example.db
32 sed 's/example.nil/other.nil/g' ns1/example1.db > ns1/other.db
33 sed 's/example.nil/unixtime.nil/g' ns1/example1.db > ns1/unixtime.db
34 sed 's/example.nil/keytests.nil/g' ns1/example1.db > ns1/keytests.db
35 cp -f ns3/example.db.in ns3/example.db
37 # update_test.pl has its own zone file because it
38 # requires a specific NS record set.
39 cat <<\EOF >ns1/update.db
40 $ORIGIN .
41 $TTL 300 ; 5 minutes
42 update.nil IN SOA ns1.example.nil. hostmaster.example.nil. (
43 1 ; serial
44 2000 ; refresh (2000 seconds)
45 2000 ; retry (2000 seconds)
46 1814400 ; expire (3 weeks)
47 3600 ; minimum (1 hour)
49 update.nil. NS ns1.update.nil.
50 ns1.update.nil. A 10.53.0.2
51 ns2.update.nil. AAAA ::1
52 EOF
54 $DDNSCONFGEN -q -r $RANDFILE -z example.nil > ns1/ddns.key
56 $DDNSCONFGEN -q -r $RANDFILE -a hmac-md5 -k md5-key -z keytests.nil > ns1/md5.key
57 $DDNSCONFGEN -q -r $RANDFILE -a hmac-sha1 -k sha1-key -z keytests.nil > ns1/sha1.key
58 $DDNSCONFGEN -q -r $RANDFILE -a hmac-sha224 -k sha224-key -z keytests.nil > ns1/sha224.key
59 $DDNSCONFGEN -q -r $RANDFILE -a hmac-sha256 -k sha256-key -z keytests.nil > ns1/sha256.key
60 $DDNSCONFGEN -q -r $RANDFILE -a hmac-sha384 -k sha384-key -z keytests.nil > ns1/sha384.key
61 $DDNSCONFGEN -q -r $RANDFILE -a hmac-sha512 -k sha512-key -z keytests.nil > ns1/sha512.key
63 (cd ns3; $SHELL -e sign.sh)