puppetserver-ca 1.2.0 → 1.2.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68f6a3c820f9dd32b2df38855a1e03249cb89ba0
|
4
|
+
data.tar.gz: b885a1ad3e176010f2e36a63f6940b0bab7501ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 809c1ce65101f0c3f9aa908540070c59114aae9551170875177c87518e4e43111ebcaa3f8f29b0e400a2dd8e0d5ce996fbf01e35766b395d2c6443086a36ffdd
|
7
|
+
data.tar.gz: f2975078313f77c519c45eb03ccc70272efdad3f859863c97e07a3a800e37ae2fd2e086ad534367eb86b3b86f39272d1428754457150fdf8b8174dd8cb1a5025
|
@@ -75,8 +75,8 @@ BANNER
|
|
75
75
|
parsed['subject-alt-names'] = sans
|
76
76
|
end
|
77
77
|
opts.on('--ca-client',
|
78
|
-
'Whether this cert will be used to request CA actions
|
79
|
-
Causes the cert to be generated offline.') do |ca_client|
|
78
|
+
'Whether this cert will be used to request CA actions.',
|
79
|
+
'Causes the cert to be generated offline.') do |ca_client|
|
80
80
|
parsed['ca-client'] = true
|
81
81
|
end
|
82
82
|
end
|
@@ -168,9 +168,12 @@ BANNER
|
|
168
168
|
end
|
169
169
|
end
|
170
170
|
true
|
171
|
-
rescue
|
172
|
-
|
173
|
-
|
171
|
+
rescue Puppetserver::Ca::ConnectionFailed => e
|
172
|
+
if e.wrapped.is_a? Errno::ECONNREFUSED
|
173
|
+
return false
|
174
|
+
else
|
175
|
+
raise e
|
176
|
+
end
|
174
177
|
end
|
175
178
|
end
|
176
179
|
|
@@ -1,6 +1,20 @@
|
|
1
1
|
module Puppetserver
|
2
2
|
module Ca
|
3
|
-
class Error < StandardError
|
3
|
+
class Error < StandardError
|
4
|
+
def self.create(ex, msg)
|
5
|
+
created = new(msg)
|
6
|
+
created.wrap(ex)
|
7
|
+
|
8
|
+
created
|
9
|
+
end
|
10
|
+
|
11
|
+
attr_reader :wrapped
|
12
|
+
|
13
|
+
def wrap(ex)
|
14
|
+
@wrapped = ex
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
4
18
|
class FileNotFound < Error; end
|
5
19
|
class InvalidX509Object < Error; end
|
6
20
|
class ConnectionFailed < Error; end
|
@@ -58,9 +58,9 @@ module Puppetserver
|
|
58
58
|
cert: @cert, key: @key,
|
59
59
|
&request)
|
60
60
|
rescue StandardError => e
|
61
|
-
raise ConnectionFailed.
|
62
|
-
|
63
|
-
|
61
|
+
raise ConnectionFailed.create(e,
|
62
|
+
"Failed connecting to #{url.full_url}\n" +
|
63
|
+
" Root cause: #{e.message}")
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
@@ -70,12 +70,14 @@ module Puppetserver
|
|
70
70
|
begin
|
71
71
|
content = File.read(path)
|
72
72
|
block.call(content)
|
73
|
-
rescue Errno::ENOENT
|
74
|
-
raise FileNotFound.
|
73
|
+
rescue Errno::ENOENT => e
|
74
|
+
raise FileNotFound.create(e,
|
75
|
+
"Could not find '#{setting}' at '#{path}'")
|
76
|
+
|
75
77
|
rescue OpenSSL::OpenSSLError => e
|
76
|
-
raise InvalidX509Object.
|
77
|
-
|
78
|
-
|
78
|
+
raise InvalidX509Object.create(e,
|
79
|
+
"Could not parse '#{setting}' at '#{path}'.\n" +
|
80
|
+
" OpenSSL returned: #{e.message}")
|
79
81
|
end
|
80
82
|
end
|
81
83
|
|
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.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facter
|