acme_nsupdate 0.4.3 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/acme_nsupdate/strategies/dns01.rb +9 -3
- data/lib/acme_nsupdate/strategy.rb +19 -2
- data/lib/acme_nsupdate/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcf1ae51c7808408407ff607d7415766088e1060ce3cb63e0f9f362b652a538c
|
4
|
+
data.tar.gz: 6719543b5ec0b4cbf197b227f36286f817b947915e09ff3eb0695e0f3660581d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6620b1037693afc4447d7be07db180e81fd4441b9431e6481f80174242c1385d22f467f4e02457816e59bff8038e0748c85b186c6a0fe085998f5cc7fdf9a47
|
7
|
+
data.tar.gz: 6479e09299fcd217a384d7c50e44917f643e1ee18def38322f89aa3ad950b57967bf41462eb643fa606f8575766dd6adfa1404ee00b3de540f7cfe8c24937084
|
@@ -83,14 +83,20 @@ module AcmeNsupdate
|
|
83
83
|
begin
|
84
84
|
sender = requester.sender(message, name, primary, 53)
|
85
85
|
reply, _ = requester.request(sender, 10)
|
86
|
-
authority = !reply.authority.empty? ? reply.authority.first.first.to_s : reply.answer.first
|
86
|
+
authority = !reply.authority.empty? ? reply.authority.first.first.to_s : reply.answer.first.first.to_s
|
87
87
|
ensure
|
88
88
|
requester.close
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
92
|
-
|
93
|
-
|
92
|
+
unless authority
|
93
|
+
@client.logger.warn "Could not determine authority for #{name}, returning empty list of nameservers"
|
94
|
+
return []
|
95
|
+
end
|
96
|
+
|
97
|
+
query(primary, authority, :NS).map {|record| record.name.to_s }.uniq.tap do |nameservers|
|
98
|
+
@client.logger.debug "List of nameservers to check: #{nameservers.join(', ')}"
|
99
|
+
end
|
94
100
|
end
|
95
101
|
|
96
102
|
def query(nameserver, name, qtype)
|
@@ -48,8 +48,25 @@ module AcmeNsupdate
|
|
48
48
|
def wait_for_verification challenges
|
49
49
|
@client.logger.debug("Requesting verification")
|
50
50
|
challenges.each_value(&:request_validation)
|
51
|
-
|
52
|
-
|
51
|
+
|
52
|
+
@client.logger.debug("Waiting 120 seconds for verification")
|
53
|
+
waited = 0
|
54
|
+
challenges.each do |domain, challenge|
|
55
|
+
challenge.reload
|
56
|
+
|
57
|
+
next unless challenge.status == "pending"
|
58
|
+
|
59
|
+
if waited >= 120
|
60
|
+
@client.logger.error "Timeout while waiting for validation of challenge for #{domain}"
|
61
|
+
break
|
62
|
+
end
|
63
|
+
|
64
|
+
@client.logger.debug "Challenge for #{domain} is pending, waiting 5 seconds"
|
65
|
+
sleep(5)
|
66
|
+
waited += 5
|
67
|
+
redo
|
68
|
+
end
|
69
|
+
|
53
70
|
challenges.each do |domain, challenge|
|
54
71
|
raise "Verification of #{domain} failed: #{challenge.error}" unless challenge.status == "valid"
|
55
72
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acme_nsupdate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonne Haß
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slop
|
@@ -105,7 +105,7 @@ homepage: https://github.com/jhass/acme_nsupdate
|
|
105
105
|
licenses:
|
106
106
|
- MIT
|
107
107
|
metadata: {}
|
108
|
-
post_install_message:
|
108
|
+
post_install_message:
|
109
109
|
rdoc_options: []
|
110
110
|
require_paths:
|
111
111
|
- lib
|
@@ -120,8 +120,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
|
-
rubygems_version: 3.
|
124
|
-
signing_key:
|
123
|
+
rubygems_version: 3.4.13
|
124
|
+
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: ACME (Let's Encrypt) client with nsupdate (DDNS) integration.
|
127
127
|
test_files: []
|