internet_security_event 4.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: c0e9c8ea09fa7bf7a9ba45617a8895c3cef64191c7c9d79781e1cf7f0c429908
4
- data.tar.gz: e76ee0ae675bb3b23f19c069b44711a6e994399c3a376498c64f23046b023d12
3
+ metadata.gz: 6419a115e53ef76a0f5c1a5c4d02ca163b34fbc87e1309cad84a4c59010f96e9
4
+ data.tar.gz: d4d7a942b557b205275f890680776e8883863ab1cd5d9429e51ff00dad12ff09
5
5
  SHA512:
6
- metadata.gz: ad03d4baf5eeb39dd8006c761c00106ee7bf3f7ed713ed68afb1db5a28dad1dd464fd66a89dc021b18afa27da19358a12ab4ab1a5d5be2d83c9a2e5d7390dadc
7
- data.tar.gz: 0ef2288e630626c33dd39b2eb46492a557ed9c886cbeb41478e73c7e9b192bb883d9ab94d2928f608d0b6e10bffbf9c947362951e7724c0dfedf87492787c1f6
6
+ metadata.gz: a39f75e8e5760ba26413fa261f1a89e85f4b93203acb09b4515bcb4a17812ace517e876cb625bb0f24fb4f5f8819e635e2a49ba4a427a32a03b3a42b3ca39be4
7
+ data.tar.gz: 76753f719214bc147ae528dbe9cef105371c6f957205566a1fa000537d8bf7aaffcb7bed0f964cc66d759804f7bd9ec1eef01788067af3c5b428d6a24defa12d
@@ -30,6 +30,7 @@ jobs:
30
30
  - "3.2"
31
31
  - "3.3"
32
32
  - "3.4"
33
+ - "4.0"
33
34
  name: Ruby ${{ matrix.ruby }}
34
35
  steps:
35
36
  - uses: actions/checkout@v2
data/.rubocop.yml CHANGED
@@ -12,6 +12,10 @@ Layout/HashAlignment:
12
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,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
+ ## [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
+
8
16
  ## [v4.0.0](https://github.com/smortex/internet_security_event/tree/v4.0.0) (2025-10-07)
9
17
 
10
18
  [Full Changelog](https://github.com/smortex/internet_security_event/compare/v3.0.0...v4.0.0)
@@ -15,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
23
 
16
24
  **Implemented enhancements:**
17
25
 
18
- - Run CI an Ruby 3.3 and 3.4 [\#7](https://github.com/smortex/internet_security_event/pull/7) ([smortex](https://github.com/smortex))
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))
19
27
 
20
28
  ## [v3.0.0](https://github.com/smortex/internet_security_event/tree/v3.0.0) (2023-04-17)
21
29
 
@@ -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 = '4.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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: internet_security_event
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Romain Tartière
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  - !ruby/object:Gem::Version
183
183
  version: '0'
184
184
  requirements: []
185
- rubygems_version: 3.7.1
185
+ rubygems_version: 4.0.20
186
186
  specification_version: 4
187
187
  summary: Build events describing the status of various internet services
188
188
  test_files: []