bullion 0.6.2 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 389f32145f01711a4286c82a16cf19d6ab7ea63de99d5f18fe86967d4b01f459
4
- data.tar.gz: 706d9f1a7e2a7b6b408af8061d06cb29b5d7c0caf084028f5dee0a3a5a8dade0
3
+ metadata.gz: 3e9ebdfc8744eadaf021a1f19f79c12e39b63e87896d21896c546ef875e15955
4
+ data.tar.gz: a6dd92c1c76bdd65a0e2a58ae90e3db912590d6f2e2e0a522adfeda5bc287e2e
5
5
  SHA512:
6
- metadata.gz: ea4404ede2c9d85556760d5891969dc4b896157993b49f006d04744eb7dc5de2fabc6b27a20f0443abf735293b0b877b1c2d89a6760e974936b32002cf163ca1
7
- data.tar.gz: 2b6b0cff828cd4161743a7981c098adfa7e94fe0ddd8cb6cf05527396ac4268650bcfa96166c69c9e6d9383a4d6314d5eb6769fab3128361fea3de86d610b2d5
6
+ metadata.gz: a6eaf7ae8d958d3adef49a95fe9d3c53b1610fed2ebdfcee0f13b7b71aacd07ded25e7652b0f1c0f8168d812df8ecbb83642c0679c3c8d26a75cf50207f21c35
7
+ data.tar.gz: ce2065af090c95f31ed8bfbcc23f4c12f452d3d52fca7f9715877c975e8a0dcb10a6670759277a218edb8b6988cadb9a3f45941f6cda4f71f77ecf084c51db54
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.1)
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
@@ -216,7 +216,7 @@ module Bullion
216
216
  csr_cert.subject = simple_subject(cert.subject.to_s)
217
217
 
218
218
  csr_cert.public_key = csr.public_key
219
- csr_cert.issuer = Bullion.ca_cert.issuer
219
+ csr_cert.issuer = Bullion.ca_cert.subject
220
220
 
221
221
  csr_cert, sans = manage_csr_extensions(csr, csr_cert)
222
222
 
@@ -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
+ 1 # 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.1
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-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable