bullion 0.6.2 → 0.7.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 389f32145f01711a4286c82a16cf19d6ab7ea63de99d5f18fe86967d4b01f459
4
- data.tar.gz: 706d9f1a7e2a7b6b408af8061d06cb29b5d7c0caf084028f5dee0a3a5a8dade0
3
+ metadata.gz: 36ed2c3c1d482d903b483d03c4295a9ad784763f34becf488e55775b2d248594
4
+ data.tar.gz: dea3a389dd9aa344d8f2e570af7913e00be67d5ec47bc5e6eb6f31f5dce4e356
5
5
  SHA512:
6
- metadata.gz: ea4404ede2c9d85556760d5891969dc4b896157993b49f006d04744eb7dc5de2fabc6b27a20f0443abf735293b0b877b1c2d89a6760e974936b32002cf163ca1
7
- data.tar.gz: 2b6b0cff828cd4161743a7981c098adfa7e94fe0ddd8cb6cf05527396ac4268650bcfa96166c69c9e6d9383a4d6314d5eb6769fab3128361fea3de86d610b2d5
6
+ metadata.gz: ced33b6e567f3e9fd3529e08172b7f7e40a64042868f75589cbeda8db5a20067ff8e7851be257e2d1b9c8ae9ffd6c017a4e275671a8b50fc52732e5c0e1493d9
7
+ data.tar.gz: e6c3371fbb984eccb6e32ccc5d719372f3faf313ac0ed3f938eb7d6f339b2a88d8fa2a4be8231a820f24c61dcfb4ef3dcf3c877c53805e29ace1fa69b30d766f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bullion (0.6.2)
4
+ bullion (0.7.0)
5
5
  dry-configurable (~> 1.1)
6
6
  httparty (~> 0.21)
7
7
  json (~> 2.6)
@@ -22,6 +22,8 @@ module Bullion
22
22
  tries = 0
23
23
  success = false
24
24
 
25
+ challenge.update!(status: "processing")
26
+
25
27
  benchtime = Benchmark.realtime do
26
28
  until success || tries >= retries
27
29
  tries += 1
@@ -39,6 +41,8 @@ module Bullion
39
41
  unless success
40
42
  LOGGER.info "Failed to validate #{type} #{identifier}"
41
43
  challenge.status = "invalid"
44
+ challenge.authorization.update!(status: "invalid")
45
+ challenge.authorization.order.update!(status: "invalid")
42
46
  end
43
47
 
44
48
  challenge.save
@@ -24,7 +24,7 @@ module Bullion
24
24
 
25
25
  def thumbprint
26
26
  cipher = OpenSSL::Digest.new("SHA256")
27
- digest = cipher.digest(authorization.order.account.public_key.to_json)
27
+ digest = cipher.digest(lexicographically_ordered_public_key.to_json)
28
28
  Base64.urlsafe_encode64(digest).sub(/[\s=]*\z/, "")
29
29
  end
30
30
 
@@ -38,6 +38,13 @@ module Bullion
38
38
 
39
39
  challenge_class.new(self)
40
40
  end
41
+
42
+ private
43
+
44
+ def lexicographically_ordered_public_key
45
+ jwk = authorization.order.account.public_key
46
+ [["e", jwk["e"]], ["kty", jwk["kty"]], ["n", jwk["n"]]].to_h
47
+ end
41
48
  end
42
49
  end
43
50
  end
@@ -345,6 +345,8 @@ module Bullion
345
345
  # Oddly enough, cert-manager uses a GET request for retrieving Challenge info
346
346
  challenge.client.attempt unless @json_body && @json_body[:payload] == ""
347
347
 
348
+ challenge.reload
349
+
348
350
  data = {
349
351
  type: challenge.acme_type,
350
352
  status: challenge.status,
@@ -3,7 +3,7 @@
3
3
  module Bullion
4
4
  VERSION = [
5
5
  0, # major
6
- 6, # minor
7
- 2 # patch
6
+ 7, # minor
7
+ 0 # patch
8
8
  ].join(".")
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Gnagy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-28 00:00:00.000000000 Z
11
+ date: 2024-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable