libuv 1.1.3 → 1.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea51b45a867a16573c8877ad159ced1c14067310
4
- data.tar.gz: 2ca964fb717356ba949e0b243175463e504d2a33
3
+ metadata.gz: 92b6998b59e0b62ec3f3b0d480d462cf27e49a7c
4
+ data.tar.gz: 765ec08ee8b2671c4eecb803a675d423e473f258
5
5
  SHA512:
6
- metadata.gz: 6669991e246dc052b424384603d17f832096bdb2d21f6deae978b0e764d3da3b15a389246c2f421d5575ddc067ac30e85ca95de04b20bb040b8007596f09c89b
7
- data.tar.gz: 3e2cb67395b0c3d9b86bcdede83d5c86d2e8bc07d10683e0a9fae2816f267f17960e7f7c53e84697018c071987597e5cb74ae27fb2a2230d91dde8dc55139c34
6
+ metadata.gz: c868aa873424adc30707451529efc8922a0b0dc4521f738b47fbea99e536565e231bb4a4624c03a0beeb0320270d5b716584de527f84d37d0643c7f2e6f106a9
7
+ data.tar.gz: e357deaf8a7d560632c358f84df00f27c54c3fc1bce954562a8946e82309a2d48f3986db221c6423765a7f0704841009979d050d6812fd8cbfcd929ddb98995b
@@ -1,3 +1,3 @@
1
1
  [submodule "ext/libuv"]
2
2
  path = ext/libuv
3
- url = https://github.com/joyent/libuv.git
3
+ url = https://github.com/libuv/libuv.git
@@ -1,10 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "1.9.3"
4
- - "2.0.0"
3
+ - "2.1"
4
+ - "2.2"
5
5
  - ruby-head
6
6
  - rbx-2
7
- - jruby-19mode
7
+ - jruby-20mode
8
8
  branches:
9
9
  only:
10
10
  - master
data/README.md CHANGED
@@ -86,7 +86,6 @@ Windows users will additionally require:
86
86
 
87
87
  - A copy of Visual Studio 2010 or later. [Visual Studio Express](http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products) works fine.
88
88
  - A copy of [OpenSSL](http://slproweb.com/products/Win32OpenSSL.html) matching the installed ruby (x86 / x64)
89
- - with the environmental variable `OPENSSL_CONF` Set `OPENSSL_CONF=X:\path_to\OpenSSL\bin\openssl.cfg`
90
89
  - If using jRuby then [GCC](http://win-builds.org/stable/) is also required
91
90
  - Setup the paths as described on the gcc page
92
91
  - Add required environmental variable `set LIBRARY_PATH=X:\win-builds-64\lib;X:\win-builds-64\x86_64-w64-mingw32\lib`
@@ -45,7 +45,8 @@ module Libuv
45
45
  :udp_send,
46
46
  :fs,
47
47
  :work,
48
- :getaddrinfo, # end UV_REQ_TYPE_MAP
48
+ :getaddrinfo,
49
+ :getnameinfo, # end UV_REQ_TYPE_MAP
49
50
  :req_type_private,
50
51
  :req_type_max
51
52
  ]
@@ -39,10 +39,12 @@ module Libuv
39
39
  def start_tls(args = {})
40
40
  return unless @connected && @tls.nil?
41
41
 
42
+ args[:verify_peer] = true if @on_verify
43
+
42
44
  @handshake = false
43
45
  @pending_writes = []
44
- @tls = ::RubyTls::Connection.new(self)
45
- @tls.start(args)
46
+ @tls = ::RubyTls::SSL::Box.new(args[:server], self, args)
47
+ @tls.start
46
48
  end
47
49
 
48
50
  # Push through any pending writes when handshake has completed
@@ -69,7 +71,7 @@ module Libuv
69
71
  # We resolve the existing tls write promise with a the
70
72
  # real writes promise (a close may have occurred)
71
73
  def transmit_cb(data)
72
- if not @pending_write.nil?
74
+ if @pending_write
73
75
  @pending_write.resolve(direct_write(data))
74
76
  @pending_write = nil
75
77
  else
@@ -79,7 +81,7 @@ module Libuv
79
81
 
80
82
  # Close can be called multiple times
81
83
  def close_cb
82
- if not @pending_write.nil?
84
+ if @pending_write
83
85
  @pending_write.reject(TLS_ERROR)
84
86
  @pending_write = nil
85
87
  end
@@ -88,6 +90,19 @@ module Libuv
88
90
  close
89
91
  end
90
92
 
93
+ def verify_cb(cert)
94
+ if @on_verify
95
+ begin
96
+ return @on_verify.call cert
97
+ rescue => e
98
+ @loop.log :warn, :tls_verify_callback_failed, e
99
+ return false
100
+ end
101
+ end
102
+
103
+ true
104
+ end
105
+
91
106
  # overwrite the default close to ensure
92
107
  # pending writes are rejected
93
108
  def close
@@ -102,7 +117,7 @@ module Libuv
102
117
  end
103
118
  @connected = false
104
119
 
105
- if not @pending_writes.nil?
120
+ if @pending_writes
106
121
  @pending_writes.each do |deferred, data|
107
122
  deferred.reject(TLS_ERROR)
108
123
  end
@@ -113,8 +128,8 @@ module Libuv
113
128
  end
114
129
 
115
130
  # Verify peers will be called for each cert in the chain
116
- def verify_peer(&block)
117
- @tls.verify_cb &block
131
+ def verify_peer(callback = nil, &blk)
132
+ @on_verify = callback || blk
118
133
  end
119
134
 
120
135
  alias_method :direct_write, :write
@@ -1,3 +1,3 @@
1
1
  module Libuv
2
- VERSION = '1.1.3'
2
+ VERSION = '1.2.0'
3
3
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.add_runtime_dependency 'ffi', '>= 1.9'
19
19
  gem.add_runtime_dependency 'thread_safe'
20
- gem.add_runtime_dependency 'ruby-tls', '>= 1.0.3'
20
+ gem.add_runtime_dependency 'ruby-tls', '>= 2.0.0'
21
21
 
22
22
  gem.add_development_dependency 'rspec', '>= 2.14'
23
23
  gem.add_development_dependency 'rake', '>= 10.1'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libuv
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bulat Shakirzyanov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-03 00:00:00.000000000 Z
12
+ date: 2015-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: 1.0.3
48
+ version: 2.0.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 1.0.3
55
+ version: 2.0.0
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rspec
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -249,7 +249,6 @@ files:
249
249
  - ext/libuv/src/unix/timer.c
250
250
  - ext/libuv/src/unix/tty.c
251
251
  - ext/libuv/src/unix/udp.c
252
- - ext/libuv/src/unix/uv-dtrace.d
253
252
  - ext/libuv/src/uv-common.c
254
253
  - ext/libuv/src/uv-common.h
255
254
  - ext/libuv/src/version.c
@@ -353,6 +352,7 @@ files:
353
352
  - ext/libuv/test/test-list.h
354
353
  - ext/libuv/test/test-loop-alive.c
355
354
  - ext/libuv/test/test-loop-close.c
355
+ - ext/libuv/test/test-loop-configure.c
356
356
  - ext/libuv/test/test-loop-handles.c
357
357
  - ext/libuv/test/test-loop-stop.c
358
358
  - ext/libuv/test/test-loop-time.c
@@ -368,6 +368,7 @@ files:
368
368
  - ext/libuv/test/test-pipe-sendmsg.c
369
369
  - ext/libuv/test/test-pipe-server-close.c
370
370
  - ext/libuv/test/test-platform-output.c
371
+ - ext/libuv/test/test-poll-close-doesnt-corrupt-stack.c
371
372
  - ext/libuv/test/test-poll-close.c
372
373
  - ext/libuv/test/test-poll-closesocket.c
373
374
  - ext/libuv/test/test-poll.c