dnsruby 1.55 → 1.56.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +96 -0
  3. data/Rakefile +30 -29
  4. data/demo/axfr.rb +93 -93
  5. data/demo/check_soa.rb +99 -99
  6. data/demo/check_zone.rb +59 -59
  7. data/demo/digdlv.rb +43 -43
  8. data/demo/digroot.rb +34 -34
  9. data/demo/example_recurse.rb +14 -14
  10. data/demo/mresolv.rb +30 -30
  11. data/demo/mx.rb +31 -31
  12. data/demo/rubydig.rb +37 -37
  13. data/demo/to_resolve.txt +3088 -3088
  14. data/demo/trace_dns.rb +46 -46
  15. data/lib/dnsruby.rb +161 -526
  16. data/lib/dnsruby/DNS.rb +305 -0
  17. data/lib/{Dnsruby/Cache.rb → dnsruby/cache.rb} +152 -152
  18. data/lib/{Dnsruby → dnsruby}/code_mapper.rb +48 -52
  19. data/lib/dnsruby/code_mappers.rb +295 -0
  20. data/lib/{Dnsruby/Config.rb → dnsruby/config.rb} +454 -454
  21. data/lib/{Dnsruby → dnsruby}/dnssec.rb +91 -91
  22. data/lib/{Dnsruby/Hosts.rb → dnsruby/hosts.rb} +125 -125
  23. data/lib/{Dnsruby → dnsruby}/ipv4.rb +26 -26
  24. data/lib/{Dnsruby → dnsruby}/ipv6.rb +42 -42
  25. data/lib/{Dnsruby → dnsruby}/key_cache.rb +29 -29
  26. data/lib/dnsruby/message/decoder.rb +164 -0
  27. data/lib/dnsruby/message/encoder.rb +75 -0
  28. data/lib/dnsruby/message/header.rb +249 -0
  29. data/lib/dnsruby/message/message.rb +629 -0
  30. data/lib/dnsruby/message/question.rb +86 -0
  31. data/lib/dnsruby/message/section.rb +96 -0
  32. data/lib/{Dnsruby → dnsruby}/name.rb +141 -141
  33. data/lib/dnsruby/packet_sender.rb +661 -0
  34. data/lib/{Dnsruby/Recursor.rb → dnsruby/recursor.rb} +235 -233
  35. data/lib/dnsruby/resolv.rb +113 -0
  36. data/lib/dnsruby/resolver.rb +1192 -0
  37. data/lib/dnsruby/resource/A.rb +56 -0
  38. data/lib/dnsruby/resource/AAAA.rb +54 -0
  39. data/lib/{Dnsruby → dnsruby}/resource/AFSDB.rb +68 -68
  40. data/lib/{Dnsruby → dnsruby}/resource/CERT.rb +105 -105
  41. data/lib/{Dnsruby → dnsruby}/resource/DHCID.rb +54 -54
  42. data/lib/dnsruby/resource/DLV.rb +27 -0
  43. data/lib/{Dnsruby → dnsruby}/resource/DNSKEY.rb +372 -372
  44. data/lib/{Dnsruby → dnsruby}/resource/DS.rb +255 -255
  45. data/lib/{Dnsruby → dnsruby}/resource/HINFO.rb +71 -71
  46. data/lib/{Dnsruby → dnsruby}/resource/HIP.rb +29 -29
  47. data/lib/{Dnsruby → dnsruby}/resource/IN.rb +30 -30
  48. data/lib/{Dnsruby → dnsruby}/resource/IPSECKEY.rb +31 -31
  49. data/lib/{Dnsruby → dnsruby}/resource/ISDN.rb +62 -62
  50. data/lib/{Dnsruby → dnsruby}/resource/KX.rb +65 -65
  51. data/lib/{Dnsruby → dnsruby}/resource/LOC.rb +263 -263
  52. data/lib/{Dnsruby → dnsruby}/resource/MINFO.rb +69 -69
  53. data/lib/{Dnsruby → dnsruby}/resource/MX.rb +65 -65
  54. data/lib/{Dnsruby → dnsruby}/resource/NAPTR.rb +98 -98
  55. data/lib/{Dnsruby → dnsruby}/resource/NSAP.rb +171 -171
  56. data/lib/dnsruby/resource/NSEC.rb +275 -0
  57. data/lib/dnsruby/resource/NSEC3.rb +332 -0
  58. data/lib/dnsruby/resource/NSEC3PARAM.rb +135 -0
  59. data/lib/dnsruby/resource/OPT.rb +272 -0
  60. data/lib/{Dnsruby → dnsruby}/resource/PX.rb +70 -70
  61. data/lib/{Dnsruby → dnsruby}/resource/RP.rb +75 -75
  62. data/lib/dnsruby/resource/RR.rb +421 -0
  63. data/lib/dnsruby/resource/RRSIG.rb +275 -0
  64. data/lib/dnsruby/resource/RRSet.rb +190 -0
  65. data/lib/{Dnsruby → dnsruby}/resource/RT.rb +67 -67
  66. data/lib/{Dnsruby → dnsruby}/resource/SOA.rb +94 -94
  67. data/lib/dnsruby/resource/SPF.rb +29 -0
  68. data/lib/dnsruby/resource/SRV.rb +112 -0
  69. data/lib/{Dnsruby → dnsruby}/resource/SSHFP.rb +14 -14
  70. data/lib/dnsruby/resource/TKEY.rb +163 -0
  71. data/lib/dnsruby/resource/TSIG.rb +593 -0
  72. data/lib/{Dnsruby → dnsruby}/resource/TXT.rb +191 -191
  73. data/lib/dnsruby/resource/X25.rb +55 -0
  74. data/lib/{Dnsruby → dnsruby}/resource/domain_name.rb +25 -25
  75. data/lib/{Dnsruby → dnsruby}/resource/generic.rb +80 -80
  76. data/lib/dnsruby/resource/resource.rb +25 -0
  77. data/lib/{Dnsruby → dnsruby}/select_thread.rb +148 -148
  78. data/lib/{Dnsruby/SingleResolver.rb → dnsruby/single_resolver.rb} +60 -60
  79. data/lib/{Dnsruby → dnsruby}/single_verifier.rb +344 -344
  80. data/lib/dnsruby/the_log.rb +44 -0
  81. data/lib/dnsruby/update.rb +278 -0
  82. data/lib/dnsruby/validator_thread.rb +124 -0
  83. data/lib/dnsruby/version.rb +3 -0
  84. data/lib/{Dnsruby → dnsruby}/zone_reader.rb +93 -93
  85. data/lib/{Dnsruby → dnsruby}/zone_transfer.rb +377 -377
  86. data/test/spec_helper.rb +16 -0
  87. data/test/tc_axfr.rb +31 -34
  88. data/test/tc_cache.rb +32 -32
  89. data/test/tc_dlv.rb +28 -28
  90. data/test/tc_dns.rb +73 -76
  91. data/test/tc_dnskey.rb +31 -32
  92. data/test/tc_dnsruby.rb +50 -44
  93. data/test/tc_ds.rb +36 -36
  94. data/test/tc_escapedchars.rb +252 -255
  95. data/test/tc_hash.rb +17 -21
  96. data/test/tc_header.rb +48 -57
  97. data/test/tc_hip.rb +19 -22
  98. data/test/tc_ipseckey.rb +18 -21
  99. data/test/tc_keith.rb +300 -0
  100. data/test/tc_message.rb +87 -0
  101. data/test/tc_misc.rb +83 -87
  102. data/test/tc_name.rb +81 -84
  103. data/test/tc_naptr.rb +18 -21
  104. data/test/tc_nsec.rb +55 -55
  105. data/test/tc_nsec3.rb +23 -24
  106. data/test/tc_nsec3param.rb +20 -21
  107. data/test/tc_packet.rb +90 -93
  108. data/test/tc_packet_unique_push.rb +48 -51
  109. data/test/tc_question.rb +30 -33
  110. data/test/tc_queue.rb +16 -17
  111. data/test/tc_recur.rb +16 -17
  112. data/test/tc_res_config.rb +38 -41
  113. data/test/tc_res_env.rb +29 -32
  114. data/test/tc_res_file.rb +26 -29
  115. data/test/tc_res_opt.rb +62 -65
  116. data/test/tc_resolver.rb +287 -242
  117. data/test/tc_rr-opt.rb +70 -63
  118. data/test/tc_rr-txt.rb +68 -71
  119. data/test/tc_rr-unknown.rb +45 -48
  120. data/test/tc_rr.rb +76 -70
  121. data/test/tc_rrset.rb +21 -22
  122. data/test/tc_rrsig.rb +19 -20
  123. data/test/tc_single_resolver.rb +294 -297
  124. data/test/tc_soak.rb +199 -202
  125. data/test/tc_soak_base.rb +29 -34
  126. data/test/tc_sshfp.rb +20 -23
  127. data/test/tc_tcp.rb +32 -35
  128. data/test/tc_tkey.rb +41 -44
  129. data/test/tc_tsig.rb +81 -84
  130. data/test/tc_update.rb +108 -111
  131. data/test/tc_validator.rb +29 -29
  132. data/test/tc_verifier.rb +81 -82
  133. data/test/ts_dnsruby.rb +16 -15
  134. data/test/ts_offline.rb +62 -63
  135. data/test/ts_online.rb +115 -115
  136. metadata +155 -90
  137. data/README +0 -59
  138. data/lib/Dnsruby/DNS.rb +0 -305
  139. data/lib/Dnsruby/PacketSender.rb +0 -656
  140. data/lib/Dnsruby/Resolver.rb +0 -1189
  141. data/lib/Dnsruby/TheLog.rb +0 -44
  142. data/lib/Dnsruby/message.rb +0 -1230
  143. data/lib/Dnsruby/resource/A.rb +0 -56
  144. data/lib/Dnsruby/resource/AAAA.rb +0 -54
  145. data/lib/Dnsruby/resource/DLV.rb +0 -27
  146. data/lib/Dnsruby/resource/NSEC.rb +0 -298
  147. data/lib/Dnsruby/resource/NSEC3.rb +0 -340
  148. data/lib/Dnsruby/resource/NSEC3PARAM.rb +0 -135
  149. data/lib/Dnsruby/resource/OPT.rb +0 -213
  150. data/lib/Dnsruby/resource/RRSIG.rb +0 -275
  151. data/lib/Dnsruby/resource/SPF.rb +0 -29
  152. data/lib/Dnsruby/resource/SRV.rb +0 -112
  153. data/lib/Dnsruby/resource/TKEY.rb +0 -163
  154. data/lib/Dnsruby/resource/TSIG.rb +0 -593
  155. data/lib/Dnsruby/resource/X25.rb +0 -55
  156. data/lib/Dnsruby/resource/resource.rb +0 -678
  157. data/lib/Dnsruby/update.rb +0 -278
  158. data/lib/Dnsruby/validator_thread.rb +0 -124
data/test/ts_dnsruby.rb CHANGED
@@ -1,17 +1,18 @@
1
- #--
2
- #Copyright 2007 Nominet UK
3
- #
4
- #Licensed under the Apache License, Version 2.0 (the "License");
5
- #you may not use this file except in compliance with the License.
6
- #You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- #Unless required by applicable law or agreed to in writing, software
11
- #distributed under the License is distributed on an "AS IS" BASIS,
12
- #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- #See the License for the specific language governing permissions and
14
- #limitations under the License.
15
- #++
1
+ # --
2
+ # Copyright 2007 Nominet UK
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ # ++
16
+
16
17
  require_relative "ts_online.rb"
17
18
  require_relative "ts_offline.rb"
data/test/ts_offline.rb CHANGED
@@ -1,63 +1,62 @@
1
- #--
2
- #Copyright 2007 Nominet UK
3
- #
4
- #Licensed under the Apache License, Version 2.0 (the "License");
5
- #you may not use this file except in compliance with the License.
6
- #You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- #Unless required by applicable law or agreed to in writing, software
11
- #distributed under the License is distributed on an "AS IS" BASIS,
12
- #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- #See the License for the specific language governing permissions and
14
- #limitations under the License.
15
- #++
16
- begin
17
- require 'rubygems'
18
- rescue LoadError
19
- end
20
- require 'dnsruby'
21
- Dnsruby.log.level = Logger::FATAL
22
- require "test/unit"
23
- require_relative 'tc_header.rb'
24
- require_relative "tc_name.rb"
25
- require_relative "tc_misc.rb"
26
- require_relative "tc_hash.rb"
27
- require_relative "tc_packet.rb"
28
- require_relative "tc_packet_unique_push.rb"
29
- require_relative "tc_question.rb"
30
- require_relative "tc_res_file.rb"
31
- require_relative "tc_res_opt.rb"
32
- require_relative "tc_res_config.rb"
33
- #require_relative "tc_res_env.rb"
34
- require_relative "tc_rr-txt.rb"
35
- require_relative "tc_rr-unknown.rb"
36
- require_relative "tc_rr.rb"
37
- require_relative "tc_rrset.rb"
38
- require_relative "tc_tkey.rb"
39
- require_relative "tc_update.rb"
40
- require_relative "tc_escapedchars.rb"
41
- require_relative "tc_dnskey.rb"
42
- require_relative "tc_rrsig.rb"
43
- require_relative "tc_nsec.rb"
44
- require_relative "tc_nsec3.rb"
45
- require_relative "tc_nsec3param.rb"
46
- require_relative "tc_ipseckey.rb"
47
- require_relative "tc_naptr.rb"
48
-
49
- begin
50
- require "openssl"
51
- OpenSSL::HMAC.digest(OpenSSL::Digest::MD5.new, "key", "data")
52
- key = OpenSSL::PKey::RSA.new
53
- key.e = 111
54
-
55
- have_openssl=true
56
- rescue Exception => e
57
- puts "-----------------------------------------------------------------------"
58
- puts "OpenSSL not present (with full functionality) - skipping DS digest test"
59
- puts "-----------------------------------------------------------------------"
60
- end
61
- if (have_openssl)
62
- require_relative "tc_ds.rb"
63
- end
1
+ # --
2
+ # Copyright 2007 Nominet UK
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ # ++
16
+
17
+ require_relative 'spec_helper'
18
+
19
+ Dnsruby.log.level = Logger::FATAL
20
+
21
+ require_relative 'tc_header.rb'
22
+ require_relative "tc_name.rb"
23
+ require_relative 'tc_message.rb'
24
+ require_relative "tc_misc.rb"
25
+ require_relative "tc_hash.rb"
26
+ require_relative "tc_packet.rb"
27
+ require_relative "tc_packet_unique_push.rb"
28
+ require_relative "tc_question.rb"
29
+ require_relative "tc_res_file.rb"
30
+ require_relative "tc_res_opt.rb"
31
+ require_relative "tc_res_config.rb"
32
+ # require_relative "tc_res_env.rb"
33
+ require_relative "tc_rr-txt.rb"
34
+ require_relative "tc_rr-unknown.rb"
35
+ require_relative "tc_rr.rb"
36
+ require_relative "tc_rrset.rb"
37
+ require_relative "tc_tkey.rb"
38
+ require_relative "tc_update.rb"
39
+ require_relative "tc_escapedchars.rb"
40
+ require_relative "tc_dnskey.rb"
41
+ require_relative "tc_rrsig.rb"
42
+ require_relative "tc_nsec.rb"
43
+ require_relative "tc_nsec3.rb"
44
+ require_relative "tc_nsec3param.rb"
45
+ require_relative "tc_ipseckey.rb"
46
+ require_relative "tc_naptr.rb"
47
+
48
+ begin
49
+ require "openssl"
50
+ OpenSSL::HMAC.digest(OpenSSL::Digest::MD5.new, "key", "data")
51
+ key = OpenSSL::PKey::RSA.new
52
+ key.e = 111
53
+
54
+ have_openssl=true
55
+ rescue Exception => e
56
+ puts "-----------------------------------------------------------------------"
57
+ puts "OpenSSL not present (with full functionality) - skipping DS digest test"
58
+ puts "-----------------------------------------------------------------------"
59
+ end
60
+ if (have_openssl)
61
+ require_relative "tc_ds.rb"
62
+ end
data/test/ts_online.rb CHANGED
@@ -1,115 +1,115 @@
1
- #--
2
- #Copyright 2007 Nominet UK
3
- #
4
- #Licensed under the Apache License, Version 2.0 (the "License");
5
- #you may not use this file except in compliance with the License.
6
- #You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- #Unless required by applicable law or agreed to in writing, software
11
- #distributed under the License is distributed on an "AS IS" BASIS,
12
- #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- #See the License for the specific language governing permissions and
14
- #limitations under the License.
15
- #++
16
- begin
17
- require 'rubygems'
18
- rescue Exception
19
- end
20
- require 'dnsruby'
21
- Dnsruby.log.level = Logger::FATAL
22
- require "test/unit"
23
- # Disable these tests if we're not online
24
- require 'socket'
25
- sock = UDPSocket.new()
26
- online = false
27
- begin
28
- sock.connect('193.0.14.129', # k.root-servers.net.
29
- 25)
30
- online = true
31
- sock.close
32
- rescue Exception
33
- puts "----------------------------------------"
34
- puts "Cannot bind to socket:\n\t"+$!+"\n"
35
- puts "This is an indication you have network problems\n"
36
- puts "\n\nNo online tests will be run!!\n\n"
37
- puts "----------------------------------------"
38
- end
39
- if (online)
40
- # OK - online and ready to go
41
- print "Running online tests. These tests send UDP packets - some may be lost.\n"
42
- print "If you get the odd timeout error with these tests, try running them again.\n"
43
- print "It may just be that some UDP packets got lost the first time...\n"
44
- require_relative "tc_resolver.rb"
45
- require_relative "tc_dnsruby.rb"
46
- # require_relative "tc_inet6.rb"
47
- # require_relative "tc_recurse.rb"
48
- require_relative "tc_tcp.rb"
49
- # require_relative "tc_queue.rb"
50
- require_relative "tc_recur.rb"
51
- # require_relative "tc_soak.rb"
52
-
53
- # Check if we can contact the server - if we can't, then abort the test
54
- # (but tell user that test has not been run due to connectivity problems)
55
- server_up = false
56
- begin
57
- sock = UDPSocket.new
58
- sock.connect('ns0.validation-test-servers.nominet.org.uk',
59
- 25)
60
- sock.close
61
- server_up = true
62
- rescue Exception
63
- puts "----------------------------------------"
64
- puts "Cannot connect to test server\n\t"+$!.to_s+"\n"
65
- puts "\n\nNo tests targetting this server will be run!!\n\n"
66
- puts "----------------------------------------"
67
- end
68
- if (server_up)
69
-
70
- require_relative "tc_single_resolver.rb"
71
- require_relative "tc_axfr.rb"
72
- require_relative "tc_cache.rb"
73
- require_relative "tc_dns.rb"
74
- require_relative "tc_rr-opt.rb"
75
- require_relative "tc_res_config.rb"
76
-
77
- have_openssl = false
78
- begin
79
- require "openssl"
80
- OpenSSL::HMAC.digest(OpenSSL::Digest::MD5.new, "key", "data")
81
- key = OpenSSL::PKey::RSA.new
82
- key.e = 111
83
-
84
- have_openssl=true
85
- rescue Exception => e
86
- puts "-------------------------------------------------------------------------"
87
- puts "OpenSSL not present (with full functionality) - skipping TSIG/DNSSEC test"
88
- puts "-------------------------------------------------------------------------"
89
- end
90
- if (have_openssl)
91
- require_relative "tc_tsig.rb"
92
- puts "------------------------------------------------------"
93
- puts "Running DNSSEC test - may fail if OpenSSL not complete"
94
- puts "------------------------------------------------------"
95
- require_relative "tc_verifier.rb"
96
- require_relative "tc_dlv.rb"
97
- require_relative "tc_validator.rb"
98
- end
99
-
100
- # have_em = false
101
- # begin
102
- # require 'eventmachine'
103
- # have_em = true
104
- # rescue LoadError => e
105
- # puts "----------------------------------------"
106
- # puts "EventMachine not installed - skipping test"
107
- # puts "----------------------------------------"
108
- # end
109
- # if (have_em)
110
- # require 'test/tc_event_machine_single_res.rb'
111
- # require 'test/tc_event_machine_res.rb'
112
- # require 'test/tc_event_machine_deferrable.rb'
113
- # end
114
- end
115
- end
1
+ # --
2
+ # Copyright 2007 Nominet UK
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ # ++
16
+
17
+ require_relative 'spec_helper'
18
+ Dnsruby.log.level = Logger::FATAL
19
+
20
+ # Disable these tests if we're not online
21
+ require 'socket'
22
+ sock = UDPSocket.new()
23
+ online = false
24
+ begin
25
+ sock.connect('193.0.14.129', # k.root-servers.net.
26
+ 25)
27
+ online = true
28
+ sock.close
29
+ rescue Exception => exception
30
+ puts "----------------------------------------"
31
+ puts "Cannot bind to socket:\n\t#{exception}\n"
32
+ puts "This is an indication you have network problems\n"
33
+ puts "\n\nNo online tests will be run!!\n\n"
34
+ puts "----------------------------------------"
35
+ end
36
+ if (online)
37
+ # OK - online and ready to go
38
+ print "Running online tests. These tests send UDP packets - some may be lost.\n"
39
+ print "If you get the odd timeout error with these tests, try running them again.\n"
40
+ print "It may just be that some UDP packets got lost the first time...\n"
41
+ require_relative "tc_resolver.rb"
42
+ require_relative "tc_dnsruby.rb"
43
+ # require_relative "tc_inet6.rb"
44
+ # require_relative "tc_recurse.rb"
45
+ require_relative "tc_tcp.rb"
46
+ # require_relative "tc_queue.rb"
47
+ require_relative "tc_recur.rb"
48
+ # require_relative "tc_soak.rb"
49
+
50
+ # Check if we can contact the server - if we can't, then abort the test
51
+ # (but tell user that test has not been run due to connectivity problems)
52
+ server_up = false
53
+
54
+ # Disabling the attempt to connect to Nominet servers...
55
+ # begin
56
+ # sock = UDPSocket.new
57
+ # sock.connect('ns0.validation-test-servers.nominet.org.uk',
58
+ # 25)
59
+ # sock.close
60
+ # server_up = true
61
+ # rescue Exception
62
+ # puts "----------------------------------------"
63
+ # puts "Cannot connect to test server\n\t"+$!.to_s+"\n"
64
+ # puts "\n\nNo tests targetting this server will be run!!\n\n"
65
+ # puts "----------------------------------------"
66
+ # end
67
+
68
+ if (server_up)
69
+
70
+ require_relative "tc_single_resolver.rb"
71
+ require_relative "tc_axfr.rb"
72
+ require_relative "tc_cache.rb"
73
+ require_relative "tc_dns.rb"
74
+ require_relative "tc_rr-opt.rb"
75
+ require_relative "tc_res_config.rb"
76
+
77
+ have_openssl = false
78
+ begin
79
+ require "openssl"
80
+ OpenSSL::HMAC.digest(OpenSSL::Digest::MD5.new, "key", "data")
81
+ key = OpenSSL::PKey::RSA.new
82
+ key.e = 111
83
+
84
+ have_openssl=true
85
+ rescue Exception => e
86
+ puts "-------------------------------------------------------------------------"
87
+ puts "OpenSSL not present (with full functionality) - skipping TSIG/DNSSEC test"
88
+ puts "-------------------------------------------------------------------------"
89
+ end
90
+ if (have_openssl)
91
+ require_relative "tc_tsig.rb"
92
+ puts "------------------------------------------------------"
93
+ puts "Running DNSSEC test - may fail if OpenSSL not complete"
94
+ puts "------------------------------------------------------"
95
+ require_relative "tc_verifier.rb"
96
+ require_relative "tc_dlv.rb"
97
+ require_relative "tc_validator.rb"
98
+ end
99
+
100
+ # have_em = false
101
+ # begin
102
+ # require 'eventmachine'
103
+ # have_em = true
104
+ # rescue LoadError => e
105
+ # puts "----------------------------------------"
106
+ # puts "EventMachine not installed - skipping test"
107
+ # puts "----------------------------------------"
108
+ # end
109
+ # if (have_em)
110
+ # require 'test/tc_event_machine_single_res.rb'
111
+ # require 'test/tc_event_machine_res.rb'
112
+ # require 'test/tc_event_machine_deferrable.rb'
113
+ # end
114
+ end
115
+ end
metadata CHANGED
@@ -1,28 +1,166 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dnsruby
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.55'
4
+ version: 1.56.0
5
5
  platform: ruby
6
6
  authors:
7
- - AlexD
8
- autorequire: dnsruby
7
+ - Alex Dalitz
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-07 00:00:00.000000000 Z
12
- dependencies: []
13
- description:
14
- email: alexd@nominet.org.uk
11
+ date: 2014-11-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '10'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 10.3.2
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '10'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 10.3.2
33
+ - !ruby/object:Gem::Dependency
34
+ name: minitest
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '5.4'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '5.4'
47
+ - !ruby/object:Gem::Dependency
48
+ name: coveralls
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '0.7'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '0.7'
61
+ description: |-
62
+ Dnsruby is a pure Ruby DNS client library which implements a
63
+ stub resolver. It aims to comply with all DNS RFCs, including
64
+ DNSSEC NSEC3 support.
65
+ email: alex@caerkettontech.com
15
66
  executables: []
16
67
  extensions: []
17
68
  extra_rdoc_files:
18
69
  - DNSSEC
19
70
  - EXAMPLES
20
- - README
71
+ - README.md
21
72
  - EVENTMACHINE
22
73
  files:
74
+ - DNSSEC
75
+ - EVENTMACHINE
76
+ - EXAMPLES
77
+ - README.md
23
78
  - Rakefile
79
+ - demo/axfr.rb
80
+ - demo/check_soa.rb
81
+ - demo/check_zone.rb
82
+ - demo/digdlv.rb
83
+ - demo/digroot.rb
84
+ - demo/example_recurse.rb
85
+ - demo/mresolv.rb
86
+ - demo/mx.rb
87
+ - demo/rubydig.rb
88
+ - demo/to_resolve.txt
89
+ - demo/trace_dns.rb
90
+ - lib/dnsruby.rb
91
+ - lib/dnsruby/DNS.rb
92
+ - lib/dnsruby/cache.rb
93
+ - lib/dnsruby/code_mapper.rb
94
+ - lib/dnsruby/code_mappers.rb
95
+ - lib/dnsruby/config.rb
96
+ - lib/dnsruby/dnssec.rb
97
+ - lib/dnsruby/hosts.rb
98
+ - lib/dnsruby/ipv4.rb
99
+ - lib/dnsruby/ipv6.rb
100
+ - lib/dnsruby/key_cache.rb
101
+ - lib/dnsruby/message/decoder.rb
102
+ - lib/dnsruby/message/encoder.rb
103
+ - lib/dnsruby/message/header.rb
104
+ - lib/dnsruby/message/message.rb
105
+ - lib/dnsruby/message/question.rb
106
+ - lib/dnsruby/message/section.rb
107
+ - lib/dnsruby/name.rb
108
+ - lib/dnsruby/packet_sender.rb
109
+ - lib/dnsruby/recursor.rb
110
+ - lib/dnsruby/resolv.rb
111
+ - lib/dnsruby/resolver.rb
112
+ - lib/dnsruby/resource/A.rb
113
+ - lib/dnsruby/resource/AAAA.rb
114
+ - lib/dnsruby/resource/AFSDB.rb
115
+ - lib/dnsruby/resource/CERT.rb
116
+ - lib/dnsruby/resource/DHCID.rb
117
+ - lib/dnsruby/resource/DLV.rb
118
+ - lib/dnsruby/resource/DNSKEY.rb
119
+ - lib/dnsruby/resource/DS.rb
120
+ - lib/dnsruby/resource/HINFO.rb
121
+ - lib/dnsruby/resource/HIP.rb
122
+ - lib/dnsruby/resource/IN.rb
123
+ - lib/dnsruby/resource/IPSECKEY.rb
124
+ - lib/dnsruby/resource/ISDN.rb
125
+ - lib/dnsruby/resource/KX.rb
126
+ - lib/dnsruby/resource/LOC.rb
127
+ - lib/dnsruby/resource/MINFO.rb
128
+ - lib/dnsruby/resource/MX.rb
129
+ - lib/dnsruby/resource/NAPTR.rb
130
+ - lib/dnsruby/resource/NSAP.rb
131
+ - lib/dnsruby/resource/NSEC.rb
132
+ - lib/dnsruby/resource/NSEC3.rb
133
+ - lib/dnsruby/resource/NSEC3PARAM.rb
134
+ - lib/dnsruby/resource/OPT.rb
135
+ - lib/dnsruby/resource/PX.rb
136
+ - lib/dnsruby/resource/RP.rb
137
+ - lib/dnsruby/resource/RR.rb
138
+ - lib/dnsruby/resource/RRSIG.rb
139
+ - lib/dnsruby/resource/RRSet.rb
140
+ - lib/dnsruby/resource/RT.rb
141
+ - lib/dnsruby/resource/SOA.rb
142
+ - lib/dnsruby/resource/SPF.rb
143
+ - lib/dnsruby/resource/SRV.rb
144
+ - lib/dnsruby/resource/SSHFP.rb
145
+ - lib/dnsruby/resource/TKEY.rb
146
+ - lib/dnsruby/resource/TSIG.rb
147
+ - lib/dnsruby/resource/TXT.rb
148
+ - lib/dnsruby/resource/X25.rb
149
+ - lib/dnsruby/resource/domain_name.rb
150
+ - lib/dnsruby/resource/generic.rb
151
+ - lib/dnsruby/resource/resource.rb
152
+ - lib/dnsruby/select_thread.rb
153
+ - lib/dnsruby/single_resolver.rb
154
+ - lib/dnsruby/single_verifier.rb
155
+ - lib/dnsruby/the_log.rb
156
+ - lib/dnsruby/update.rb
157
+ - lib/dnsruby/validator_thread.rb
158
+ - lib/dnsruby/version.rb
159
+ - lib/dnsruby/zone_reader.rb
160
+ - lib/dnsruby/zone_transfer.rb
24
161
  - test/custom.txt
25
162
  - test/resolv.conf
163
+ - test/spec_helper.rb
26
164
  - test/tc_axfr.rb
27
165
  - test/tc_cache.rb
28
166
  - test/tc_dlv.rb
@@ -35,6 +173,8 @@ files:
35
173
  - test/tc_header.rb
36
174
  - test/tc_hip.rb
37
175
  - test/tc_ipseckey.rb
176
+ - test/tc_keith.rb
177
+ - test/tc_message.rb
38
178
  - test/tc_misc.rb
39
179
  - test/tc_name.rb
40
180
  - test/tc_naptr.rb
@@ -70,84 +210,9 @@ files:
70
210
  - test/ts_dnsruby.rb
71
211
  - test/ts_offline.rb
72
212
  - test/ts_online.rb
73
- - lib/Dnsruby/Cache.rb
74
- - lib/Dnsruby/code_mapper.rb
75
- - lib/Dnsruby/Config.rb
76
- - lib/Dnsruby/DNS.rb
77
- - lib/Dnsruby/dnssec.rb
78
- - lib/Dnsruby/Hosts.rb
79
- - lib/Dnsruby/ipv4.rb
80
- - lib/Dnsruby/ipv6.rb
81
- - lib/Dnsruby/key_cache.rb
82
- - lib/Dnsruby/message.rb
83
- - lib/Dnsruby/name.rb
84
- - lib/Dnsruby/PacketSender.rb
85
- - lib/Dnsruby/Recursor.rb
86
- - lib/Dnsruby/Resolver.rb
87
- - lib/Dnsruby/resource/A.rb
88
- - lib/Dnsruby/resource/AAAA.rb
89
- - lib/Dnsruby/resource/AFSDB.rb
90
- - lib/Dnsruby/resource/CERT.rb
91
- - lib/Dnsruby/resource/DHCID.rb
92
- - lib/Dnsruby/resource/DLV.rb
93
- - lib/Dnsruby/resource/DNSKEY.rb
94
- - lib/Dnsruby/resource/domain_name.rb
95
- - lib/Dnsruby/resource/DS.rb
96
- - lib/Dnsruby/resource/generic.rb
97
- - lib/Dnsruby/resource/HINFO.rb
98
- - lib/Dnsruby/resource/HIP.rb
99
- - lib/Dnsruby/resource/IN.rb
100
- - lib/Dnsruby/resource/IPSECKEY.rb
101
- - lib/Dnsruby/resource/ISDN.rb
102
- - lib/Dnsruby/resource/KX.rb
103
- - lib/Dnsruby/resource/LOC.rb
104
- - lib/Dnsruby/resource/MINFO.rb
105
- - lib/Dnsruby/resource/MX.rb
106
- - lib/Dnsruby/resource/NAPTR.rb
107
- - lib/Dnsruby/resource/NSAP.rb
108
- - lib/Dnsruby/resource/NSEC.rb
109
- - lib/Dnsruby/resource/NSEC3.rb
110
- - lib/Dnsruby/resource/NSEC3PARAM.rb
111
- - lib/Dnsruby/resource/OPT.rb
112
- - lib/Dnsruby/resource/PX.rb
113
- - lib/Dnsruby/resource/resource.rb
114
- - lib/Dnsruby/resource/RP.rb
115
- - lib/Dnsruby/resource/RRSIG.rb
116
- - lib/Dnsruby/resource/RT.rb
117
- - lib/Dnsruby/resource/SOA.rb
118
- - lib/Dnsruby/resource/SPF.rb
119
- - lib/Dnsruby/resource/SRV.rb
120
- - lib/Dnsruby/resource/SSHFP.rb
121
- - lib/Dnsruby/resource/TKEY.rb
122
- - lib/Dnsruby/resource/TSIG.rb
123
- - lib/Dnsruby/resource/TXT.rb
124
- - lib/Dnsruby/resource/X25.rb
125
- - lib/Dnsruby/select_thread.rb
126
- - lib/Dnsruby/single_verifier.rb
127
- - lib/Dnsruby/SingleResolver.rb
128
- - lib/Dnsruby/TheLog.rb
129
- - lib/Dnsruby/update.rb
130
- - lib/Dnsruby/validator_thread.rb
131
- - lib/Dnsruby/zone_reader.rb
132
- - lib/Dnsruby/zone_transfer.rb
133
- - lib/dnsruby.rb
134
- - demo/axfr.rb
135
- - demo/check_soa.rb
136
- - demo/check_zone.rb
137
- - demo/digdlv.rb
138
- - demo/digroot.rb
139
- - demo/example_recurse.rb
140
- - demo/mresolv.rb
141
- - demo/mx.rb
142
- - demo/rubydig.rb
143
- - demo/to_resolve.txt
144
- - demo/trace_dns.rb
145
- - DNSSEC
146
- - EXAMPLES
147
- - README
148
- - EVENTMACHINE
149
- homepage: http://rubyforge.org/projects/dnsruby/
150
- licenses: []
213
+ homepage: https://github.com/alexdalitz/dnsruby
214
+ licenses:
215
+ - Apache License, Version 2.0
151
216
  metadata: {}
152
217
  post_install_message:
153
218
  rdoc_options: []
@@ -155,17 +220,17 @@ require_paths:
155
220
  - lib
156
221
  required_ruby_version: !ruby/object:Gem::Requirement
157
222
  requirements:
158
- - - '>='
223
+ - - ">="
159
224
  - !ruby/object:Gem::Version
160
225
  version: '0'
161
226
  required_rubygems_version: !ruby/object:Gem::Requirement
162
227
  requirements:
163
- - - '>='
228
+ - - ">="
164
229
  - !ruby/object:Gem::Version
165
230
  version: '0'
166
231
  requirements: []
167
- rubyforge_project: dnsruby
168
- rubygems_version: 2.0.14
232
+ rubyforge_project:
233
+ rubygems_version: 2.4.2
169
234
  signing_key:
170
235
  specification_version: 4
171
236
  summary: Ruby DNS(SEC) implementation