fluent-plugin-syslog-tls 2.0.0 → 2.1.0.rc1

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: 262868fd779671864af8b5cef830ce93520fead4d2180961594f6fa936eeeb85
4
- data.tar.gz: b8268ed11a3bd9f0735894d7ff53593f4a1f505b0ed2cb754d40faab78cecd2f
3
+ metadata.gz: 645976d5334d9574e292336a7a04fe771f42c2d6a3a4117157ac765002b0cd59
4
+ data.tar.gz: 93e1cd22473b4924810765608d9b6741a30faea7f416169f33f4eec07661a607
5
5
  SHA512:
6
- metadata.gz: a867380a0f4fec32d2db3a2713b1d0249c0ffbac667517d38163e3215c59c82a1ed1f73c14e78c9ec60a68cc4d93a4b1c36d7fe9f90a2c73d13d6d7c3429ad51
7
- data.tar.gz: 1815edfd8f9faf39328de0c2690f13e95572dfd7d0e34e828562a83dcb1aee3c1890a1950491696ed573c33a33884b80b89cebde473ede9b48ba13e4ef089b66
6
+ metadata.gz: acbe5677f687a549b3133af9a19079ee6ffdba5bc0640b2ddd8b44f0487d6b19c41bd2dd78e4406bf358624600d7509190b29c8048c52a59225998a3a4eae14e
7
+ data.tar.gz: 5e1c5004e04d102c9b143c37d12117032ac2aec885ad7429bdc68c3887cb75224d9ad46e6325bb38c517cfb706bf27bc036f7d622c49e8cde2cca15d88b70347
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ #### 2.1.0
2
+
3
+ * Require Ruby 2.5
4
+ * Allow TLS 1.3 (minimum remains TLS 1.2)
5
+
6
+
1
7
  #### 2.0.0
2
8
 
3
9
  * Require Ruby 2.4
data/Gemfile CHANGED
@@ -15,5 +15,3 @@
15
15
  source 'https://rubygems.org'
16
16
 
17
17
  gemspec
18
-
19
- gem 'coveralls', require: false
data/Gemfile.lock CHANGED
@@ -1,77 +1,67 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-syslog-tls (2.0.0)
4
+ fluent-plugin-syslog-tls (2.1.0.rc1)
5
5
  fluentd (>= 0.14.0, < 2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- addressable (2.6.0)
11
- public_suffix (>= 2.0.2, < 4.0)
12
- cool.io (1.5.4)
13
- coveralls (0.8.23)
14
- json (>= 1.8, < 3)
15
- simplecov (~> 0.16.1)
16
- term-ansicolor (~> 1.3)
17
- thor (>= 0.19.4, < 2.0)
18
- tins (~> 1.6)
19
- crack (0.4.3)
20
- safe_yaml (~> 1.0.0)
21
- dig_rb (1.0.1)
22
- docile (1.3.1)
23
- fluentd (1.5.0)
10
+ addressable (2.8.1)
11
+ public_suffix (>= 2.0.2, < 6.0)
12
+ concurrent-ruby (1.1.10)
13
+ cool.io (1.7.1)
14
+ crack (0.4.5)
15
+ rexml
16
+ docile (1.4.0)
17
+ fluentd (1.15.3)
18
+ bundler
24
19
  cool.io (>= 1.4.5, < 2.0.0)
25
- dig_rb (~> 1.0.0)
26
- http_parser.rb (>= 0.5.1, < 0.7.0)
27
- msgpack (>= 0.7.0, < 2.0.0)
28
- serverengine (>= 2.0.4, < 3.0.0)
20
+ http_parser.rb (>= 0.5.1, < 0.9.0)
21
+ msgpack (>= 1.3.1, < 2.0.0)
22
+ serverengine (>= 2.3.0, < 3.0.0)
29
23
  sigdump (~> 0.2.2)
30
- strptime (>= 0.2.2, < 1.0.0)
31
- tzinfo (~> 1.0)
24
+ strptime (>= 0.2.4, < 1.0.0)
25
+ tzinfo (>= 1.0, < 3.0)
32
26
  tzinfo-data (~> 1.0)
27
+ webrick (>= 1.4.2, < 1.8.0)
33
28
  yajl-ruby (~> 1.0)
34
- hashdiff (0.4.0)
35
- http_parser.rb (0.6.0)
36
- json (2.2.0)
37
- minitest (5.11.3)
38
- minitest-stub_any_instance (1.0.2)
39
- msgpack (1.2.10)
40
- power_assert (1.1.4)
41
- public_suffix (3.1.0)
42
- rake (12.3.2)
43
- safe_yaml (1.0.5)
44
- serverengine (2.1.1)
29
+ hashdiff (1.0.1)
30
+ http_parser.rb (0.8.0)
31
+ minitest (5.17.0)
32
+ minitest-stub_any_instance (1.0.3)
33
+ msgpack (1.6.0)
34
+ power_assert (2.0.3)
35
+ public_suffix (5.0.1)
36
+ rake (13.0.6)
37
+ rexml (3.2.5)
38
+ serverengine (2.3.1)
45
39
  sigdump (~> 0.2.2)
46
40
  sigdump (0.2.4)
47
- simplecov (0.16.1)
41
+ simplecov (0.22.0)
48
42
  docile (~> 1.1)
49
- json (>= 1.8, < 3)
50
- simplecov-html (~> 0.10.0)
51
- simplecov-html (0.10.2)
52
- strptime (0.2.3)
53
- term-ansicolor (1.7.1)
54
- tins (~> 1.0)
55
- test-unit (3.3.3)
43
+ simplecov-html (~> 0.11)
44
+ simplecov_json_formatter (~> 0.1)
45
+ simplecov-html (0.12.3)
46
+ simplecov_json_formatter (0.1.4)
47
+ strptime (0.2.5)
48
+ test-unit (3.5.7)
56
49
  power_assert
57
- thor (0.20.3)
58
- thread_safe (0.3.6)
59
- tins (1.20.3)
60
- tzinfo (1.2.5)
61
- thread_safe (~> 0.1)
62
- tzinfo-data (1.2019.1)
50
+ tzinfo (2.0.5)
51
+ concurrent-ruby (~> 1.0)
52
+ tzinfo-data (1.2022.7)
63
53
  tzinfo (>= 1.0.0)
64
- webmock (3.5.1)
65
- addressable (>= 2.3.6)
54
+ webmock (3.18.1)
55
+ addressable (>= 2.8.0)
66
56
  crack (>= 0.3.2)
67
- hashdiff
68
- yajl-ruby (1.4.1)
57
+ hashdiff (>= 0.4.0, < 2.0.0)
58
+ webrick (1.7.0)
59
+ yajl-ruby (1.4.3)
69
60
 
70
61
  PLATFORMS
71
62
  ruby
72
63
 
73
64
  DEPENDENCIES
74
- coveralls
75
65
  fluent-plugin-syslog-tls!
76
66
  minitest (~> 5.8)
77
67
  minitest-stub_any_instance (~> 1.0.0)
@@ -81,4 +71,4 @@ DEPENDENCIES
81
71
  webmock (~> 3.0)
82
72
 
83
73
  BUNDLED WITH
84
- 1.17.3
74
+ 2.3.26
@@ -1,5 +1,5 @@
1
1
  # Copyright 2016 Acquia, Inc.
2
- # Copyright 2016-2019 t.e.morgan.
2
+ # Copyright 2016-2023 t.e.morgan.
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
30
30
  s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
31
31
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
32
32
  s.require_paths = ['lib']
33
- s.required_ruby_version = '>= 2.4'
33
+ s.required_ruby_version = '>= 2.5'
34
34
 
35
35
  s.add_runtime_dependency 'fluentd', [">= 0.14.0", "< 2"]
36
36
 
@@ -1,5 +1,5 @@
1
1
  # Copyright 2016 Acquia, Inc.
2
- # Copyright 2016-2019 t.e.morgan.
2
+ # Copyright 2016-2023 t.e.morgan.
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ module SyslogTls
29
29
 
30
30
  attr_writer :retries
31
31
 
32
- def initialize(host, port, idle_timeout: nil, ca_cert: 'system', client_cert: nil, client_key: nil, verify_cert_name: true, ssl_version: :TLSv1_2, max_retries: 1)
32
+ def initialize(host, port, idle_timeout: nil, ca_cert: 'system', client_cert: nil, client_key: nil, verify_cert_name: true, ssl_version: :TLS1_2, max_retries: 1)
33
33
  @host = host
34
34
  @port = port
35
35
  @idle_timeout = idle_timeout
@@ -96,7 +96,7 @@ module SyslogTls
96
96
 
97
97
  ctx = OpenSSL::SSL::SSLContext.new
98
98
  ctx.verify_mode = OpenSSL::SSL::VERIFY_PEER
99
- ctx.ssl_version = ssl_version
99
+ ctx.min_version = ssl_version
100
100
 
101
101
  ctx.verify_hostname = verify_cert_name != false
102
102
 
@@ -14,5 +14,5 @@
14
14
  # limitations under the License.
15
15
 
16
16
  module SyslogTls
17
- VERSION = '2.0.0'
17
+ VERSION = '2.1.0.rc1'
18
18
  end
data/test/helper.rb CHANGED
@@ -12,13 +12,10 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'coveralls'
16
15
  require 'simplecov'
17
16
 
18
17
  SimpleCov.start
19
18
 
20
- Coveralls.wear! if ENV['TRAVIS']
21
-
22
19
  require 'test/unit'
23
20
  require 'fluent/test'
24
21
  require 'minitest/pride'
data/test/ssl.rb CHANGED
@@ -2,12 +2,14 @@ require 'socket'
2
2
  require 'openssl'
3
3
 
4
4
  module SSLTestHelper
5
- def ssl_server
5
+ def ssl_server(min_version: nil, max_version: nil)
6
6
  @ssl_server ||= begin
7
7
  tcp_server = TCPServer.new("localhost", 33000 + Random.rand(1000))
8
8
  ssl_context = OpenSSL::SSL::SSLContext.new
9
9
  ssl_context.cert = certificate
10
10
  ssl_context.key = rsa_key
11
+ ssl_context.min_version = min_version if min_version
12
+ ssl_context.max_version = max_version if max_version
11
13
  OpenSSL::SSL::SSLServer.new(tcp_server, ssl_context)
12
14
  end
13
15
  end
@@ -1,5 +1,5 @@
1
1
  # Copyright 2016 Acquia, Inc.
2
- # Copyright 2016 t.e.morgan.
2
+ # Copyright 2016-2023 t.e.morgan.
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -20,19 +20,36 @@ require 'syslog_tls/ssl_transport'
20
20
  class SSLTransportTest < Test::Unit::TestCase
21
21
  include SSLTestHelper
22
22
 
23
- def test_ok_connection
24
- server = ssl_server
25
- st = Thread.new {
26
- client = server.accept
27
- assert_equal "TESTTEST2\n", client.gets
28
- client.close
29
- }
30
- SyslogTls::SSLTransport.stub_any_instance(:get_ssl_connection, ssl_client) do
31
- t = SyslogTls::SSLTransport.new("localhost", server.addr[1], max_retries: 3)
32
- t.write("TEST")
33
- t.write("TEST2\n")
23
+ # srvr-min srvr-max clnt-min should-raise?
24
+ [ [:TLS1_2, :TLS1_2, :TLS1_2],
25
+ [:TLS1_2, :TLS1_3, :TLS1_2],
26
+ [:TLS1_3, :TLS1_3, :TLS1_2],
27
+ [:TLS1_2, :TLS1_2, :TLS1_3, true],
28
+ [:TLS1_2, :TLS1_3, :TLS1_3],
29
+ [:TLS1_3, :TLS1_3, :TLS1_3],
30
+ ].each do |(server_min, server_max, client_min, should_raise)|
31
+ define_method "test_#{server_min}-#{server_max}_server_#{client_min}_client" do
32
+ Thread.report_on_exception = false
33
+ blk = lambda do
34
+ server = ssl_server(min_version: server_min, max_version: server_max)
35
+ st = Thread.new {
36
+ client = server.accept
37
+ assert_equal "TESTTEST2\n", client.gets
38
+ client.close
39
+ }
40
+ t = SyslogTls::SSLTransport.new("localhost", server.addr[1], ca_cert: false, ssl_version: client_min)
41
+ t.write("TEST")
42
+ t.write("TEST2\n")
43
+ st.join
44
+ end
45
+ if should_raise
46
+ assert_raises OpenSSL::SSL::SSLError, &blk
47
+ else
48
+ blk.call
49
+ end
50
+ ensure
51
+ Thread.report_on_exception = true
34
52
  end
35
- st.join
36
53
  end
37
54
 
38
55
  def test_retry
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-syslog-tls
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-01 00:00:00.000000000 Z
11
+ date: 2023-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -150,7 +150,7 @@ homepage: https://github.com/zarqman/fluent-plugin-syslog-tls
150
150
  licenses:
151
151
  - Apache v2
152
152
  metadata: {}
153
- post_install_message:
153
+ post_install_message:
154
154
  rdoc_options: []
155
155
  require_paths:
156
156
  - lib
@@ -158,15 +158,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - ">="
160
160
  - !ruby/object:Gem::Version
161
- version: '2.4'
161
+ version: '2.5'
162
162
  required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - ">"
165
165
  - !ruby/object:Gem::Version
166
- version: '0'
166
+ version: 1.3.1
167
167
  requirements: []
168
- rubygems_version: 3.0.3
169
- signing_key:
168
+ rubygems_version: 3.3.26
169
+ signing_key:
170
170
  specification_version: 4
171
171
  summary: Fluent Syslog TLS output plugin
172
172
  test_files: