puppetserver-ca 1.11.4 → 1.11.5

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: f87fa83d3ff569fee855447005639494a385d4d01a20d2e32ed88e4a163f2719
4
- data.tar.gz: 5b7a864f4a2740c9d86e4de14bf040863fdbe0d865f3b0840a0a043c646c1862
3
+ metadata.gz: 2a83e41c0525189b98d0fbdb8922c0c72d8d45a6cd74e9c4f85706d368dbab3c
4
+ data.tar.gz: 9c58fa566bb413d0dded376f6dc7846911826e7f5cbac75f1140ccc68afd7d8a
5
5
  SHA512:
6
- metadata.gz: e2f557beb7b22e3c216f43f07f3b48eb4f186db777d59568dff0b20dd2e7fd67167fb1b5d37ec14744dbc28bd5f0083807760678dbcad27c96999b759c1dd507
7
- data.tar.gz: 7d1f4778efd450240815353c8b144675d5ff54f4508233ffcc0a166381916ace5dda560ab6ef02f240a405b5a2d2d14af7c72be87cb4bbda01ede68fe69a0dcb
6
+ metadata.gz: f46104125080129c6b3fba14c2c2bc0f79a9372c01d2ca027de100c608bea2be2ab69da8bab9c70b6722e7e305854ff46aa77442c43568eabe4cde66be9ec048
7
+ data.tar.gz: 5be1cc72ee0444f022f4597bc9b2c4efb2f6c9ca0eb0eb99264da08f41689e61880b1f091b3183c32ef5ac1a61375500a2a9b6f3c9f6c851a458c89cda0a6d81
@@ -26,7 +26,7 @@ Usage:
26
26
  puppetserver ca generate [--help]
27
27
  puppetserver ca generate --certname NAME[,NAME] [--config PATH]
28
28
  [--subject-alt-names NAME[,NAME]]
29
- [--ca-client]
29
+ [--ca-client] [--force]
30
30
 
31
31
  Description:
32
32
  Generates a new certificate signed by the intermediate CA
@@ -75,6 +75,10 @@ BANNER
75
75
  'Causes the cert to be generated offline.') do |ca_client|
76
76
  parsed['ca-client'] = true
77
77
  end
78
+ opts.on('--force', 'Suppress errors when signing cert offline.',
79
+ "To be used with '--ca-client'") do |force|
80
+ parsed['force'] = true
81
+ end
78
82
  opts.on('--ttl TTL', 'The time-to-live for each cert generated and signed') do |ttl|
79
83
  parsed['ttl'] = ttl
80
84
  end
@@ -139,8 +143,21 @@ BANNER
139
143
 
140
144
  # Generate and save certs and associated keys
141
145
  if input['ca-client']
142
- # Refused to generate certs offfline if the CA service is running
143
- return 1 if HttpClient.check_server_online(puppet.settings, @logger)
146
+ # Refuse to generate certs offline if the CA service is running
147
+ begin
148
+ return 1 if HttpClient.check_server_online(puppet.settings, @logger)
149
+ rescue Puppetserver::Ca::ConnectionFailed => e
150
+ base_message = "Could not determine whether Puppet Server is online."
151
+ if input['force']
152
+ @logger.inform("#{base_message} Connection check failed with " \
153
+ "error: #{e.wrapped}\nContinuing with certificate signing.")
154
+ else
155
+ @logger.inform("#{base_message} If you are certain that the " \
156
+ "Puppetserver service is stopped, run this command again " \
157
+ "with the '--force' flag.")
158
+ raise e
159
+ end
160
+ end
144
161
  all_passed = generate_authorized_certs(certnames, alt_names, puppet.settings, signer.digest)
145
162
  else
146
163
  all_passed = generate_certs(certnames, alt_names, puppet.settings, signer.digest, input['ttl'])
@@ -1,5 +1,5 @@
1
1
  module Puppetserver
2
2
  module Ca
3
- VERSION = "1.11.4"
3
+ VERSION = "1.11.5"
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.4
4
+ version: 1.11.5
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-08-26 00:00:00.000000000 Z
11
+ date: 2021-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facter