internet_security_event 3.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9618c67bc76530f18f67b1c2634fc8a1638f003216c0870bc7aeea96f72136e6
4
- data.tar.gz: eb38ae645cc40fee9e92b465bb05178d39769bd77aa3804666b13283fb0192bf
3
+ metadata.gz: 6419a115e53ef76a0f5c1a5c4d02ca163b34fbc87e1309cad84a4c59010f96e9
4
+ data.tar.gz: d4d7a942b557b205275f890680776e8883863ab1cd5d9429e51ff00dad12ff09
5
5
  SHA512:
6
- metadata.gz: 1698abecd6ad8f8f76ee0cea45a3e6de1ce4c483b1f5082be060cda480e2e4bef7bdb261f5ed5baf6bc9d243f1a1e948b85f4b755f0a999376fcd9dbe59d1def
7
- data.tar.gz: da7e963cadddbe85148b28f8a0f4247e36f51d8f9ed6ccd502d0f69f04657180cc1b6c57642b022e7235cf11ed9abfd4be90f95d264918282d59231ba28e2222
6
+ metadata.gz: a39f75e8e5760ba26413fa261f1a89e85f4b93203acb09b4515bcb4a17812ace517e876cb625bb0f24fb4f5f8819e635e2a49ba4a427a32a03b3a42b3ca39be4
7
+ data.tar.gz: 76753f719214bc147ae528dbe9cef105371c6f957205566a1fa000537d8bf7aaffcb7bed0f964cc66d759804f7bd9ec1eef01788067af3c5b428d6a24defa12d
@@ -26,11 +26,11 @@ jobs:
26
26
  strategy:
27
27
  matrix:
28
28
  ruby:
29
- - "2.6"
30
- - "2.7"
31
- - "3.0"
32
29
  - "3.1"
33
30
  - "3.2"
31
+ - "3.3"
32
+ - "3.4"
33
+ - "4.0"
34
34
  name: Ruby ${{ matrix.ruby }}
35
35
  steps:
36
36
  - uses: actions/checkout@v2
data/.rubocop.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  AllCops:
2
2
  AllowSymlinksInCacheRootDirectory: true
3
3
 
4
- require:
4
+ plugins:
5
5
  - rubocop-rake
6
6
  - rubocop-rspec
7
7
 
@@ -9,9 +9,13 @@ Layout/HashAlignment:
9
9
  EnforcedColonStyle: table
10
10
  EnforcedHashRocketStyle: table
11
11
 
12
- Metrics/LineLength:
12
+ Layout/LineLength:
13
13
  Max: 160
14
14
 
15
+ Naming/ConstantName:
16
+ Exclude:
17
+ - lib/resolv/dns/resource/in/tlsa.rb
18
+
15
19
  Style/Documentation:
16
20
  Enabled: false
17
21
 
data/CHANGELOG.md CHANGED
@@ -5,6 +5,26 @@ 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
+ ## [v5.0.0](https://github.com/smortex/internet_security_event/tree/v5.0.0) (2026-09-24)
9
+
10
+ [Full Changelog](https://github.com/smortex/internet_security_event/compare/v4.0.0...v5.0.0)
11
+
12
+ **Breaking changes:**
13
+
14
+ - Improve the way TLSA records are managed [\#9](https://github.com/smortex/internet_security_event/pull/9) ([smortex](https://github.com/smortex))
15
+
16
+ ## [v4.0.0](https://github.com/smortex/internet_security_event/tree/v4.0.0) (2025-10-07)
17
+
18
+ [Full Changelog](https://github.com/smortex/internet_security_event/compare/v3.0.0...v4.0.0)
19
+
20
+ **Breaking changes:**
21
+
22
+ - Switch to ActiveSupport 7.x [\#6](https://github.com/smortex/internet_security_event/pull/6) ([smortex](https://github.com/smortex))
23
+
24
+ **Implemented enhancements:**
25
+
26
+ - Run CI on Ruby 3.3 and 3.4 [\#7](https://github.com/smortex/internet_security_event/pull/7) ([smortex](https://github.com/smortex))
27
+
8
28
  ## [v3.0.0](https://github.com/smortex/internet_security_event/tree/v3.0.0) (2023-04-17)
9
29
 
10
30
  [Full Changelog](https://github.com/smortex/internet_security_event/compare/v2.0.0...v3.0.0)
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.summary = 'Build events describing the status of various internet services'
14
14
  spec.homepage = 'https://github.com/smortex/internet_security_event'
15
15
  spec.license = 'MIT'
16
- spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
16
+ spec.required_ruby_version = Gem::Requirement.new('>= 3.1.0')
17
17
 
18
18
  # Specify which files should be added to the gem when it is released.
19
19
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ['lib']
26
26
 
27
- spec.add_dependency 'activesupport', '~> 6.0'
27
+ spec.add_dependency 'activesupport', '~> 7.0'
28
28
 
29
29
  spec.add_development_dependency 'bundler'
30
30
  spec.add_development_dependency 'github_changelog_generator'
@@ -30,7 +30,7 @@ module InternetSecurityEvent
30
30
  end
31
31
 
32
32
  def certificate_match_tlsa_record?
33
- certificate_association_data(record.selector, record.matching_type) == record.certificate_association_data
33
+ certificate_association_data(record.selector, record.matching_type).casecmp?(record.certificate_association_data)
34
34
  end
35
35
 
36
36
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InternetSecurityEvent
4
- VERSION = '3.0.0'
4
+ VERSION = '5.0.0'
5
5
  end
@@ -4,7 +4,11 @@ class Resolv
4
4
  class DNS
5
5
  class Resource
6
6
  module IN
7
- class TLSA
7
+ class TLSA < Resource
8
+ TypeValue = 52
9
+ ClassValue = IN::ClassValue
10
+ ClassHash[[TypeValue, ClassValue]] = self
11
+
8
12
  module CertificateUsage
9
13
  PKIX_TA = 0
10
14
  PKIX_EE = 1
@@ -23,12 +27,31 @@ class Resolv
23
27
  SHA2_512 = 2
24
28
  end
25
29
 
26
- def initialize(data)
27
- @certificate_usage, @selector, @matching_type, @certificate_association_data = data.unpack('CCCH*')
30
+ def initialize(certificate_usage, selector, matching_type, certificate_association_data)
31
+ super()
32
+
33
+ @certificate_usage = certificate_usage.to_int
34
+ @selector = selector.to_int
35
+ @matching_type = matching_type.to_int
36
+ @certificate_association_data = certificate_association_data
28
37
  end
29
38
 
30
39
  attr_reader :certificate_usage, :selector, :matching_type, :certificate_association_data
31
40
 
41
+ def encode_rdata(msg)
42
+ msg.put_bytes(@certificate_usage)
43
+ msg.put_bytes(@selector)
44
+ msg.put_bytes(@matching_type)
45
+ msg.put_pack('H*', @certificate_association_data)
46
+ end
47
+
48
+ def self.decode_rdata(msg)
49
+ certificate_usage, selector, matching_type = msg.get_unpack('ccc')
50
+ certificate_association_data = msg.get_bytes.unpack1('H*')
51
+
52
+ new(certificate_usage, selector, matching_type, certificate_association_data)
53
+ end
54
+
32
55
  def end_entity?
33
56
  [CertificateUsage::PKIX_EE, CertificateUsage::DANE_EE].include?(certificate_usage)
34
57
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: internet_security_event
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Romain Tartière
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2023-04-17 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -16,14 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '6.0'
18
+ version: '7.0'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: '6.0'
25
+ version: '7.0'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: bundler
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +135,6 @@ dependencies:
136
135
  - - ">="
137
136
  - !ruby/object:Gem::Version
138
137
  version: '0'
139
- description:
140
138
  email:
141
139
  - romain@blogreen.org
142
140
  executables: []
@@ -170,7 +168,6 @@ homepage: https://github.com/smortex/internet_security_event
170
168
  licenses:
171
169
  - MIT
172
170
  metadata: {}
173
- post_install_message:
174
171
  rdoc_options: []
175
172
  require_paths:
176
173
  - lib
@@ -178,15 +175,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
178
175
  requirements:
179
176
  - - ">="
180
177
  - !ruby/object:Gem::Version
181
- version: 2.6.0
178
+ version: 3.1.0
182
179
  required_rubygems_version: !ruby/object:Gem::Requirement
183
180
  requirements:
184
181
  - - ">="
185
182
  - !ruby/object:Gem::Version
186
183
  version: '0'
187
184
  requirements: []
188
- rubygems_version: 3.4.10
189
- signing_key:
185
+ rubygems_version: 4.0.20
190
186
  specification_version: 4
191
187
  summary: Build events describing the status of various internet services
192
188
  test_files: []