tls-checker 2.0.0 → 2.0.1

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: 9ccd4eba7911d06f807a01d764d0b80f093db49e89449839753ca00e2d0b6d27
4
- data.tar.gz: 85b6da4d7ffb72506fa2d6faf83606bb23c433a6213c8aef97eac85f48ac93dc
3
+ metadata.gz: e631fb5a5661e925d1b3f705f547b8d7ebbbb55f797b95458dd2f3b91bd062cb
4
+ data.tar.gz: 8a0069d414059a0625756f94676652400c60cc1886c58811413175d81ce1c0d0
5
5
  SHA512:
6
- metadata.gz: 7badaf4cd118abcc424bacb4715406aa08c6314951f6231e4729ff5f7033d49ae827da3e2ef2c6fc965b415523d0ca3dd5432676cd9e264bd55d483da8d82d84
7
- data.tar.gz: eca28f0c927455a721dfe39b6ae7e61c4ec485a7d7a43c9a79391d9d78d5f4cfce373ebfe10726550e616e3db8567d3145b87a84ec99a06a05e436f143bb909a
6
+ metadata.gz: 6ad1f798b94082cf7d167b5598538eaa984d3c41f76fa9310fb430b5bfb2d3f291e3e647ba963fd976eb3007bed6e387f51e2fd478e5c2c07429317fc50d4bd8
7
+ data.tar.gz: fe4f603393c223c181b25bee243bf96afb24978d83ab72f7922bb833a3c34f09b7ee3fb9a723449d3880dab22ebfdf600b23b8ecb79f31a624fc996a28297692
data/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [v2.0.1](https://github.com/smortex/tls-checker/tree/v2.0.1) (2022-07-16)
9
+
10
+ [Full Changelog](https://github.com/smortex/tls-checker/compare/v2.0.0...v2.0.1)
11
+
12
+ **Fixed bugs:**
13
+
14
+ - Detect TLS handshake failures [\#4](https://github.com/smortex/tls-checker/pull/4) ([smortex](https://github.com/smortex))
15
+
8
16
  ## [v2.0.0](https://github.com/smortex/tls-checker/tree/v2.0.0) (2022-07-16)
9
17
 
10
18
  [Full Changelog](https://github.com/smortex/tls-checker/compare/v1.4.0...v2.0.0)
@@ -47,8 +47,14 @@ module TLSChecker
47
47
  end
48
48
 
49
49
  def certificate
50
- @certificate = OpenSSL::X509::Certificate.new(tls_socket.peer_cert) if @certificate.nil?
51
- @certificate
50
+ return @certificate unless @certificate.nil?
51
+
52
+ if tls_socket.peer_cert
53
+ @certificate = OpenSSL::X509::Certificate.new(tls_socket.peer_cert)
54
+ else
55
+ @certificate_failure = 'No peer certificate (TLS handshake failed?)'
56
+ @certificate = false
57
+ end
52
58
  rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Errno::ETIMEDOUT, SocketRecvTimeout => e
53
59
  @certificate_failure = e.message
54
60
  @certificate = false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TLSChecker
4
- VERSION = '2.0.0'
4
+ VERSION = '2.0.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tls-checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Romain Tartière