dnsruby 1.39 → 1.40
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/Dnsruby/Recursor.rb +1 -1
- data/lib/Dnsruby/code_mapper.rb +5 -14
- data/lib/Dnsruby/name.rb +7 -5
- data/lib/Dnsruby/resource/AFSDB.rb +1 -1
- data/lib/Dnsruby/resource/CERT.rb +21 -8
- data/lib/Dnsruby/resource/DHCID.rb +55 -0
- data/lib/Dnsruby/resource/HINFO.rb +5 -1
- data/lib/Dnsruby/resource/HIP.rb +138 -0
- data/lib/Dnsruby/resource/IN.rb +2 -2
- data/lib/Dnsruby/resource/IPSECKEY.rb +143 -0
- data/lib/Dnsruby/resource/ISDN.rb +9 -1
- data/lib/Dnsruby/resource/KX.rb +66 -0
- data/lib/Dnsruby/resource/LOC.rb +10 -4
- data/lib/Dnsruby/resource/X25.rb +3 -1
- data/lib/Dnsruby/resource/generic.rb +5 -1
- data/lib/Dnsruby/resource/resource.rb +8 -2
- data/lib/Dnsruby/single_verifier.rb +3 -0
- data/lib/Dnsruby/zone_reader.rb +381 -0
- data/lib/dnsruby.rb +3 -0
- data/test/tc_hip.rb +70 -0
- data/test/tc_ipseckey.rb +70 -0
- data/test/tc_rr.rb +37 -1
- data/test/tc_verifier.rb +0 -46
- data/test/ts_offline.rb +2 -1
- metadata +10 -3
data/lib/dnsruby.rb
CHANGED
@@ -269,6 +269,7 @@ module Dnsruby
|
|
269
269
|
DHCID = 49 # RFC 4701
|
270
270
|
NSEC3 = 50 # RFC still pending at time of writing
|
271
271
|
NSEC3PARAM= 51 # RFC still pending at time of writing
|
272
|
+
HIP = 55 # RFC 5205
|
272
273
|
SPF = 99 # RFC 4408
|
273
274
|
UINFO = 100 # non-standard
|
274
275
|
UID = 101 # non-standard
|
@@ -372,6 +373,7 @@ module Dnsruby
|
|
372
373
|
|
373
374
|
# http://www.iana.org/assignments/dns-sec-alg-numbers/
|
374
375
|
class Algorithms < CodeMapper
|
376
|
+
RESERVED = 0
|
375
377
|
RSAMD5 = 1
|
376
378
|
DH = 2
|
377
379
|
DSA = 3
|
@@ -568,6 +570,7 @@ module Dnsruby
|
|
568
570
|
require 'Dnsruby/update'
|
569
571
|
require 'Dnsruby/zone_transfer'
|
570
572
|
require 'Dnsruby/dnssec'
|
573
|
+
require 'Dnsruby/zone_reader'
|
571
574
|
|
572
575
|
#Default Resolver to use for Dnsruby class methods
|
573
576
|
DefaultResolver = self.new
|
data/test/tc_hip.rb
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
|
2
|
+
#--
|
3
|
+
#Copyright 2007 Nominet UK
|
4
|
+
#
|
5
|
+
#Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
#you may not use this file except in compliance with the License.
|
7
|
+
#You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
#Unless required by applicable law or agreed to in writing, software
|
12
|
+
#distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
#See the License for the specific language governing permissions and
|
15
|
+
#limitations under the License.
|
16
|
+
#++
|
17
|
+
require 'rubygems'
|
18
|
+
require 'test/unit'
|
19
|
+
require 'dnsruby'
|
20
|
+
include Dnsruby
|
21
|
+
class TestHIP < Test::Unit::TestCase
|
22
|
+
def test_hip
|
23
|
+
[{"www.example.com. IN HIP ( 2 200100107B1A74DF365639CC39F1D578
|
24
|
+
AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D )" =>
|
25
|
+
[2, "200100107B1A74DF365639CC39F1D578", "AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D", []]},
|
26
|
+
|
27
|
+
{"www.example.com. IN HIP ( 2 200100107B1A74DF365639CC39F1D578
|
28
|
+
AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D
|
29
|
+
rvs.example.com. )" =>
|
30
|
+
[2, "200100107B1A74DF365639CC39F1D578", "AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D",
|
31
|
+
["rvs.example.com"]]},
|
32
|
+
{"www.example.com. IN HIP ( 2 200100107B1A74DF365639CC39F1D578
|
33
|
+
AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D
|
34
|
+
rvs1.example.com.
|
35
|
+
rvs2.example.com. )" =>
|
36
|
+
[2, "200100107B1A74DF365639CC39F1D578", "AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D",
|
37
|
+
["rvs1.example.com", "rvs2.example.com"]]},
|
38
|
+
].each {|hash|
|
39
|
+
hash.each {|txt, data|
|
40
|
+
|
41
|
+
|
42
|
+
hip = RR.create(txt)
|
43
|
+
assert(hip.pk_algorithm == data[0])
|
44
|
+
assert(hip.hit_string == data[1])
|
45
|
+
assert(hip.public_key_string == data[2])
|
46
|
+
hip.rsvs.each {|in_rsv|
|
47
|
+
assert(data[3].include?in_rsv.to_s)
|
48
|
+
}
|
49
|
+
assert(data[3].length == hip.rsvs.length)
|
50
|
+
|
51
|
+
|
52
|
+
m = Dnsruby::Message.new
|
53
|
+
m.add_additional(hip)
|
54
|
+
data = m.encode
|
55
|
+
m2 = Dnsruby::Message.decode(data)
|
56
|
+
hip2 = m2.additional()[0]
|
57
|
+
assert(hip.pk_algorithm == hip2.pk_algorithm)
|
58
|
+
assert(hip.hit_string == hip2.hit_string)
|
59
|
+
assert(hip.public_key_string == hip2.public_key_string)
|
60
|
+
hip.rsvs.each {|in_rsv|
|
61
|
+
assert(hip2.rsvs.include?in_rsv)
|
62
|
+
}
|
63
|
+
assert(hip2.rsvs.length == hip.rsvs.length)
|
64
|
+
assert(hip == hip2)
|
65
|
+
}
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
|
+
|
data/test/tc_ipseckey.rb
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
|
2
|
+
#--
|
3
|
+
#Copyright 2007 Nominet UK
|
4
|
+
#
|
5
|
+
#Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
#you may not use this file except in compliance with the License.
|
7
|
+
#You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
#Unless required by applicable law or agreed to in writing, software
|
12
|
+
#distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
#See the License for the specific language governing permissions and
|
15
|
+
#limitations under the License.
|
16
|
+
#++
|
17
|
+
require 'rubygems'
|
18
|
+
require 'test/unit'
|
19
|
+
require 'dnsruby'
|
20
|
+
include Dnsruby
|
21
|
+
class TestIPSECKEY < Test::Unit::TestCase
|
22
|
+
def test_ipseckey
|
23
|
+
[{"38.1.0.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 3 2
|
24
|
+
mygateway.example.com.
|
25
|
+
AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )" =>
|
26
|
+
["mygateway.example.com", "AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ==",
|
27
|
+
10, 3, 2]},
|
28
|
+
|
29
|
+
{"38.2.0.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 1 2
|
30
|
+
192.0.2.38
|
31
|
+
AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )" =>
|
32
|
+
["192.0.2.38", "AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ==", 10, 1, 2]},
|
33
|
+
{"38.2.0.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 0 2
|
34
|
+
.
|
35
|
+
AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )" =>
|
36
|
+
["", "AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ==", 10, 0, 2]},
|
37
|
+
{"38.2.0.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 1 2
|
38
|
+
192.0.2.3
|
39
|
+
AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )" =>
|
40
|
+
["192.0.2.3", "AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ==", 10, 1, 2]},
|
41
|
+
{"0.d.4.0.3.0.e.f.f.f.3.f.0.1.2.01.0.0.0.0.0.2.8.B.D.0.1.0.0.2.ip6.arpa. 7200 IN IPSECKEY ( 10 2 2
|
42
|
+
2001:0DB8:0:8002::2000:1
|
43
|
+
AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )" =>
|
44
|
+
["2001:DB8:0:8002::2000:1", "AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ==",
|
45
|
+
10, 2, 2]}
|
46
|
+
].each {|hash|
|
47
|
+
hash.each {|txt, data|
|
48
|
+
|
49
|
+
|
50
|
+
ipseckey = RR.create(txt)
|
51
|
+
assert(ipseckey.precedence == data[2])
|
52
|
+
assert(ipseckey.gateway_type == data[3])
|
53
|
+
assert(ipseckey.algorithm == data[4])
|
54
|
+
assert(ipseckey.gateway.to_s == data[0])
|
55
|
+
assert(ipseckey.public_key_string == data[1])
|
56
|
+
|
57
|
+
m = Dnsruby::Message.new
|
58
|
+
m.add_additional(ipseckey)
|
59
|
+
data = m.encode
|
60
|
+
m2 = Dnsruby::Message.decode(data)
|
61
|
+
ipseckey2 = m2.additional()[0]
|
62
|
+
assert(ipseckey.gateway_type == ipseckey2.gateway_type)
|
63
|
+
assert(ipseckey.algorithm == ipseckey2.algorithm)
|
64
|
+
assert(ipseckey.gateway == ipseckey2.gateway)
|
65
|
+
assert(ipseckey == ipseckey2)
|
66
|
+
}
|
67
|
+
}
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
data/test/tc_rr.rb
CHANGED
@@ -167,11 +167,16 @@ class TestRR < Test::Unit::TestCase
|
|
167
167
|
:certtype => 3,
|
168
168
|
:keytag => 1,
|
169
169
|
:alg => 1,
|
170
|
-
:cert => '
|
170
|
+
:cert => 'ffsayw1dvk7higuvhn56r26uwjx/',
|
171
171
|
},
|
172
172
|
{ #[25]
|
173
173
|
:type => Types.SPF,
|
174
174
|
:strings => 'txt-txtdata',
|
175
|
+
},
|
176
|
+
{
|
177
|
+
:type => Types.KX,
|
178
|
+
:preference => 10,
|
179
|
+
:exchange => 'kx-exchange.example.com',
|
175
180
|
},
|
176
181
|
]
|
177
182
|
|
@@ -265,4 +270,35 @@ class TestRR < Test::Unit::TestCase
|
|
265
270
|
update.add('example.com.','NAPTR', 3600, '1 0 "s" "SIP+D2T" "" _sip._tcp.example.com.')
|
266
271
|
update.encode
|
267
272
|
end
|
273
|
+
|
274
|
+
def test_cert
|
275
|
+
rr = RR.create("test.kht.se. 60 IN CERT PGP 0 0 mQGiBDnY2vERBAD3cOxqoAYHYzS+xttvuyN9wZS8CrgwLIlT8Ewo/CCFI11PEO+gJyNPvWPRQsyt1SE60reaIsie2bQTg3DYIg0PmH+ZOlNkpKesPULzdlw4Rx3dD/M3Lkrm977h4Y70ZKC+tbvoYKCCOIkUVevny1PVZ+mB94rb0mMgawSTrct03QCg/w6aHNJFQV7O9ZQ1Fir85M3RS8cEAOo4/1ASVudz3qKZQEhU2Z9O2ydXqpEanHfGirjWYi5RelVsQ9IfBSPFaPAWzQ24nvQ18NU7TgdDQhP4meZXiVXcLBR5Mee2kByf2KAnBUF9aah5s8wZbSrC6u8xEZLuiauvWmCUIWe0Ylc1/L37XeDjrBI2pT+k183X119d6Fr1BACGfZVGsot5rxBUEFPPSrBqYXG/0hRYv9Eq8a4rJAHK2IUWYfivZgL4DtrJnHlha+H5EPQVYkIAN3nGjXoHmosY+J3Sk+GyR+dCBHEwCkoHMKph3igczCEfxAWgqKeYd5mf+QQq2JKrkn2jceiIO7s3CrepeEFAjDSGuxhZjPJVm7QoRGFuaWVsIFAuIE1haG9uZXkgPGRhbm1AcHJpbWUuZ3VzaGkub3JnPohOBBARAgAOBQI52NrxBAsDAQICGQEACgkQ+75aMGJLskn6LgCbBXUD7UmGla5e1zyhuY667hP3F+UAoJIeDZJyRFkQAmb+u8KekRyLD1MLtDJEYW5pZWwgTWFob25leSAoU2Vjb25kYXJ5IEVtYWlsKSA8Z3VzaGlAZ3VzaGkub3JnPohgBBMRAgAgBQJF1J/XAhsjBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ+75aMGJLskkVhACggsivQ9qLhfdA1rGm6f8LRJBSC4wAoI930h+/hshClj6AkNwGRtHdf5XJuQINBDnY2vQQCAD2Qle3CH8IF3KiutapQvMF6PlTETlPtvFuuUs4INoBp1ajFOmPQFXz0AfGy0OplK33TGSGSfgMg71l6RfUodNQ+PVZX9x2Uk89PY3bzpnhV5JZzf24rnRPxfx2vIPFRzBhznzJZv8V+bv9kV7HAarTW56NoKVyOtQa8L9GAFgr5fSI/VhOSdvNILSd5JEHNmszbDgNRR0PfIizHHxbLY7288kjwEPwpVsYjY67VYy4XTjTNP18F1dDox0YbN4zISy1Kv884bEpQBgRjXyEpwpy1obEAxnIByl6ypUM2Zafq9AKUJsCRtMIPWakXUGfnHy9iUsiGSa6q6Jew1XpMgs7AAICB/9eGjzF2gDh6U7I72x/6bSdlExx2LvIF92OZKc0S55IOS4Lgzs7Hbfm1aOL4oJt7wBg94xkF4cerxz7y8R9J+k3GNl14KOjbYaMAh1rdxdAzikYMH1p1hS78GMtwxky6jE5en87BGGMmnbC84JlxwN+MD7diu8D0Gkgjj/pxOp32D5jEe02wBPVjFTpFLJjpFniLUY6AohRDEdSuZwWPuoKVWhpeWkasNn5qgwGyDREbXpyPsU02BkwE4JiGs+JMMdOn9KMh5dxiuwsMM9gHiQZS3mSNBBKPWI5ZXsdStVFvapjf2FUFDXLUbTROPv1Xhqf0u7YYORFnWeVtvzKIxVaiEYEGBECAAYFAjnY2vQACgkQ+75aMGJLsklBWgCeN7z9xk52y/aoaCuF6hYb0d+3k98AoMRxvHuXI1Nc2FXY/x65PwHiUbaY")
|
276
|
+
rr = RR.create("all.rr.org. IN CERT 6 0 0 FFsAyW1dVK7hIGuvhN56r26UwJx/")
|
277
|
+
# rr = RR.create("all.rr.org. IN WKS 128.32.0.10 UDP who route timed domain")
|
278
|
+
rr = RR.create('selector._domainkey.all.rr.org. IN TXT "v=DKIM1; n=Use=20DKIM; p=AwEAAZfbYw8SffZwsbrCLbC+JLErREIF6Yfe9aqsa1Pz6tpGWiLxm9rSL6/YoBvNP3UWX91YDF0JMo6lhu3UIZjITvIwDhx+RJYko9vLzaaJKXGf3ygy6z+deWoZJAV1lTY0Ltx9genboe88CSCHw9aSLkh0obN9Ck8R6zAMYR19ciM/; t=s"')
|
279
|
+
end
|
280
|
+
|
281
|
+
def test_dhcid
|
282
|
+
rr = RR.create("all.rr.org. IN DHCID AAIBY2/AuCccgoJbsaxcQc9TUapptP69lOjxfNuVAA2kjEA=")
|
283
|
+
m = Dnsruby::Message.new
|
284
|
+
m.add_additional(rr)
|
285
|
+
data = m.encode
|
286
|
+
m2 = Dnsruby::Message.decode(data)
|
287
|
+
rr2 = m2.additional()[0]
|
288
|
+
assert(rr == rr2)
|
289
|
+
end
|
290
|
+
|
291
|
+
def test_loc
|
292
|
+
rr = RR.create("all.rr.org. IN LOC 42 21 54 N 71 06 18 W -24m 30m")
|
293
|
+
assert(rr.vert_pre == 1000)
|
294
|
+
assert(rr.horiz_pre == 1000000)
|
295
|
+
lon = rr.longitude
|
296
|
+
# rr2 = RR.create("all.rr.org. 1209600 IN LOC 42 21 54.000 N 71 06 18.000 W 4294967272m 30m 10000m 10m")
|
297
|
+
# print rr2.longitude
|
298
|
+
# assert(rr2.longitude = lon)
|
299
|
+
# print rr.to_s + "\n"
|
300
|
+
# print rr2.to_s + "\n"
|
301
|
+
# assert(rr.longitude == rr2.longitude)
|
302
|
+
# assert(rr == rr2)
|
303
|
+
end
|
268
304
|
end
|
data/test/tc_verifier.rb
CHANGED
@@ -52,52 +52,6 @@ class VerifierTest < Test::Unit::TestCase
|
|
52
52
|
verifier = Dnsruby::SingleVerifier.new(nil)
|
53
53
|
verifier.verify_rrset(rrset, key512)
|
54
54
|
end
|
55
|
-
|
56
|
-
def test_sha2_zone
|
57
|
-
key1 = Dnsruby::RR.create("example.com. 3600 IN DNSKEY 256 3 8 AwEAAeTXG9RkEnPqrs1gTA
|
58
|
-
+7R2YdovW5HrObuMcsgIjfgAupTXX7NHBVUVX0oF2x8fJIeYt9pTuogTuUhw9/
|
59
|
-
kJrCI43VWa7xbsMkTbyj1/
|
60
|
-
wrfZB25nZnt4DQiqpYm8AZ3XmRBilibsGubVvrzWiQLC1gGXKUJ7JyQyL98G9ODUH2bmnb
|
61
|
-
;{id = 43938 (zsk), size = 1024b}")
|
62
|
-
key2 = Dnsruby::RR.create("example.com. 3600 IN DNSKEY 257 3 8
|
63
|
-
AwEAAeLAE37+XYbieMtOqPRMbimhCjcyc/bSTbMQtKioxzjzgBPu/gVgHTeITJa
|
64
|
-
+IBFOD763HkzmG6ZIEcNAagCLg6+xeTnp017CBWWgnU+ksXdjgQ5KLfM/g4d2TL/Xf/BZJP
|
65
|
-
+JcIYqx3BNDT//bJpuwXqk6WkMtHGDSfSugel26TvgxG9X9xTaJh0u/
|
66
|
-
QMFpm9H4IyQ8557cYAG04z8Yx3PszE5niE6JGho7Qpv2YhpsuLh7dneUTtdqFajdyqU0lZ3iDHnrfm7ve75LorIMPB0FqIo8Q
|
67
|
-
+hqV/U44QB/gTuXiBPjxje6D6WLWJdisIKflYZjUBD0FxuOXZQ5+RFVMV5RSc= ;{id =
|
68
|
-
18976 (ksk), size = 2048b}")
|
69
|
-
rrset = Dnsruby::RRSet.new(key1)
|
70
|
-
rrset.add(key2)
|
71
|
-
sig2 = Dnsruby::RR.create("example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20091109083537
|
72
|
-
20091012083537 18976 example.com. 0S/8cNh9otTenbcqQ2C5fxglGLrkI/EHp/
|
73
|
-
8Y3NDbJ5M50xUzrXd91wjDCE2X/z7UNGeBtyFRqm2ZeId4MygBIBsFaqOr98X8qQo3qpZ/
|
74
|
-
ZtudmSSlk8X77bnKzsBxdLQgtE/REiT6j556zJJ9LtQ/
|
75
|
-
yHgdMmJa5BNPYbQDpJdzJGIYLe1Gx8edOqcPt0LAc3FmjB096Gmlt7JpIWJXrh2Q82eDTkLiEpv7ePAimduKh14
|
76
|
-
+ERi6mLKFDaQjnfkwZ7/zjw6Ekp3a7L9Pa4S/OKUis/TarEQJf
|
77
|
-
+w9yAVKKL8HCIFKOXfn1rOWZ8LIEzlmUmOVOV03F1Paww+9fJaG+WDhpQ== ;{id =
|
78
|
-
18976}")
|
79
|
-
rrset.add(sig2)
|
80
|
-
verifier = Dnsruby::SingleVerifier.new(nil)
|
81
|
-
verifier.verify_rrset(rrset, key2)
|
82
|
-
sig = Dnsruby::RR.create("example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20091109083537
|
83
|
-
20091012083537 43938 example.com. TXaNGZ4QklUIlPtXaGhNegER
|
84
|
-
+uwJAvM9fSmnSt55FiMrMgkJDb6b/
|
85
|
-
GTyOF6INgKopO1wZRZI0iWaPUI0SRow6
|
86
|
-
+X8Idpk05uG7Two5R9uMGX0hu8PWc8BzuAxgeyawCYkXwXQ6Ah0PF9xkc/
|
87
|
-
Xlieo6T34XsoeHmKjmjMWs1KdFkU= ;{id = 43938}")
|
88
|
-
rrset.add(sig)
|
89
|
-
verifier.verify_rrset(rrset, key1)
|
90
|
-
txt = Dnsruby::RR.create('example.com. 86400 IN TXT "v=spf1 -all"')
|
91
|
-
rrset = Dnsruby::RRSet.new(txt)
|
92
|
-
txt_sig = Dnsruby::RR.create("example.com. 86400 IN RRSIG TXT 8 2 86400 20091109083536
|
93
|
-
20091012083536 43938 example.com. rZcuxDZ7QO1oBSqwlV
|
94
|
-
+1ar7RTvwWOCYpgZy6oxXQMWkxONXnHVQO32yl
|
95
|
-
+3WzROW4tYHfFpsdyvo1BCT1PRRXLcLFGJd/
|
96
|
-
T3Y6ciiq5ZzsesfYV0aChOUhseX7MnMjsaLGbmDDVmGqW78nsoBjv9g
|
97
|
-
+0YshQa7E1ctz2aQ2sorWN+E= ;{id = 43938}")
|
98
|
-
rrset.add(txt_sig)
|
99
|
-
verifier.verify_rrset(rrset, key1)
|
100
|
-
end
|
101
55
|
|
102
56
|
def test_se_query
|
103
57
|
# Run some queries on the .se zone
|
data/test/ts_offline.rb
CHANGED
@@ -39,6 +39,7 @@ require "test/tc_rrsig.rb"
|
|
39
39
|
require "test/tc_nsec.rb"
|
40
40
|
require "test/tc_nsec3.rb"
|
41
41
|
require "test/tc_nsec3param.rb"
|
42
|
+
require "test/tc_ipseckey.rb"
|
42
43
|
|
43
44
|
begin
|
44
45
|
require "openssl"
|
@@ -54,4 +55,4 @@ rescue Exception => e
|
|
54
55
|
end
|
55
56
|
if (have_openssl)
|
56
57
|
require "test/tc_ds.rb"
|
57
|
-
end
|
58
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dnsruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: "1.
|
4
|
+
version: "1.40"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AlexD
|
@@ -9,7 +9,7 @@ autorequire: dnsruby
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-12 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -36,6 +36,8 @@ files:
|
|
36
36
|
- test/tc_ds.rb
|
37
37
|
- test/tc_escapedchars.rb
|
38
38
|
- test/tc_header.rb
|
39
|
+
- test/tc_hip.rb
|
40
|
+
- test/tc_ipseckey.rb
|
39
41
|
- test/tc_itar.rb
|
40
42
|
- test/tc_misc.rb
|
41
43
|
- test/tc_name.rb
|
@@ -92,14 +94,18 @@ files:
|
|
92
94
|
- lib/Dnsruby/resource/AAAA.rb
|
93
95
|
- lib/Dnsruby/resource/AFSDB.rb
|
94
96
|
- lib/Dnsruby/resource/CERT.rb
|
97
|
+
- lib/Dnsruby/resource/DHCID.rb
|
95
98
|
- lib/Dnsruby/resource/DLV.rb
|
96
99
|
- lib/Dnsruby/resource/DNSKEY.rb
|
97
100
|
- lib/Dnsruby/resource/domain_name.rb
|
98
101
|
- lib/Dnsruby/resource/DS.rb
|
99
102
|
- lib/Dnsruby/resource/generic.rb
|
100
103
|
- lib/Dnsruby/resource/HINFO.rb
|
104
|
+
- lib/Dnsruby/resource/HIP.rb
|
101
105
|
- lib/Dnsruby/resource/IN.rb
|
106
|
+
- lib/Dnsruby/resource/IPSECKEY.rb
|
102
107
|
- lib/Dnsruby/resource/ISDN.rb
|
108
|
+
- lib/Dnsruby/resource/KX.rb
|
103
109
|
- lib/Dnsruby/resource/LOC.rb
|
104
110
|
- lib/Dnsruby/resource/MINFO.rb
|
105
111
|
- lib/Dnsruby/resource/MX.rb
|
@@ -128,6 +134,7 @@ files:
|
|
128
134
|
- lib/Dnsruby/TheLog.rb
|
129
135
|
- lib/Dnsruby/update.rb
|
130
136
|
- lib/Dnsruby/validator_thread.rb
|
137
|
+
- lib/Dnsruby/zone_reader.rb
|
131
138
|
- lib/Dnsruby/zone_transfer.rb
|
132
139
|
- lib/dnsruby.rb
|
133
140
|
- demo/axfr.rb
|
@@ -170,6 +177,6 @@ rubyforge_project: dnsruby
|
|
170
177
|
rubygems_version: 1.3.1
|
171
178
|
signing_key:
|
172
179
|
specification_version: 2
|
173
|
-
summary: Ruby DNS implementation
|
180
|
+
summary: Ruby DNS(SEC) implementation
|
174
181
|
test_files:
|
175
182
|
- test/ts_offline.rb
|