bits_service_client 0.2.2.pre.9 → 0.2.2.pre.10
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/lib/bits_service_client/client.rb +8 -2
- data/lib/bits_service_client/version.rb +1 -1
- 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: bbeb77ee9f42095ea7baa1a0c8a5727334f52c59
|
|
4
|
+
data.tar.gz: ed3d178a5891fffd2cd8f63e0374710304706814
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92ea0dd384f8f5e763b3bff2b6a74e5a93e79ff1f938e0c92b37db19ef4003e639f62531a09960e79438d7851163c047234c0a02cc7483006d83ed9cb8140d05
|
|
7
|
+
data.tar.gz: bb0c6deb1d0a9ddd39c9e0f48b624d4277c6b51163daf032c2564e569f725f251f76e66e5a18b86af7355ac5e11e45157be48be6ab27c321d234641a5a892aed
|
|
@@ -125,7 +125,13 @@ module BitsService
|
|
|
125
125
|
LoggingHttpClient.new(
|
|
126
126
|
Net::HTTP.new(endpoint.host, endpoint.port).tap do |c|
|
|
127
127
|
c.read_timeout = request_timeout_in_seconds
|
|
128
|
-
|
|
128
|
+
if bits_service_options.has_key?(:ca_cert_path)
|
|
129
|
+
ca_cert_path = bits_service_options[:ca_cert_path]
|
|
130
|
+
else
|
|
131
|
+
logger.info("Using bits-service client with root ca certs only (no configured ca_cert_path).")
|
|
132
|
+
ca_cert_path = nil
|
|
133
|
+
end
|
|
134
|
+
enable_ssl(c, ca_cert_path) if endpoint.scheme == 'https'
|
|
129
135
|
end
|
|
130
136
|
)
|
|
131
137
|
end
|
|
@@ -133,7 +139,7 @@ module BitsService
|
|
|
133
139
|
def enable_ssl(http_client, ca_cert_path)
|
|
134
140
|
cert_store = OpenSSL::X509::Store.new
|
|
135
141
|
cert_store.set_default_paths
|
|
136
|
-
cert_store.add_file ca_cert_path
|
|
142
|
+
cert_store.add_file ca_cert_path if ca_cert_path
|
|
137
143
|
|
|
138
144
|
http_client.use_ssl = true
|
|
139
145
|
http_client.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bits_service_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.2.pre.
|
|
4
|
+
version: 0.2.2.pre.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rizwan Reza
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2017-10-
|
|
14
|
+
date: 2017-10-23 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: steno
|