fluent-plugin-syslog_rfc5424 0.3.0 → 0.3.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
  SHA1:
3
- metadata.gz: 2631f0a1816e3d1a620c304a5c59473c94bdfabd
4
- data.tar.gz: 45f95366e08b4f3cefaab3d8ef2b160152ca6226
3
+ metadata.gz: 97f2d3ab3564ea17b41de5f29a92beb3c9fb8221
4
+ data.tar.gz: 664e456482c38936b853c46fbcb460c5d7a3b545
5
5
  SHA512:
6
- metadata.gz: 9b34cf26779b21721e19a04e5bb0223ab77614e675673baaf727bfee0219e92e8ad14c0dd4c7025fc34d2ce13eb3e2b73b7b2e34940408913c895e20e17de6b9
7
- data.tar.gz: c50ff16d02a200b54f10bf7b6c490b16cdf36cf119a4d10661b1b9892a3c568f99bfc77f6e2e0fc3705a7b3f8af73bc9c1973158bd0f08ebe04363662a10d603
6
+ metadata.gz: 54bbfea77fc122602fb4e085e852614aeb6c25f336e695c58ad9fd00ba0a9351c7cd97db72dedcb28b40a019ed067a17bbc6b848179930a698436081b682fb2b
7
+ data.tar.gz: 6fc29feff0b24eb09696c3034ae2454372823d9aecd9c972a6b44e3b5972edd933cc84a225b2c33d579f99a03c91513c4d51a34f83a0c70c3f73e6b344590e64
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-syslog_rfc5424"
7
- spec.version = "0.3.0"
7
+ spec.version = "0.3.1"
8
8
  spec.authors = ["Pivotal"]
9
9
  spec.email = %w(cf-loggregator@pivotal.io)
10
10
  spec.homepage = "https://github.com/cloudfoundry/fluent-plugin-syslog_rfc5424"
@@ -43,7 +43,13 @@ module Fluent
43
43
  socket = find_socket(transport, host, port)
44
44
  return socket if socket
45
45
 
46
- @sockets[socket_key(transport, host, port)] = self.socket_create(transport.to_sym, host, port, insecure: @insecure)
46
+ @sockets[socket_key(transport, host, port)] = socket_create(transport.to_sym, host, port, socket_options)
47
+ end
48
+
49
+ def socket_options
50
+ return {} unless @transport == 'tls'
51
+
52
+ { insecure: @insecure, verify_fqdn: !@insecure }
47
53
  end
48
54
 
49
55
  def socket_key(transport, host, port)
@@ -35,7 +35,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
35
35
  stub(socket).close
36
36
 
37
37
  any_instance_of(Fluent::Plugin::OutSyslogRFC5424) do |fluent_plugin|
38
- mock(fluent_plugin).socket_create(:tls, "example.com", 123, {:insecure=>false}).returns(socket)
38
+ mock(fluent_plugin).socket_create(:tls, "example.com", 123, {:insecure=>false, :verify_fqdn=>true}).returns(socket)
39
39
  end
40
40
 
41
41
  output_driver.run do
@@ -56,7 +56,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
56
56
  stub(socket).close
57
57
 
58
58
  any_instance_of(Fluent::Plugin::OutSyslogRFC5424) do |fluent_plugin|
59
- mock(fluent_plugin).socket_create(:tcp, "example.com", 123, {:insecure=>false}).returns(socket)
59
+ mock(fluent_plugin).socket_create(:tcp, "example.com", 123, {}).returns(socket)
60
60
  end
61
61
 
62
62
  output_driver.run do
@@ -69,7 +69,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
69
69
  @type syslog_rfc5424
70
70
  host example.com
71
71
  port 123
72
- transport tcp
72
+ transport tls
73
73
  insecure true
74
74
  )
75
75
 
@@ -78,7 +78,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
78
78
  stub(socket).close
79
79
 
80
80
  any_instance_of(Fluent::Plugin::OutSyslogRFC5424) do |fluent_plugin|
81
- mock(fluent_plugin).socket_create(:tcp, "example.com", 123, {:insecure=>true}).returns(socket)
81
+ mock(fluent_plugin).socket_create(:tls, "example.com", 123, {:insecure=>true, :verify_fqdn=>false}).returns(socket)
82
82
  end
83
83
 
84
84
  output_driver.run do
@@ -97,7 +97,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
97
97
  stub(socket).puts(@formatted_log)
98
98
 
99
99
  any_instance_of(Fluent::Plugin::OutSyslogRFC5424) do |fluent_plugin|
100
- mock(fluent_plugin).socket_create(:tls, "example.com", 123, {:insecure=>false}).returns(socket)
100
+ mock(fluent_plugin).socket_create(:tls, "example.com", 123, {:insecure=>false, :verify_fqdn=>true}).returns(socket)
101
101
  end
102
102
 
103
103
  mock(socket).close
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-syslog_rfc5424
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pivotal