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.

@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- excon (0.25.2)
4
+ excon (0.25.3)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -1,3 +1,9 @@
1
+ 0.25.3 07/18/2013
2
+ =================
3
+
4
+ respect SSL_CERT_DIR/SSL_CERT_FILE
5
+ more aggressively include bundled cert as fallback
6
+
1
7
  0.25.2 07/18/2013
2
8
  =================
3
9
 
@@ -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.2'
16
+ s.version = '0.25.3'
17
17
  s.date = '2013-07-18'
18
18
  s.rubyforge_project = 'excon'
19
19
 
@@ -77,7 +77,7 @@ module Excon
77
77
  :write_timeout
78
78
  ]
79
79
 
80
- VERSION = '0.25.2'
80
+ VERSION = '0.25.3'
81
81
  USER_AGENT = 'excon/' << VERSION
82
82
 
83
83
  unless ::IO.const_defined?(:WaitReadable)
@@ -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('Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, or `Excon.defaults[:ssl_verify_peer] = false` (less secure).')
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
@@ -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 = @data[:ssl_ca_path]
19
- elsif @data[:ssl_ca_file]
20
- ssl_context.ca_file = @data[:ssl_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
- if !defined?(OpenSSL::Config::DEFAULT_CONFIG_FILE) || File.exists?(OpenSSL::Config::DEFAULT_CONFIG_FILE)
24
- ssl_context.cert_store.set_default_paths
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.2
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: 4254645777267103019
240
+ hash: -1555854800829677870
241
241
  required_rubygems_version: !ruby/object:Gem::Requirement
242
242
  none: false
243
243
  requirements: