excon 0.25.2 → 0.25.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of excon might be problematic. Click here for more details.
- data/Gemfile.lock +1 -1
- data/changelog.txt +6 -0
- data/excon.gemspec +1 -1
- data/lib/excon/constants.rb +1 -1
- data/lib/excon/errors.rb +1 -1
- data/lib/excon/ssl_socket.rb +6 -9
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/changelog.txt
CHANGED
data/excon.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'excon'
|
16
|
-
s.version = '0.25.
|
16
|
+
s.version = '0.25.3'
|
17
17
|
s.date = '2013-07-18'
|
18
18
|
s.rubyforge_project = 'excon'
|
19
19
|
|
data/lib/excon/constants.rb
CHANGED
data/lib/excon/errors.rb
CHANGED
@@ -9,7 +9,7 @@ module Excon
|
|
9
9
|
|
10
10
|
def initialize(socket_error=nil)
|
11
11
|
if socket_error.message =~ /certificate verify failed/
|
12
|
-
super(
|
12
|
+
super("Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `ENV['SSL_CERT_DIR'] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, `ENV['SSL_CERT_FILE'] = path_to_file` or `Excon.defaults[:ssl_verify_peer] = false` (less secure).")
|
13
13
|
else
|
14
14
|
super("#{socket_error.message} (#{socket_error.class})")
|
15
15
|
end
|
data/lib/excon/ssl_socket.rb
CHANGED
@@ -14,17 +14,14 @@ module Excon
|
|
14
14
|
# turn verification on
|
15
15
|
ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
16
16
|
|
17
|
-
if @data[:ssl_ca_path]
|
18
|
-
ssl_context.ca_path =
|
19
|
-
elsif @data[:ssl_ca_file]
|
20
|
-
ssl_context.ca_file =
|
17
|
+
if ca_path = ENV['SSL_CERT_DIR'] || @data[:ssl_ca_path]
|
18
|
+
ssl_context.ca_path = ca_path
|
19
|
+
elsif ca_file = ENV['SSL_CERT_FILE'] || @data[:ssl_ca_file]
|
20
|
+
ssl_context.ca_file = ca_file
|
21
21
|
else # attempt default, fallback to bundled
|
22
22
|
ssl_context.cert_store = OpenSSL::X509::Store.new
|
23
|
-
|
24
|
-
|
25
|
-
else
|
26
|
-
ssl_context.cert_store.add_file(DEFAULT_CA_FILE)
|
27
|
-
end
|
23
|
+
ssl_context.cert_store.set_default_paths
|
24
|
+
ssl_context.cert_store.add_file(DEFAULT_CA_FILE)
|
28
25
|
end
|
29
26
|
else
|
30
27
|
# turn verification off
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: excon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -237,7 +237,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
237
237
|
version: '0'
|
238
238
|
segments:
|
239
239
|
- 0
|
240
|
-
hash:
|
240
|
+
hash: -1555854800829677870
|
241
241
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
242
242
|
none: false
|
243
243
|
requirements:
|