nats 0.9.0 → 0.9.2

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: 69469e7ad38954ab676e099443dc45f56bda0986a539cdcae552d7f760595eaa
4
- data.tar.gz: ed8f954f8ae1da8bbca64a09dc57ae8ee532628ab9e8d871836ccc490f6d2266
3
+ metadata.gz: 55e7d5acd3bc948f6238b7b294e5c7dfd03698e0173b677115bb2361a29db842
4
+ data.tar.gz: a1d0c1d206407117fbe35604a9e2b4f0f5954fcda03af9dd23be2ed0dacdeb69
5
5
  SHA512:
6
- metadata.gz: 1c924a60aa9d2380da3fb916cf7336f6c59d1c10c1685dc198577a5593aa84849c7c1839ce2d0ed818bed012aa2c7ca0fa27f16f665267ba49512dca44a2ff41
7
- data.tar.gz: 10d496a25c6783ce15f92323dcbc76b927f2a7c6ea2fc196c46218f4d1cc6854a3ab303f560454977ee07d4fd5671431d94e164bfabb82b37d6dba5a89320413
6
+ metadata.gz: 5d11348d74d766bcf25169b3af693f4cd1bc5a2b1adb4d60919feb44718670c162cd93a0bf728e4f8624eb2c54ae952ab556f725a3e7254be91923df4b2b1986
7
+ data.tar.gz: 29b9b7a9bd9152fa19491a9ac56670564549656102422b383887d919ad32268ce481f7cf2a74be07df232fa25d802fa1791f850503f82a40eab49b4e8c5dfdd7
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  A [Ruby](http://ruby-lang.org) client for the [NATS messaging system](https://nats.io).
4
4
 
5
5
  [![License Apache 2.0](https://img.shields.io/badge/License-Apache2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
6
- [![Build Status](https://travis-ci.org/nats-io/ruby-nats.svg)](http://travis-ci.org/nats-io/ruby-nats) [![Gem Version](https://d25lcipzij17d.cloudfront.net/badge.svg?id=rb&type=5&v=0.9.0)](https://rubygems.org/gems/nats/versions/0.9.0) [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/nats-io/ruby-nats)
6
+ [![Build Status](https://travis-ci.org/nats-io/ruby-nats.svg)](http://travis-ci.org/nats-io/ruby-nats) [![Gem Version](https://d25lcipzij17d.cloudfront.net/badge.svg?id=rb&type=5&v=0.9.2)](https://rubygems.org/gems/nats/versions/0.9.2) [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](https://www.rubydoc.info/gems/nats)
7
7
 
8
8
  ## Supported Platforms
9
9
 
@@ -826,16 +826,13 @@ module NATS
826
826
  end
827
827
 
828
828
  def ssl_verify_peer(cert)
829
- ca_file = File.read(@options[:tls][:ca_file])
830
- ca = OpenSSL::X509::Certificate.new(ca_file)
831
829
  incoming = OpenSSL::X509::Certificate.new(cert)
832
-
833
- unless incoming.issuer.to_s == ca.subject.to_s && incoming.verify(ca.public_key)
834
- err_cb.call(NATS::ConnectError.new("TLS Verification failed checking issuer based on CA %s" % @options[:ca_file]))
835
- false
836
- else
837
- true
838
- end
830
+ store = OpenSSL::X509::Store.new
831
+ store.set_default_paths
832
+ store.add_file @options[:tls][:ca_file]
833
+ result = store.verify(incoming)
834
+ err_cb.call(NATS::ConnectError.new('TLS Verification failed checking issuer based on CA %s' % @options[:tls][:ca_file])) unless result
835
+ result
839
836
  rescue NATS::ConnectError
840
837
  false
841
838
  end
@@ -14,7 +14,7 @@
14
14
 
15
15
  module NATS
16
16
  # NOTE: These are all announced to the server on CONNECT
17
- VERSION = "0.9.0".freeze
17
+ VERSION = "0.9.2".freeze
18
18
  LANG = RUBY_ENGINE
19
19
  PROTOCOL_VERSION = 1
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Collison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-27 00:00:00.000000000 Z
11
+ date: 2018-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine