faye-websocket 0.11.1 → 0.11.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d911cb9311b3ebcba587cea651bc49cf4ba29db10ef7b3c0b9bb7440571e39e
4
- data.tar.gz: 81a0a87fd328f88730e84033ad795b28d969d12dfd7bcdd6c5f93e12b865bf44
3
+ metadata.gz: 4d168176a9846ceffcccbf52d16d682553c7cfb8732e275b44aec51cbad3cf69
4
+ data.tar.gz: b766dc978b036ac357a0cf3000515582809565998ff06944723223d0f68e47c9
5
5
  SHA512:
6
- metadata.gz: 7c4bc1540dcb37c6c7ed508ae0d459878fef3b66009acd26555ee63b3a7013ba262cffb6fe82120385a002e12847e5c3c33ec3c44cb7ba1e7be7e7f730b1ab05
7
- data.tar.gz: 953bdb31da0463fbda511ca4b1276ce88a5e2e9273d52c34e4b13eb018d4dec41c1dbd678c8ebcad700a4230e26dc9576d89753fbebd743e743e1bdb48da394c
6
+ metadata.gz: b12ea7fff43a07f1e91501faa42bc561f8596fb96b0b5eeed2082212f002e97b898d00e791d2ac407007e12865b851c022aa3aec30728a80761b5b281d225f68
7
+ data.tar.gz: 3bb181944f60af75c33d7779fa58cde5f8da76f3814c5398421f835884f334f8c1d82f0e46e1ae478f9889a941c5fd6b745e21de48f2a87e9fc8b3b0ad52de9b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ### 0.11.3 / 2023-07-25
2
+
3
+ - Handle 'cert already in hash table' error message on Ruby 3.1+
4
+
5
+ ### 0.11.2 / 2023-04-04
6
+
7
+ - Handle SSL certificate chains where not all the intermediate certificates are
8
+ recognised by the client
9
+
1
10
  ### 0.11.1 / 2021-05-24
2
11
 
3
12
  - Prevent the client hanging if `close()` is called when already closing
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2010-2021 James Coglan
1
+ Copyright 2010-2023 James Coglan
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
4
  this file except in compliance with the License. You may obtain a copy of the
@@ -42,14 +42,13 @@ module Faye
42
42
  return true unless should_verify?
43
43
 
44
44
  certificate = parse_cert(cert_text)
45
- return false unless certificate
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
@@ -77,7 +80,7 @@ module Faye
77
80
  def store_cert(certificate)
78
81
  @cert_store.add_cert(certificate)
79
82
  rescue OpenSSL::X509::StoreError => error
80
- raise error unless error.message == 'cert already in hash table'
83
+ raise error unless error.message =~ /cert already in hash table/
81
84
  end
82
85
 
83
86
  def identity_verified?
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.1
4
+ version: 0.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Coglan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-24 00:00:00.000000000 Z
11
+ date: 2023-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -73,6 +73,9 @@ dependencies:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: 2.0.0
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '6.0'
76
79
  type: :development
77
80
  prerelease: false
78
81
  version_requirements: !ruby/object:Gem::Requirement
@@ -80,6 +83,9 @@ dependencies:
80
83
  - - ">="
81
84
  - !ruby/object:Gem::Version
82
85
  version: 2.0.0
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: '6.0'
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: rack
85
91
  requirement: !ruby/object:Gem::Requirement
@@ -230,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
236
  - !ruby/object:Gem::Version
231
237
  version: '0'
232
238
  requirements: []
233
- rubygems_version: 3.1.6
239
+ rubygems_version: 3.4.10
234
240
  signing_key:
235
241
  specification_version: 4
236
242
  summary: Standards-compliant WebSocket server and client