faye-websocket 0.11.0 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/LICENSE.md +1 -1
- data/README.md +1 -1
- data/lib/faye/websocket/api.rb +4 -1
- data/lib/faye/websocket/ssl_verifier.rb +8 -5
- metadata +19 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb4b4ae774c914839c9b5b45496d4eb31d9c0603ada45373b8de2055d5231dc5
|
4
|
+
data.tar.gz: 666a6f3a350022a7cbf3df69f8f7d292fb912f5b8e9b05b8ba3b194b07be5940
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9475c32e62af18f17a56b0cdf26df4916cc3035d92cbd9be733fb5ae8da0bf57124385625a11558196cade588be91ab81bafc5ad8ef516b7ab09cfaeb8a3cb7
|
7
|
+
data.tar.gz: 4a81daa717bda6a500a03e9b60b4b303c7e071d8d262bb763112a0cf75dba7d6f637db6448988a9ccc3149951440be12db165e1cbe0d1b593aaa603519d6ac89
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
### 0.11.2 / 2023-04-04
|
2
|
+
|
3
|
+
- Handle SSL certificate chains where not all the intermediate certificates are
|
4
|
+
recognised by the client
|
5
|
+
|
6
|
+
### 0.11.1 / 2021-05-24
|
7
|
+
|
8
|
+
- Prevent the client hanging if `close()` is called when already closing
|
9
|
+
|
1
10
|
### 0.11.0 / 2020-07-31
|
2
11
|
|
3
12
|
- Implement TLS certificate verification and enable it by default on client
|
data/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# faye-websocket
|
1
|
+
# faye-websocket
|
2
2
|
|
3
3
|
This is a general-purpose WebSocket implementation extracted from the
|
4
4
|
[Faye](http://faye.jcoglan.com) project. It provides classes for easily building
|
data/lib/faye/websocket/api.rb
CHANGED
@@ -86,8 +86,11 @@ module Faye
|
|
86
86
|
"#{ code } is neither."
|
87
87
|
end
|
88
88
|
|
89
|
+
if @ready_state < CLOSING
|
90
|
+
@close_timer = EventMachine.add_timer(CLOSE_TIMEOUT) { begin_close('', 1006) }
|
91
|
+
end
|
92
|
+
|
89
93
|
@ready_state = CLOSING unless @ready_state == CLOSED
|
90
|
-
@close_timer = EventMachine.add_timer(CLOSE_TIMEOUT) { begin_close('', 1006) }
|
91
94
|
|
92
95
|
@driver.close(reason, code)
|
93
96
|
end
|
@@ -42,14 +42,13 @@ module Faye
|
|
42
42
|
return true unless should_verify?
|
43
43
|
|
44
44
|
certificate = parse_cert(cert_text)
|
45
|
-
|
46
|
-
|
47
|
-
unless @cert_store.verify(certificate)
|
48
|
-
raise SSLError, "Unable to verify the server certificate for '#{ @hostname }'"
|
45
|
+
unless certificate
|
46
|
+
raise SSLError, "Unable to parse SSL certificate for '#{ @hostname }'"
|
49
47
|
end
|
50
48
|
|
51
|
-
store_cert(certificate)
|
52
49
|
@last_cert = certificate
|
50
|
+
@last_cert_verified = @cert_store.verify(certificate)
|
51
|
+
store_cert(certificate) if @last_cert_verified
|
53
52
|
|
54
53
|
true
|
55
54
|
end
|
@@ -57,6 +56,10 @@ module Faye
|
|
57
56
|
def ssl_handshake_completed
|
58
57
|
return unless should_verify?
|
59
58
|
|
59
|
+
unless @last_cert_verified
|
60
|
+
raise SSLError, "Unable to verify the server certificate for '#{ @hostname }'"
|
61
|
+
end
|
62
|
+
|
60
63
|
unless identity_verified?
|
61
64
|
raise SSLError, "Host '#{ @hostname }' does not match the server certificate"
|
62
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faye-websocket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Coglan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|
@@ -123,33 +123,39 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 0.2.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: thin
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 1.2.0
|
132
|
+
- - ">"
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
132
135
|
type: :development
|
133
136
|
prerelease: false
|
134
137
|
version_requirements: !ruby/object:Gem::Requirement
|
135
138
|
requirements:
|
136
|
-
- - "
|
139
|
+
- - ">="
|
137
140
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
141
|
+
version: 1.2.0
|
142
|
+
- - ">"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
139
145
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
146
|
+
name: rainbows
|
141
147
|
requirement: !ruby/object:Gem::Requirement
|
142
148
|
requirements:
|
143
|
-
- - "
|
149
|
+
- - "~>"
|
144
150
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
151
|
+
version: 4.4.0
|
146
152
|
type: :development
|
147
153
|
prerelease: false
|
148
154
|
version_requirements: !ruby/object:Gem::Requirement
|
149
155
|
requirements:
|
150
|
-
- - "
|
156
|
+
- - "~>"
|
151
157
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
158
|
+
version: 4.4.0
|
153
159
|
- !ruby/object:Gem::Dependency
|
154
160
|
name: goliath
|
155
161
|
requirement: !ruby/object:Gem::Requirement
|
@@ -224,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
230
|
- !ruby/object:Gem::Version
|
225
231
|
version: '0'
|
226
232
|
requirements: []
|
227
|
-
rubygems_version: 3.1.
|
233
|
+
rubygems_version: 3.1.6
|
228
234
|
signing_key:
|
229
235
|
specification_version: 4
|
230
236
|
summary: Standards-compliant WebSocket server and client
|