puppet_webhook 1.6.1 → 1.6.2
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/bin/puppet_webhook +12 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ed278f549c585151ba3bbb7b57e3e04ad14790d
|
4
|
+
data.tar.gz: a6d0eb7a04bb324c23b21b56badb309214206d45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37d39b4ee20fd892843b639300114f908f4ab3187c5cc79b19c6f5a192dca6fa74aa32fe315ccc250d8510ac78d00a0430ccf7d2aeb2eaa1eb13e0537d367812
|
7
|
+
data.tar.gz: 26dd12e232e6ef9879163cafd67183f6f6b7fb1f8337a17b980ea9abc451a3c8b73240d070e79487c9f3f4cc11a5be8bdafeae9ea93dbf27cf7d02cc34ea7e69
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
Each new release typically also includes the latest modulesync defaults.
|
5
5
|
These should not affect the functionality of the module.
|
6
6
|
|
7
|
+
## [v1.6.1](https://github.com/voxpupuli/puppet_webhook/tree/v1.6.1) (2019-01-15)
|
8
|
+
[Full Changelog](https://github.com/voxpupuli/puppet_webhook/compare/v1.6.1...v1.6.1)
|
9
|
+
|
10
|
+
**Fixed bugs:**
|
11
|
+
|
12
|
+
- Ensure that the ssl cert/key content is sent to WEBrick, not the path [\#84](https://github.com/voxpupuli/puppet_webhook/pull/84) ([dhollinger](https://github.com/dhollinger))
|
13
|
+
|
7
14
|
## [v1.6.1](https://github.com/voxpupuli/puppet_webhook/tree/v1.6.1) (2018-12-23)
|
8
15
|
[Full Changelog](https://github.com/voxpupuli/puppet_webhook/compare/v1.6.0...v1.6.1)
|
9
16
|
|
data/bin/puppet_webhook
CHANGED
@@ -48,11 +48,11 @@ optparse = OptionParser.new do |opts| # rubocop:disable Metrics/BlockLength
|
|
48
48
|
end
|
49
49
|
|
50
50
|
opts.on('--ssl-cert FILE', 'Specify the SSL cert to use. Pair with --ssl-key.') do |arg|
|
51
|
-
ssl_opts[:ssl_cert] =
|
51
|
+
ssl_opts[:ssl_cert] = arg
|
52
52
|
end
|
53
53
|
|
54
54
|
opts.on('--ssl-key FILE', 'Specify the SSL key to use. Pair with --ssl-cert.') do |arg|
|
55
|
-
ssl_opts[:ssl_key] =
|
55
|
+
ssl_opts[:ssl_key] = arg
|
56
56
|
end
|
57
57
|
|
58
58
|
opts.on('-c FILE', '--configfile FILE', 'Specifies a configuration file to use.') do |arg|
|
@@ -84,7 +84,13 @@ if @server_config
|
|
84
84
|
ssl_opts[:enable_ssl] = settings.enable_ssl if settings.respond_to? :enable_ssl=
|
85
85
|
ssl_opts[:ssl_verify] = settings.ssl_verify if settings.respond_to? :ssl_verify=
|
86
86
|
ssl_opts[:ssl_cert] = settings.ssl_cert if settings.respond_to? :ssl_cert=
|
87
|
-
ssl_opts[:ssl_key] = settings.
|
87
|
+
ssl_opts[:ssl_key] = settings.ssl_key if settings.respond_to? :ssl_key=
|
88
|
+
end
|
89
|
+
|
90
|
+
def ssl_verify(ssl_opts)
|
91
|
+
return OpenSSL::SSL::VERIFY_NONE unless ssl_opts[:ssl_verify]
|
92
|
+
|
93
|
+
OpenSSL::SSL::VERIFY_PEER
|
88
94
|
end
|
89
95
|
|
90
96
|
LOGGER = WEBrick::Log.new(options[:logfile], Object.const_get("WEBrick::Log::#{options[:loglevel]}"))
|
@@ -99,9 +105,9 @@ webrick_opts = {
|
|
99
105
|
|
100
106
|
if ssl_opts[:enable_ssl]
|
101
107
|
webrick_opts[:SSLEnable] = ssl_opts[:enable_ssl]
|
102
|
-
webrick_opts[:SSLVerifyClient] = ssl_opts
|
103
|
-
webrick_opts[:SSLCertificate] = ssl_opts[:ssl_cert]
|
104
|
-
webrick_opts[:SSLPrivateKey] = ssl_opts[:ssl_key]
|
108
|
+
webrick_opts[:SSLVerifyClient] = ssl_verify(ssl_opts)
|
109
|
+
webrick_opts[:SSLCertificate] = OpenSSL::X509::Certificate.new(File.read(ssl_opts[:ssl_cert]))
|
110
|
+
webrick_opts[:SSLPrivateKey] = OpenSSL::PKey::RSA.new(File.read(ssl_opts[:ssl_key]))
|
105
111
|
webrick_opts[:SSLCertName] = [['CN', WEBrick::Utils.getservername]]
|
106
112
|
end
|
107
113
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet_webhook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|