puma-acme 0.1.4 → 0.1.6

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: 66741709adca41127a7eebb62a7012bda8866ed0ec8b4000c41d7c4428e401f7
4
- data.tar.gz: 87f0fe1b1939d919e94a8d3b57a01724b3a5cca1134cd4a9c5070a4fee46024a
3
+ metadata.gz: 234431682e5fd5fcad7624087df63b5f1cc5b261bf96a6d7c7c934fba4e414b4
4
+ data.tar.gz: 9a4699146d24fd5ed788d5c8596d26cbc150d0288039dac48f280457248ff89b
5
5
  SHA512:
6
- metadata.gz: 83353e186df39a2eb1bdbed8a7bfedb6f27c17fd4cd253fd054525798faacb8389cf13203c212b91fb9934762b59ded9b68ef6dfbbbef2d5f86f640abbd01fa2
7
- data.tar.gz: b3d8782d477859287cd80f5a15ca3d509dba74f8b95ff7aaad96c8806b03fd84d13664fdc913a80560dec7769021c40fb504c95cef8747c9e7460c1d9cfc25b4
6
+ metadata.gz: '008e6c1f9195067575b55246f5301aaeff295cef3f005070b61e4c6af364568fd6081e076ce857b80449b090bfc592a0de86e0ed00a3e0556c9b3c4836e07079'
7
+ data.tar.gz: 65fbaf95c7a2b3428b58eff7fa6663e678da1bfac13d0235a13f97d50e04028de7491ea416a187fb458f476cc3a61699f32f7560a7c9821d5ae6261b5002808e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## 0.1.6 - 07/15/24
4
+
5
+ - clear memoized x509 data for Cert#cert_pem=
6
+ - drop ruby 3.1 syntax
7
+ - simplify bind/listening output
8
+ - add a foreground cert provisioning success log message
9
+
10
+ ## 0.1.5 - 4/11/24
11
+
12
+ - further fixes to expired order/cert renewal
13
+
3
14
  ## 0.1.4 - 4/11/24
4
15
 
5
16
  - fix for expired order/cert renewal
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- puma-acme (0.1.4)
4
+ puma-acme (0.1.6)
5
5
  acme-client (~> 2.0.13)
6
6
  pstore (~> 0.1)
7
7
  puma (~> 6.0)
@@ -39,6 +39,7 @@ GEM
39
39
  public_suffix (5.0.4)
40
40
  puma (6.4.2)
41
41
  nio4r (~> 2.0)
42
+ r509 (1.0.1)
42
43
  rack (3.0.9.1)
43
44
  rack-protection (4.0.0)
44
45
  base64 (>= 0.1.0)
@@ -70,6 +71,7 @@ DEPENDENCIES
70
71
  minitest (~> 5.14)
71
72
  minitest-mock_expectations (~> 1.2)
72
73
  puma-acme!
74
+ r509 (~> 1.0)
73
75
  rake (~> 13.0)
74
76
  vcr (~> 6.1)
75
77
  webmock (~> 3.19)
@@ -70,6 +70,8 @@ module Puma
70
70
  @logger.log 'Puma foreground provisioning cert via puma-acme plugin...'
71
71
 
72
72
  provision(cert, poll_interval: poll_interval)
73
+ @logger.log "Cert provisioned for [#{cert.names.join(', ')}] via puma-acme plugin."
74
+
73
75
  bind_to(launcher, cert)
74
76
 
75
77
  if renew_at
@@ -109,7 +111,7 @@ module Puma
109
111
  end
110
112
 
111
113
  cert.identifiers.each do |identifier|
112
- @logger.log "* Listening on ssl://#{uri.host}:#{uri.port} for https://#{identifier.value}:#{uri.port} (puma-acme)"
114
+ @logger.log "* Listening on https://#{identifier.value}:#{uri.port} (puma-acme)"
113
115
  end
114
116
 
115
117
  launcher.binder.listeners << [str, io]
@@ -59,6 +59,13 @@ module Puma
59
59
  super(identifiers: identifiers, **kwargs)
60
60
  end
61
61
 
62
+ undef cert_pem=
63
+ def cert_pem=(pem)
64
+ @x509 = nil
65
+
66
+ self[:cert_pem] = pem
67
+ end
68
+
62
69
  def key
63
70
  [:cert, algorithm, identifiers&.map(&:key)]
64
71
  end
@@ -68,7 +75,7 @@ module Puma
68
75
  end
69
76
 
70
77
  def expired?(now: Time.now.utc)
71
- x509.not_after > now
78
+ x509.not_after < now
72
79
  end
73
80
 
74
81
  def usable?(now: Time.now.utc)
@@ -135,7 +142,7 @@ module Puma
135
142
  end
136
143
 
137
144
  def expired?(now: Time.now.utc)
138
- not_after > now
145
+ expires < now
139
146
  end
140
147
  end
141
148
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Puma
4
4
  module Acme
5
- VERSION = '0.1.4'
5
+ VERSION = '0.1.6'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma-acme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anchor Security, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-11 00:00:00.000000000 Z
11
+ date: 2024-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: acme-client
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.2'
111
+ - !ruby/object:Gem::Dependency
112
+ name: r509
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '1.0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '1.0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: rake
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -197,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
211
  - !ruby/object:Gem::Version
198
212
  version: '0'
199
213
  requirements: []
200
- rubygems_version: 3.4.22
214
+ rubygems_version: 3.4.10
201
215
  signing_key:
202
216
  specification_version: 4
203
217
  summary: Puma plugin for ACME.