tls-checker 1.1.1 → 1.2.0

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: 1ce545144ea29f3fd2dbdabfa80e2390fc1fa5856e2c15a569844fa48123801f
4
- data.tar.gz: 96475b0c4a3a51c93e665df117de9763cbb8a7ef5b314e6ff95d8eea3a7a8eef
3
+ metadata.gz: 436c913ebd77a63c430df1dc3a365d4458c58cdd4e6070d3db7aed7ead5ddb95
4
+ data.tar.gz: 5e23c16c3717c32fb6d558f0d5fc5f48d61bbcf50e36e76ca0418752e913a0e0
5
5
  SHA512:
6
- metadata.gz: 85f17f395246854272299b83f1b95e9a13364b1ac0402f9bda6a0f0ebf2a5668535ffc1df4c5fc53855fa4309db55f71a9e59a8b1b0b47904e7a0aeeccf29c86
7
- data.tar.gz: ab63e727076b9464c58b5747201a0ea747a3628e7523bdc9320244058756be6375a0089d44bd4d8145928dbe1a94ef249b2a0c571a2b7f8e0e33bb9bef18d5d1
6
+ metadata.gz: 5e9e9015b20136f0b7e0ceba16ea67415af17fc8efbfe4282ee97da238039081567a99126c5b71cffa24e13e8d1088d58193d5efda7a15dc7be1b137a1aa8764
7
+ data.tar.gz: 39ae43f8abeeb2e8258a82657eeee08f38bb0fc75af554da7d66e7cd5421ef97419c5421cbabda86737b65fb8e83bfdb2bca959e5b5d46e16e97d2e77ad4bea1
@@ -5,6 +5,12 @@ 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
+ ## [1.2.0]
9
+
10
+ - Skip completely TLSA check if a connexion certificate cannot be fetched;
11
+ - Do not generate an event when a connexion to a remote service is not
12
+ possible.
13
+
8
14
  ## [1.1.1]
9
15
 
10
16
  - Handle Errno::EHOSTUNREACH exceptions gracefully when attempting to fetch a
@@ -17,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
17
23
  - Make it possible to test services using an IP address;
18
24
  - Report validity of certificates when a TLSA record is found in the DNS.
19
25
 
20
- [Unreleased]: https://github.com/smortex/tls-checker/compare/v1.1.1...HEAD
26
+ [Unreleased]: https://github.com/smortex/tls-checker/compare/v1.2.0...HEAD
27
+ [1.2.0]: https://github.com/smortex/tls-checker/compare/v1.1.1...v1.2.0
21
28
  [1.1.1]: https://github.com/smortex/tls-checker/compare/v1.1.0...v1.1.1
22
29
  [1.1.0]: https://github.com/smortex/tls-checker/compare/v1.0.0...v1.1.0
@@ -5,8 +5,6 @@ require 'json'
5
5
  require 'optparse'
6
6
  require 'tls-checker'
7
7
 
8
- factory = TLSChecker::CertificateCheckerFactory.new
9
-
10
8
  options = {
11
9
  output: $stdout,
12
10
  }
@@ -19,8 +17,10 @@ OptionParser.new do |opts|
19
17
  end
20
18
  end.parse!
21
19
 
22
- ARGV.each do |arg|
23
- factory.certificate_checkers_for(arg).each do |checker|
20
+ factory = TLSChecker::CertificateCheckerFactory.new
21
+
22
+ ARGV.each do |specification|
23
+ factory.certificate_checkers_for(specification).each do |checker|
24
24
  options[:output].puts checker.to_e.to_json
25
25
  end
26
26
  end
@@ -34,6 +34,10 @@ module TLSChecker
34
34
  )
35
35
  end
36
36
 
37
+ def check
38
+ !!certificate
39
+ end
40
+
37
41
  def to_s
38
42
  description
39
43
  end
@@ -25,6 +25,7 @@ module TLSChecker
25
25
  ]
26
26
  rescue IPAddr::InvalidAddressError
27
27
  certificate_checkers = @resolver.getaddresses(hostname).map { |ip| CertificateChecker.new(hostname, ip, port, starttls) }
28
+ certificate_checkers.select!(&:check)
28
29
 
29
30
  factory = TLSACheckerFactory.new
30
31
 
@@ -8,6 +8,7 @@ module TLSChecker
8
8
 
9
9
  def tlsa_checkers_for(certificate_checker)
10
10
  res = []
11
+ return res unless certificate_checker.certificate
11
12
 
12
13
  each_tlsa_end_entity_record(certificate_checker) do |record|
13
14
  checker = TLSAChecker.new(record, certificate_checker)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TlsChecker
4
- VERSION = '1.1.1'
4
+ VERSION = '1.2.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tls-checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Romain Tartière
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-01 00:00:00.000000000 Z
11
+ date: 2019-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: internet_security_event