dnsruby 1.70.0 → 1.71.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/RELEASE_NOTES.md +4 -0
- data/Rakefile +1 -0
- data/dnsruby.gemspec +1 -1
- data/lib/dnsruby/resource/DNSKEY.rb +14 -7
- data/lib/dnsruby/resource/TSIG.rb +1 -1
- data/lib/dnsruby/version.rb +1 -1
- data/lib/dnsruby/zone_transfer.rb +1 -1
- data/test/tc_dns.rb +1 -1
- data/test/tc_ecdsa.rb +27 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 269c27f2434453482847eab90060c2de583ca876e9056b8acff0c9df23a64a84
|
4
|
+
data.tar.gz: 37c09c9a2c25f97cfd391ee8662de09b1698a44b189abe2cd75753579c87379a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6863374c8f220932c6aff08fce2a8afd1e38267f44f505121516580b69e4c5691a613d11b45e4227939586f6283743871834138bca06a8776a26f6b32c2141ad
|
7
|
+
data.tar.gz: e58edc0688147d6c8e6576bf6144469d52b09120da7a7d7d0c00fc962579e1c49e23962264caa448d1bb54c70559e25e4663a176d95fe5282a43dba631233035
|
data/.github/workflows/ci.yml
CHANGED
data/RELEASE_NOTES.md
CHANGED
data/Rakefile
CHANGED
@@ -27,6 +27,7 @@ def create_task(task_name, test_suite_filespec)
|
|
27
27
|
end
|
28
28
|
|
29
29
|
create_task(:test, 'test/ts_dnsruby.rb')
|
30
|
+
create_task(:dnskey, 'test/tc_dnskey.rb')
|
30
31
|
create_task(:test_offline, 'test/ts_offline.rb')
|
31
32
|
create_task(:test_online, 'test/ts_online.rb')
|
32
33
|
create_task(:soak, 'test/tc_soak.rb')
|
data/dnsruby.gemspec
CHANGED
@@ -38,7 +38,7 @@ DNSSEC NSEC3 support.'
|
|
38
38
|
s.add_development_dependency 'rake', '>= 13.0.6'
|
39
39
|
s.add_development_dependency 'minitest', '~> 5.18.0'
|
40
40
|
s.add_development_dependency 'rubydns', '>= 2.0.2'
|
41
|
-
s.add_development_dependency 'nio4r', '>= 2.
|
41
|
+
s.add_development_dependency 'nio4r', '>= 2.7.0'
|
42
42
|
s.add_development_dependency 'minitest-display', '>= 0.3.1'
|
43
43
|
s.add_development_dependency('yard', '>= 0.9')
|
44
44
|
# s.add_development_dependency('io-event', '>=1.1.7')
|
@@ -392,15 +392,22 @@ module Dnsruby
|
|
392
392
|
# uncompressed form of a curve point, "x | y".
|
393
393
|
def ec_key(curve = 'prime256v1')
|
394
394
|
group = OpenSSL::PKey::EC::Group.new(curve)
|
395
|
-
pkey = OpenSSL::PKey::EC.new(group)
|
396
395
|
# DNSSEC pub does not have first octet that determines whether it's uncompressed
|
397
396
|
# or compressed form, but it's required by OpenSSL to parse EC point correctly
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
397
|
+
dnskey_bn = OpenSSL::BN.new("\x04" + @key, 2)
|
398
|
+
key_point = OpenSSL::PKey::EC::Point.new(group, dnskey_bn)
|
399
|
+
|
400
|
+
asn1 = OpenSSL::ASN1::Sequence.new(
|
401
|
+
[
|
402
|
+
OpenSSL::ASN1::Sequence.new([
|
403
|
+
OpenSSL::ASN1::ObjectId.new("id-ecPublicKey"),
|
404
|
+
OpenSSL::ASN1::ObjectId.new(group.curve_name)
|
405
|
+
]),
|
406
|
+
OpenSSL::ASN1::BitString.new(key_point.to_octet_string(:uncompressed))
|
407
|
+
]
|
408
|
+
)
|
409
|
+
OpenSSL::PKey::EC.new(asn1.to_der)
|
403
410
|
end
|
404
411
|
end
|
405
412
|
end
|
406
|
-
end
|
413
|
+
end
|
data/lib/dnsruby/version.rb
CHANGED
data/test/tc_dns.rb
CHANGED
@@ -25,7 +25,7 @@ class TestDNS < Minitest::Test
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def test_ipv4_address
|
28
|
-
Dnsruby::DNS.open { |dns| dns.getnames(Dnsruby::IPv4.create("
|
28
|
+
Dnsruby::DNS.open { |dns| dns.getnames(Dnsruby::IPv4.create("8.8.8.8")) }
|
29
29
|
end
|
30
30
|
|
31
31
|
# def test_resolv_rb_api
|
data/test/tc_ecdsa.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
Dnsruby::TheLog.level = Logger::DEBUG
|
4
|
+
|
5
|
+
class VerifierTest < Minitest::Test
|
6
|
+
|
7
|
+
def test_ecdsa
|
8
|
+
inner_resolver = Dnsruby::Resolver.new
|
9
|
+
inner_resolver.do_validation = true
|
10
|
+
inner_resolver.dnssec = true
|
11
|
+
resolver = Dnsruby::Recursor.new(inner_resolver)
|
12
|
+
resolver.dnssec = true
|
13
|
+
|
14
|
+
# Dnsruby::TheLog.level=Logger::DEBUG
|
15
|
+
|
16
|
+
name = 'carlgo11.com'
|
17
|
+
type = 'A'
|
18
|
+
klass = 'IN'
|
19
|
+
|
20
|
+
begin
|
21
|
+
answer = resolver.query(name, type, klass)
|
22
|
+
print answer
|
23
|
+
rescue Exception => e
|
24
|
+
fatal_error("query failed: #{e}")
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dnsruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.71.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Dalitz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.
|
61
|
+
version: 2.7.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 2.
|
68
|
+
version: 2.7.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: minitest-display
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,6 +254,7 @@ files:
|
|
254
254
|
- test/tc_dns.rb
|
255
255
|
- test/tc_dnskey.rb
|
256
256
|
- test/tc_ds.rb
|
257
|
+
- test/tc_ecdsa.rb
|
257
258
|
- test/tc_encoding.rb
|
258
259
|
- test/tc_escapedchars.rb
|
259
260
|
- test/tc_gpos.rb
|
@@ -335,7 +336,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
335
336
|
- !ruby/object:Gem::Version
|
336
337
|
version: '0'
|
337
338
|
requirements: []
|
338
|
-
rubygems_version: 3.3
|
339
|
+
rubygems_version: 3.5.3
|
339
340
|
signing_key:
|
340
341
|
specification_version: 4
|
341
342
|
summary: Ruby DNS(SEC) implementation
|