summaryrefslogtreecommitdiff
path: root/security/p5-Net-DNS-SEC-Maint-Key/patches/patch-aa
blob: 8719aeba93acbd2daf842ebad3acbd63765e1a1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
$NetBSD: patch-aa,v 1.1.1.1 2008/08/20 09:55:38 he Exp $

--- t/01-key.t.orig	2005-06-24 16:44:01.000000000 +0200
+++ t/01-key.t
@@ -75,8 +75,11 @@ if (!defined $gid){
 
 diag ("The tests depend on dnssec-keygen and the openssl command to be in your path");
 
+our $nokeygen;
 
-my $nokeygen=0;
+BEGIN {
+
+our $nokeygen=0;
 my $noopenssl=0;
 
 my $dnssec_keygen_path;
@@ -136,19 +139,16 @@ if ($nokeygen){
     plan skip_all =>  "critical programs not found";
     exit;
 }else{
-    plan tests=>70;
-
-    ok(1,"Ready to test");  # test 1  (otherwise the numbering is messed up).
-
+    plan tests=>71;
 }
 
-
+};
 
 
 
 BEGIN {use_ok('Net::DNS::SEC::Maint::Key');                                 
      };
-
+								# test 1
 
 
 
@@ -337,35 +337,35 @@ is ( $activekeys[0]->get_keypath,"t/keyd
 
 
 # More state tests
-$key->fetch("dacht.net","RSASHA1","21827"),0,"key fetched succesful";
+is ($key->fetch("dacht.net","RSASHA1","21827"),0,"key fetched succesful");	# test 39
 
 is ($key->get_keypath,"t/keydb/dacht.net/Kdacht.net.+005+21827.private","get_keypath returns the proper path");
-     			                                        #test 39
+     			                                        #test 40
 
 
 ok ($key->is_ksk,"Key is key signing key");
-     			                                        #test 40
-ok ($key->is_inactive,"Key is inactive");
      			                                        #test 41
+ok ($key->is_inactive,"Key is inactive");
+     			                                        #test 42
 
 is ($key->set_active,1,"Toggling worked");
-     			                                        #test 42
+     			                                        #test 43
 
 ok ( $key->is_active,"Key is active");
-     			                                        #test 43
+     			                                        #test 44
 
 ok (! $key->is_inactive,"Key is active, thus not inactive");
-     			                                        #test 44
+     			                                        #test 45
 
 ok (! $key->is_published,"Key is active, thus not published");
 
-     			                                        #test 45
+     			                                        #test 46
 
 is ($key->set_inactive,1,"Set inactive");
-     			                                        #test 46
+     			                                        #test 47
 
 ok (! $key->is_active,"Key is  active");
-     			                                        #test 47
+     			                                        #test 48
 
 
 
@@ -373,22 +373,22 @@ ok (! $key->is_active,"Key is  active");
 
 is ($key->set_published,1,"Toggling worked");
 
-     			                                        #test 48
+     			                                        #test 49
 
 ok ( $key->is_published,"Key is  published");
-     			                                        #test 49
+     			                                        #test 50
 
 ok (! $key->is_active,"Key is  published, thus not active");
-     			                                        #test 50
+     			                                        #test 51
 
 ok (! $key->is_inactive,"Key is  published, thus not published");
-     			                                        #test 51
+     			                                        #test 52
 
 is ($key->set_inactive,1,"Set inactive");
-     			                                        #test 52
+     			                                        #test 53
 
 ok ($key->is_inactive,"Key is not active");
-     			                                        #test 53
+     			                                        #test 54
 
 my $keyset1="dacht.net.	3600	IN	KEY	256  3  3 ( 
 			ANkBgSfpnbjsgbjKibnBAB3OYb2r7EblxCKF
@@ -422,9 +422,9 @@ dacht.net.	3600	IN	KEY	256  3  5 ( 
 
 
 is( $key->get_keyset("dacht.net"), $keyset1, "getkeyset returns expected keys as well");
-     			                                        #test 54
-is ($key->set_published,1,"Non trivial toggling worked again");
      			                                        #test 55
+is ($key->set_published,1,"Non trivial toggling worked again");
+     			                                        #test 56
 
 my $keyset2="dacht.net.	3600	IN	KEY	256  3  3 ( 
 			ANkBgSfpnbjsgbjKibnBAB3OYb2r7EblxCKF
@@ -462,28 +462,28 @@ dacht.net.	3600	IN	KEY	256  3  5 ( 
 			) ; Key ID = 21827
 ";
 is( $key->get_keyset("dacht.net"), $keyset2, "getkeyset returns published keys as well");
-     			                                        #test 56
+     			                                        #test 57
 
 
 
 
 is ($key->set_inactive,1,"Non trivial toggling worked again");
-     			                                        #test 57
+     			                                        #test 58
 
 ok ( $key->is_inactive,"Key is inactive");
-     			                                        #test 58
+     			                                        #test 59
 
 ok (! $key->is_active,"Key is inactive, thus not active");
-     			                                        #test 59
+     			                                        #test 60
 
 ok (! $key->is_published,"Key is inactive, thus not published");
-     			                                        #test 60
+     			                                        #test 61
 
-ok ( $key->is_algorithm("RSASHA1"),"Key is proper algorithm");  # test 61
-ok ( $key->is_algorithm(5),"Key is proper algorithm");	        # test 62
-ok ( ! $key->is_algorithm("RSA"),"is_algorithm (\"RSA\")");     # test 63
-ok ( ! $key->is_algorithm("DSA"),"is_algorithm (\"DSA\")");     # test 64
-ok ( ! $key->is_algorithm("CRYPTSAM"),"is_algorithm (\"CRYPTSAM\")"); # test 65
+ok ( $key->is_algorithm("RSASHA1"),"Key is proper algorithm");  # test 62
+ok ( $key->is_algorithm(5),"Key is proper algorithm");	        # test 63
+ok ( ! $key->is_algorithm("RSA"),"is_algorithm (\"RSA\")");     # test 64
+ok ( ! $key->is_algorithm("DSA"),"is_algorithm (\"DSA\")");     # test 65
+ok ( ! $key->is_algorithm("CRYPTSAM"),"is_algorithm (\"CRYPTSAM\")"); # test 66
 
 
 
@@ -496,22 +496,22 @@ SKIP: {
   $key3->create("bla.foo","RSASHA1",768,"zonesigning");
   my @keyarray2;
   is (@keyarray2=$key3->get_all("bla.foo"),2,"two keys for bla.foo returned");
-     			                                        #test 66
+     			                                        #test 67
   my @activekeys;
   is ( @activekeys=$key3->get_active("bla.foo"),1,"One activekey for bla.foo");
-     			                                        #test 67
+     			                                        #test 68
 
   $activekeys[0]->set_rollover;
   ok ( $activekeys[0]->is_rollover,"Key has rollover attribute set");
 
-     			                                        #test 68
+     			                                        #test 69
 
   $activekeys[0]->set_inactive;
   ok ( $activekeys[0]->is_inactive,"Key is inactive");
-     			                                        #test 69
+     			                                        #test 70
   $activekeys[0]->set_active;
   ok ( $activekeys[0]->is_active,"Key is active");
-     			                                        #test 70
+     			                                        #test 71
 }