excon 0.19.1 → 0.19.2

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.19.1)
4
+ excon (0.19.2)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -1,3 +1,8 @@
1
+ 0.19.2 02/28/2013
2
+ =================
3
+
4
+ add client_cert, client_key to valid connection options
5
+
1
6
  0.19.1 02/27/2013
2
7
  =================
3
8
 
@@ -13,8 +13,8 @@ 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.19.1'
17
- s.date = '2013-02-27'
16
+ s.version = '0.19.2'
17
+ s.date = '2013-02-28'
18
18
  s.rubyforge_project = 'excon'
19
19
 
20
20
  ## Make sure your summary is short. The description may be as long
@@ -108,6 +108,8 @@ Gem::Specification.new do |s|
108
108
  tests/authorization_header_tests.rb
109
109
  tests/bad_tests.rb
110
110
  tests/basic_tests.rb
111
+ tests/data/excon.cert.crt
112
+ tests/data/excon.cert.key
111
113
  tests/data/xs
112
114
  tests/header_tests.rb
113
115
  tests/middlewares/idempotent_tests.rb
@@ -124,6 +126,7 @@ Gem::Specification.new do |s|
124
126
  tests/rackups/request_methods.ru
125
127
  tests/rackups/response_header.ru
126
128
  tests/rackups/ssl.ru
129
+ tests/rackups/ssl_verify_peer.ru
127
130
  tests/rackups/thread_safety.ru
128
131
  tests/rackups/timeout.ru
129
132
  tests/request_headers_tests.rb
@@ -33,6 +33,8 @@ module Excon
33
33
  :body,
34
34
  :captures,
35
35
  :chunk_size,
36
+ :client_key,
37
+ :client_cert,
36
38
  :connect_timeout,
37
39
  :connection,
38
40
  :error,
@@ -69,7 +71,7 @@ module Excon
69
71
  :write_timeout
70
72
  ]
71
73
 
72
- VERSION = '0.19.1'
74
+ VERSION = '0.19.2'
73
75
 
74
76
  unless ::IO.const_defined?(:WaitReadable)
75
77
  class ::IO
@@ -50,3 +50,24 @@ with_rackup('ssl.ru') do
50
50
  basic_tests('https://127.0.0.1:9443')
51
51
  end
52
52
  end
53
+
54
+ with_rackup('ssl_verify_peer.ru') do
55
+ Shindo.tests('Excon basics (ssl)',['focus']) do
56
+ connection = Excon::Connection.new({
57
+ :host => '127.0.0.1',
58
+ :nonblock => false,
59
+ :port => 8443,
60
+ :scheme => 'https',
61
+ :ssl_verify_peer => false
62
+ })
63
+
64
+ tests('GET /content-length/100').raises(Excon::Errors::SocketError) do
65
+ connection.request(:method => :get, :path => '/content-length/100')
66
+ end
67
+
68
+ basic_tests('https://127.0.0.1:8443',
69
+ :client_key => File.join(File.dirname(__FILE__), 'data', 'excon.cert.key'),
70
+ :client_cert => File.join(File.dirname(__FILE__), 'data', 'excon.cert.crt')
71
+ )
72
+ end
73
+ end
@@ -0,0 +1,14 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIICLzCCAZgCCQCidUHPgYe2GTANBgkqhkiG9w0BAQUFADBcMQswCQYDVQQGEwJV
3
+ UzELMAkGA1UECBMCQ0ExDjAMBgNVBAoTBUV4Y29uMQ4wDAYDVQQDEwVFeGNvbjEg
4
+ MB4GCSqGSIb3DQEJARYRYWRtaW5AZXhhbXBsZS5jb20wHhcNMTMwMjI4MTczOTE4
5
+ WhcNMTYxMTI0MTczOTE4WjBcMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExDjAM
6
+ BgNVBAoTBUV4Y29uMQ4wDAYDVQQDEwVFeGNvbjEgMB4GCSqGSIb3DQEJARYRYWRt
7
+ aW5AZXhhbXBsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKM+fgjX
8
+ QfkMpepEWQBO7pJLQgoYY0EntYSgmFF/9E+fcokCWAHtmF5SBtpbWJRz3BcZ/bfq
9
+ zYYlbTAWu3nsXwsp/6Fn4dv1jvUAreAH3QV4nm8kU8FcoQ8O085UruEH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B1cl5kQGdf+c7+H+6mdVIO
13
+ wW7HqfJjsCyqyOXCBicCQQDS8aqD1iSfOi7J8DNrX1LnGudqdn+I7YITeQWZd07a
14
+ uEiTDzuaxaDtvUrN+jS0I9K1Vnn2UQCwqhvFaARHzgVB
15
+ -----END RSA PRIVATE KEY-----
@@ -0,0 +1,16 @@
1
+ require 'openssl'
2
+ require 'webrick'
3
+ require 'webrick/https'
4
+
5
+ require File.join(File.dirname(__FILE__), 'basic')
6
+ key_file = File.join(File.dirname(__FILE__), '..', 'data', 'excon.cert.key')
7
+ cert_file = File.join(File.dirname(__FILE__), '..', 'data', 'excon.cert.crt')
8
+ Rack::Handler::WEBrick.run(Basic, {
9
+ :Port => 8443,
10
+ :SSLCertName => [["CN", WEBrick::Utils::getservername]],
11
+ :SSLEnable => true,
12
+ :SSLPrivateKey => OpenSSL::PKey::RSA.new(File.open(key_file).read),
13
+ :SSLCertificate => OpenSSL::X509::Certificate.new(File.open(cert_file).read),
14
+ :SSLCACertificateFile => cert_file,
15
+ :SSLVerifyClient => OpenSSL::SSL::VERIFY_PEER|OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT,
16
+ })
@@ -5,10 +5,10 @@ Bundler.require(:default, :development)
5
5
 
6
6
  require 'stringio'
7
7
 
8
- def basic_tests(url = 'http://127.0.0.1:9292')
8
+ def basic_tests(url = 'http://127.0.0.1:9292', options = {})
9
9
  [false, true].each do |nonblock|
10
-
11
- connection = Excon.new(url, :nonblock => nonblock, :ssl_verify_peer => false)
10
+ options = options.merge({:ssl_verify_peer => false, :nonblock => nonblock })
11
+ connection = Excon.new(url, options)
12
12
 
13
13
  tests("nonblock => #{nonblock}") do
14
14
 
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.19.1
4
+ version: 0.19.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-02-27 00:00:00.000000000 Z
14
+ date: 2013-02-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -189,6 +189,8 @@ files:
189
189
  - tests/authorization_header_tests.rb
190
190
  - tests/bad_tests.rb
191
191
  - tests/basic_tests.rb
192
+ - tests/data/excon.cert.crt
193
+ - tests/data/excon.cert.key
192
194
  - tests/data/xs
193
195
  - tests/header_tests.rb
194
196
  - tests/middlewares/idempotent_tests.rb
@@ -205,6 +207,7 @@ files:
205
207
  - tests/rackups/request_methods.ru
206
208
  - tests/rackups/response_header.ru
207
209
  - tests/rackups/ssl.ru
210
+ - tests/rackups/ssl_verify_peer.ru
208
211
  - tests/rackups/thread_safety.ru
209
212
  - tests/rackups/timeout.ru
210
213
  - tests/request_headers_tests.rb
@@ -230,7 +233,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
230
233
  version: '0'
231
234
  segments:
232
235
  - 0
233
- hash: 518823091680124147
236
+ hash: -2830563195499960283
234
237
  required_rubygems_version: !ruby/object:Gem::Requirement
235
238
  none: false
236
239
  requirements: