puppetserver-ca 1.11.6 → 1.11.7

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: 9db462f676901c02e176c9b77066f58f98c01bef5d4f4ed73b5216619007e756
4
- data.tar.gz: bf80399c93b5622093d8c80a5d3b16f3c9ff1afa27edfe7c46551825c07aa512
3
+ metadata.gz: fb0be6c52e215c90fd1859e0a9e3460f08e0a1762f96bd0ffd200b3617879b24
4
+ data.tar.gz: ee870c87865bca5e5ac1ad1168c4087fc49c6911f0c68503896a42dd153184a0
5
5
  SHA512:
6
- metadata.gz: c407ef1a22634dc8affbf35d9484978dd8845109efe16bc0e6a62b29286eb0cb5d97571d9ad074da4156118d407a5f0569c1d71f9a3e4aa9a29e701144ca0eec
7
- data.tar.gz: 77e2518267853bddebdaaff1e657870a09eba2642cd0392fcea7a14096dd88329bcb547af9664903e0f34892e5f667ad19b66c455dc0d4f9f41f0cc63230d19f
6
+ metadata.gz: 073140413ae3ed5ea3755dca89ed0b2e8bc2db901cb5d3dbcf089367721b003aa68549da569bca706e73cb428bd988318e983117825eb4db0da94ad86f204944
7
+ data.tar.gz: 31bc27af9474c15261c652568e6b99afd29da33bbc8ad4cfcf4f62eeea215e6c00999d3efeb4a504efa78c4fdcd9a3decb372ebfb33a2d80b3231d3b6722de52
@@ -89,12 +89,23 @@ Options:
89
89
  end
90
90
 
91
91
  if (all || certnames.any?)
92
- all_certs = get_certs_or_csrs(puppet.settings).select { |cert| filter_names.call(cert) }
92
+ found_certs = get_certs_or_csrs(puppet.settings)
93
+ if found_certs.nil?
94
+ # nil is different from no certs found
95
+ @logger.err('Error while getting certificates')
96
+ return 1
97
+ end
98
+ all_certs = found_certs.select { |cert| filter_names.call(cert) }
93
99
  requested, signed, revoked = separate_certs(all_certs)
94
100
  missing = certnames - all_certs.map { |cert| cert['name'] }
95
101
  output_certs_by_state(all, output_format, requested, signed, revoked, missing)
96
102
  else
97
103
  all_csrs = get_certs_or_csrs(puppet.settings, "requested")
104
+ if all_csrs.nil?
105
+ # nil is different from no certs found
106
+ @logger.err('Error while getting certificate requests')
107
+ return 1
108
+ end
98
109
  output_certs_by_state(all, output_format, all_csrs)
99
110
  end
100
111
 
@@ -217,7 +228,7 @@ Options:
217
228
  if result
218
229
  return JSON.parse(result.body)
219
230
  else
220
- return []
231
+ return nil
221
232
  end
222
233
  end
223
234
 
@@ -1,5 +1,5 @@
1
1
  module Puppetserver
2
2
  module Ca
3
- VERSION = "1.11.6"
3
+ VERSION = "1.11.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppetserver-ca
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.6
4
+ version: 1.11.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-07 00:00:00.000000000 Z
11
+ date: 2022-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facter
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
142
  requirements: []
143
- rubygems_version: 3.0.8
143
+ rubygems_version: 3.0.9
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: A simple CLI tool for interacting with Puppet Server's Certificate Authority