acme-client 2.0.8 → 2.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rubocop.yml +23 -0
- data/.github/workflows/test.yml +26 -0
- data/CHANGELOG.md +13 -0
- data/Gemfile +4 -4
- data/acme-client.gemspec +5 -7
- data/lib/acme/client/error.rb +4 -0
- data/lib/acme/client/faraday_middleware.rb +3 -3
- data/lib/acme/client/resources/directory.rb +6 -2
- data/lib/acme/client/version.rb +1 -1
- data/lib/acme/client.rb +1 -0
- metadata +42 -13
- data/.travis.yml +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ff7c41acdce5ad9f39a371998b37466d8affe4cb3de5e856d44d36e512180ea
|
4
|
+
data.tar.gz: cb9fda5e72bf22dc93659a238b05dd419652584238a024658ebde04aaefc9e80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eea011baa47710043bab4f22e6556d6ece49ae1a87005e30ec25a41d1abeb93bf6a049ecadf742d706c6ebef7c6ece862704aadd96c252e8c6d801bf814c221a
|
7
|
+
data.tar.gz: 77a75476bd154d46349acee637aad44e08ef911a676e0da5de9267b5f1cc1b845cd2d8030511fd25e2ee31354cdb269f4151a6c1ae36816ff75908864effa6d6
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: Lint
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
rubocop:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby-version: ['3.0']
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: ${{ matrix.ruby-version }}
|
21
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
22
|
+
- name: Run tests
|
23
|
+
run: bundle exec rake rubocop
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby-version: ['2.6', '2.7', '3.0', truffleruby-head]
|
15
|
+
faraday-version: ['~> 1.7', '~> 2.0']
|
16
|
+
env:
|
17
|
+
FARADAY_VERSION: ${{ matrix.faraday-version }}
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- name: Set up Ruby
|
21
|
+
uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
ruby-version: ${{ matrix.ruby-version }}
|
24
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
25
|
+
- name: Run tests
|
26
|
+
run: bundle exec rake spec
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## `2.0.11`
|
2
|
+
|
3
|
+
* Add support for error code `AlreadyRevoked` and `BadPublicKey`
|
4
|
+
|
5
|
+
## `2.0.10`
|
6
|
+
|
7
|
+
* Support for Faraday 1.0 / 2.0
|
8
|
+
|
9
|
+
## `2.0.9`
|
10
|
+
|
11
|
+
* Support for Ruby 3.0 and Faraday 0.17.x
|
12
|
+
* Raise when directory is rate limited
|
13
|
+
|
1
14
|
## `2.0.8`
|
2
15
|
|
3
16
|
* Add support for the keyChange endpoint
|
data/Gemfile
CHANGED
@@ -2,12 +2,12 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
+
if faraday_version = ENV['FARADAY_VERSION']
|
6
|
+
gem 'faraday', faraday_version
|
7
|
+
end
|
8
|
+
|
5
9
|
group :development, :test do
|
6
10
|
gem 'pry'
|
7
11
|
gem 'rubocop', '~> 0.49.0'
|
8
12
|
gem 'ruby-prof', require: false
|
9
|
-
|
10
|
-
if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new('2.2.2')
|
11
|
-
gem 'activesupport', '~> 4.2.6'
|
12
|
-
end
|
13
13
|
end
|
data/acme-client.gemspec
CHANGED
@@ -14,17 +14,15 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
15
15
|
spec.require_paths = ['lib']
|
16
16
|
|
17
|
-
spec.required_ruby_version = '>= 2.
|
17
|
+
spec.required_ruby_version = '>= 2.3.0'
|
18
18
|
|
19
19
|
spec.add_development_dependency 'bundler', '>= 1.17.3'
|
20
|
-
|
21
|
-
spec.add_development_dependency 'rake', '>= 12.0'
|
22
|
-
else
|
23
|
-
spec.add_development_dependency 'rake', '~> 13.0'
|
24
|
-
end
|
20
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
25
21
|
spec.add_development_dependency 'rspec', '~> 3.9'
|
26
22
|
spec.add_development_dependency 'vcr', '~> 2.9'
|
27
23
|
spec.add_development_dependency 'webmock', '~> 3.8'
|
24
|
+
spec.add_development_dependency 'webrick'
|
28
25
|
|
29
|
-
spec.add_runtime_dependency 'faraday', '>= 0
|
26
|
+
spec.add_runtime_dependency 'faraday', '>= 1.0', '< 3.0.0'
|
27
|
+
spec.add_runtime_dependency 'faraday-retry', '~> 1.0'
|
30
28
|
end
|
data/lib/acme/client/error.rb
CHANGED
@@ -10,8 +10,10 @@ class Acme::Client::Error < StandardError
|
|
10
10
|
class ForcedChainNotFound < ClientError; end
|
11
11
|
|
12
12
|
class ServerError < Acme::Client::Error; end
|
13
|
+
class AlreadyRevoked < ServerError; end
|
13
14
|
class BadCSR < ServerError; end
|
14
15
|
class BadNonce < ServerError; end
|
16
|
+
class BadPublicKey < ServerError; end
|
15
17
|
class BadSignatureAlgorithm < ServerError; end
|
16
18
|
class InvalidContact < ServerError; end
|
17
19
|
class UnsupportedContact < ServerError; end
|
@@ -32,8 +34,10 @@ class Acme::Client::Error < StandardError
|
|
32
34
|
class IncorrectResponse < ServerError; end
|
33
35
|
|
34
36
|
ACME_ERRORS = {
|
37
|
+
'urn:ietf:params:acme:error:alreadyRevoked' => AlreadyRevoked,
|
35
38
|
'urn:ietf:params:acme:error:badCSR' => BadCSR,
|
36
39
|
'urn:ietf:params:acme:error:badNonce' => BadNonce,
|
40
|
+
'urn:ietf:params:acme:error:badPublicKey' => BadPublicKey,
|
37
41
|
'urn:ietf:params:acme:error:badSignatureAlgorithm' => BadSignatureAlgorithm,
|
38
42
|
'urn:ietf:params:acme:error:invalidContact' => InvalidContact,
|
39
43
|
'urn:ietf:params:acme:error:unsupportedContact' => UnsupportedContact,
|
@@ -5,10 +5,10 @@ class Acme::Client::FaradayMiddleware < Faraday::Middleware
|
|
5
5
|
|
6
6
|
CONTENT_TYPE = 'application/jose+json'
|
7
7
|
|
8
|
-
def initialize(app,
|
8
|
+
def initialize(app, options)
|
9
9
|
super(app)
|
10
|
-
@client = client
|
11
|
-
@mode = mode
|
10
|
+
@client = options.fetch(:client)
|
11
|
+
@mode = options.fetch(:mode)
|
12
12
|
end
|
13
13
|
|
14
14
|
def call(env)
|
@@ -68,9 +68,13 @@ class Acme::Client::Resources::Directory
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def fetch_directory
|
71
|
-
connection = Faraday.new(url: @directory, **@connection_options)
|
71
|
+
connection = Faraday.new(url: @directory, **@connection_options) do |configuration|
|
72
|
+
configuration.use Acme::Client::FaradayMiddleware, client: nil, mode: nil
|
73
|
+
|
74
|
+
configuration.adapter Faraday.default_adapter
|
75
|
+
end
|
72
76
|
connection.headers[:user_agent] = Acme::Client::USER_AGENT
|
73
77
|
response = connection.get(@url)
|
74
|
-
|
78
|
+
response.body
|
75
79
|
end
|
76
80
|
end
|
data/lib/acme/client/version.rb
CHANGED
data/lib/acme/client.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acme-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Barbier
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,37 +80,66 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '3.8'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: webrick
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: faraday
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - ">="
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0
|
103
|
+
version: '1.0'
|
90
104
|
- - "<"
|
91
105
|
- !ruby/object:Gem::Version
|
92
|
-
version:
|
106
|
+
version: 3.0.0
|
93
107
|
type: :runtime
|
94
108
|
prerelease: false
|
95
109
|
version_requirements: !ruby/object:Gem::Requirement
|
96
110
|
requirements:
|
97
111
|
- - ">="
|
98
112
|
- !ruby/object:Gem::Version
|
99
|
-
version: '0
|
113
|
+
version: '1.0'
|
100
114
|
- - "<"
|
101
115
|
- !ruby/object:Gem::Version
|
102
|
-
version:
|
103
|
-
|
116
|
+
version: 3.0.0
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: faraday-retry
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '1.0'
|
124
|
+
type: :runtime
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '1.0'
|
131
|
+
description:
|
104
132
|
email:
|
105
133
|
- unixcharles@gmail.com
|
106
134
|
executables: []
|
107
135
|
extensions: []
|
108
136
|
extra_rdoc_files: []
|
109
137
|
files:
|
138
|
+
- ".github/workflows/rubocop.yml"
|
139
|
+
- ".github/workflows/test.yml"
|
110
140
|
- ".gitignore"
|
111
141
|
- ".rspec"
|
112
142
|
- ".rubocop.yml"
|
113
|
-
- ".travis.yml"
|
114
143
|
- CHANGELOG.md
|
115
144
|
- Gemfile
|
116
145
|
- LICENSE.txt
|
@@ -148,7 +177,7 @@ homepage: http://github.com/unixcharles/acme-client
|
|
148
177
|
licenses:
|
149
178
|
- MIT
|
150
179
|
metadata: {}
|
151
|
-
post_install_message:
|
180
|
+
post_install_message:
|
152
181
|
rdoc_options: []
|
153
182
|
require_paths:
|
154
183
|
- lib
|
@@ -156,15 +185,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
156
185
|
requirements:
|
157
186
|
- - ">="
|
158
187
|
- !ruby/object:Gem::Version
|
159
|
-
version: 2.
|
188
|
+
version: 2.3.0
|
160
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
190
|
requirements:
|
162
191
|
- - ">="
|
163
192
|
- !ruby/object:Gem::Version
|
164
193
|
version: '0'
|
165
194
|
requirements: []
|
166
|
-
rubygems_version: 3.
|
167
|
-
signing_key:
|
195
|
+
rubygems_version: 3.2.20
|
196
|
+
signing_key:
|
168
197
|
specification_version: 4
|
169
198
|
summary: Client for the ACME protocol.
|
170
199
|
test_files: []
|