Remove building with NOCRYPTO option
[minix.git] / external / bsd / bind / dist / bin / tests / system / coverage / setup.sh
bloba803ffdaa82a57498550b4c55be6961da39a3359
1 #!/bin/sh
3 # Copyright (C) 2013, 2014 Internet Systems Consortium, Inc. ("ISC")
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
9 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 # PERFORMANCE OF THIS SOFTWARE.
17 SYSTEMTESTTOP=..
18 . $SYSTEMTESTTOP/conf.sh
20 KEYGEN="$KEYGEN -qr $RANDFILE"
22 $SHELL clean.sh
24 ln -s $CHECKZONE named-compilezone
26 # Test 1: KSK goes inactive before successor is active
27 dir=01-ksk-inactive
28 rm -f $dir/K*.key
29 rm -f $dir/K*.private
30 ksk1=`$KEYGEN -K $dir -3fk example.com`
31 $SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
32 ksk2=`$KEYGEN -K $dir -S $ksk1`
33 $SETTIME -K $dir -I +7mo $ksk1 > /dev/null 2>&1
34 zsk1=`$KEYGEN -K $dir -3 example.com`
36 # Test 2: ZSK goes inactive before successor is active
37 dir=02-zsk-inactive
38 rm -f $dir/K*.key
39 rm -f $dir/K*.private
40 zsk1=`$KEYGEN -K $dir -3 example.com`
41 $SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
42 zsk2=`$KEYGEN -K $dir -S $zsk1`
43 $SETTIME -K $dir -I +7mo $zsk1 > /dev/null 2>&1
44 ksk1=`$KEYGEN -K $dir -3fk example.com`
46 # Test 3: KSK is unpublished before its successor is published
47 dir=03-ksk-unpublished
48 rm -f $dir/K*.key
49 rm -f $dir/K*.private
50 ksk1=`$KEYGEN -K $dir -3fk example.com`
51 $SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
52 ksk2=`$KEYGEN -K $dir -S $ksk1`
53 $SETTIME -K $dir -D +6mo $ksk1 > /dev/null 2>&1
54 zsk1=`$KEYGEN -K $dir -3 example.com`
56 # Test 4: ZSK is unpublished before its successor is published
57 dir=04-zsk-unpublished
58 rm -f $dir/K*.key
59 rm -f $dir/K*.private
60 zsk1=`$KEYGEN -K $dir -3 example.com`
61 $SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
62 zsk2=`$KEYGEN -K $dir -S $zsk1`
63 $SETTIME -K $dir -D +6mo $zsk1 > /dev/null 2>&1
64 ksk1=`$KEYGEN -K $dir -3fk example.com`
66 # Test 5: KSK deleted and successor published before KSK is deactivated
67 # and successor activated.
68 dir=05-ksk-unpub-active
69 rm -f $dir/K*.key
70 rm -f $dir/K*.private
71 ksk1=`$KEYGEN -K $dir -3fk example.com`
72 $SETTIME -K $dir -I +9mo -D +8mo $ksk1 > /dev/null 2>&1
73 ksk2=`$KEYGEN -K $dir -S $ksk1`
74 zsk1=`$KEYGEN -K $dir -3 example.com`
76 # Test 6: ZSK deleted and successor published before ZSK is deactivated
77 # and successor activated.
78 dir=06-zsk-unpub-active
79 rm -f $dir/K*.key
80 rm -f $dir/K*.private
81 zsk1=`$KEYGEN -K $dir -3 example.com`
82 $SETTIME -K $dir -I +9mo -D +8mo $zsk1 > /dev/null 2>&1
83 zsk2=`$KEYGEN -K $dir -S $zsk1`
84 ksk1=`$KEYGEN -K $dir -3fk example.com`
86 # Test 7: KSK rolled with insufficient delay after prepublication.
87 dir=07-ksk-ttl
88 rm -f $dir/K*.key
89 rm -f $dir/K*.private
90 ksk1=`$KEYGEN -K $dir -3fk example.com`
91 $SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
92 ksk2=`$KEYGEN -K $dir -S $ksk1`
93 # allow only 1 day between publication and activation
94 $SETTIME -K $dir -P +269d $ksk2 > /dev/null 2>&1
95 zsk1=`$KEYGEN -K $dir -3 example.com`
97 # Test 8: ZSK rolled with insufficient delay after prepublication.
98 dir=08-zsk-ttl
99 rm -f $dir/K*.key
100 rm -f $dir/K*.private
101 zsk1=`$KEYGEN -K $dir -3 example.com`
102 $SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
103 zsk2=`$KEYGEN -K $dir -S $zsk1`
104 # allow only 1 day between publication and activation
105 $SETTIME -K $dir -P +269d $zsk2 > /dev/null 2>&1
106 ksk1=`$KEYGEN -K $dir -3fk example.com`
108 # Test 9: KSK goes inactive before successor is active, but checking ZSKs
109 dir=09-check-zsk
110 rm -f $dir/K*.key
111 rm -f $dir/K*.private
112 ksk1=`$KEYGEN -K $dir -3fk example.com`
113 $SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
114 ksk2=`$KEYGEN -K $dir -S $ksk1`
115 $SETTIME -K $dir -I +7mo $ksk1 > /dev/null 2>&1
116 zsk1=`$KEYGEN -K $dir -3 example.com`
118 # Test 10: ZSK goes inactive before successor is active, but checking KSKs
119 dir=10-check-ksk
120 rm -f $dir/K*.key
121 rm -f $dir/K*.private
122 zsk1=`$KEYGEN -K $dir -3 example.com`
123 $SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
124 zsk2=`$KEYGEN -K $dir -S $zsk1`
125 $SETTIME -K $dir -I +7mo $zsk1 > /dev/null 2>&1
126 ksk1=`$KEYGEN -K $dir -3fk example.com`
128 # Test 11: ZSK goes inactive before successor is active, but after cutoff
129 dir=11-cutoff
130 rm -f $dir/K*.key
131 rm -f $dir/K*.private
132 zsk1=`$KEYGEN -K $dir -3 example.com`
133 $SETTIME -K $dir -I +18mo -D +2y $zsk1 > /dev/null 2>&1
134 zsk2=`$KEYGEN -K $dir -S $zsk1`
135 $SETTIME -K $dir -I +16mo $zsk1 > /dev/null 2>&1
136 ksk1=`$KEYGEN -K $dir -3fk example.com`