logstash-output-tcp 5.0.3 → 5.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/outputs/tcp.rb +6 -2
- data/logstash-output-tcp.gemspec +2 -1
- data/spec/outputs/tcp_spec.rb +32 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1daa767cf92bff4f20058bc66c08898e89fefba31dc99ae3eb0171101a5e143
|
4
|
+
data.tar.gz: 1518bd235d036c6cfb538773dee084399e8f9a664c31df2667b1e8725f412e3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0caa01c562e8a919569a9a7545f481eb6af8ef8fc80c8198613d3abde6ff3b3fee84006949a816218cd92255235cf17d5e5e3ffe5d770a06001ea751716fcd6
|
7
|
+
data.tar.gz: e28019c283857fb53553dec35e1a434caf19ccaaabd276e71e40321cc333ead2580d1fd2c02eabece191f2010b7edc98910800b5b40d6268df7d78d3dc43944a
|
data/CHANGELOG.md
CHANGED
data/lib/logstash/outputs/tcp.rb
CHANGED
@@ -85,8 +85,12 @@ class LogStash::Outputs::Tcp < LogStash::Outputs::Base
|
|
85
85
|
require "openssl"
|
86
86
|
|
87
87
|
@ssl_context = OpenSSL::SSL::SSLContext.new
|
88
|
-
|
89
|
-
|
88
|
+
if @ssl_cert
|
89
|
+
@ssl_context.cert = OpenSSL::X509::Certificate.new(File.read(@ssl_cert))
|
90
|
+
if @ssl_key
|
91
|
+
@ssl_context.key = OpenSSL::PKey::RSA.new(File.read(@ssl_key),@ssl_key_passphrase)
|
92
|
+
end
|
93
|
+
end
|
90
94
|
if @ssl_verify
|
91
95
|
@cert_store = OpenSSL::X509::Store.new
|
92
96
|
# Load the system default certificate path to the store
|
data/logstash-output-tcp.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-tcp'
|
4
|
-
s.version = '5.0.
|
4
|
+
s.version = '5.0.4'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Writes events over a TCP socket"
|
7
7
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
@@ -26,5 +26,6 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_runtime_dependency 'stud'
|
27
27
|
|
28
28
|
s.add_development_dependency 'logstash-devutils'
|
29
|
+
s.add_development_dependency 'flores'
|
29
30
|
end
|
30
31
|
|
data/spec/outputs/tcp_spec.rb
CHANGED
@@ -1 +1,33 @@
|
|
1
1
|
require "logstash/devutils/rspec/spec_helper"
|
2
|
+
require "logstash/outputs/tcp"
|
3
|
+
require "flores/pki"
|
4
|
+
|
5
|
+
describe LogStash::Outputs::Tcp do
|
6
|
+
subject { described_class.new(config) }
|
7
|
+
let(:config) { {
|
8
|
+
"host" => "localhost",
|
9
|
+
"port" => 2000 + rand(3000),
|
10
|
+
} }
|
11
|
+
|
12
|
+
context "when enabling SSL" do
|
13
|
+
let(:config) { super.merge("ssl_enable" => true) }
|
14
|
+
context "and not providing a certificate/key pair" do
|
15
|
+
it "registers without error" do
|
16
|
+
expect { subject.register }.to_not raise_error
|
17
|
+
end
|
18
|
+
end
|
19
|
+
context "and providing a certificate/key pair" do
|
20
|
+
let(:cert_key_pair) { Flores::PKI.generate }
|
21
|
+
let(:certificate) { cert_key_pair.first }
|
22
|
+
let(:cert_file) do
|
23
|
+
path = Tempfile.new('foo').path
|
24
|
+
IO.write(path, certificate.to_s)
|
25
|
+
path
|
26
|
+
end
|
27
|
+
let(:config) { super.merge("ssl_cert" => true, "ssl_cert" => cert_file) }
|
28
|
+
it "registers without error" do
|
29
|
+
expect { subject.register }.to_not raise_error
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-tcp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,6 +72,20 @@ dependencies:
|
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
requirement: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
name: flores
|
82
|
+
prerelease: false
|
83
|
+
type: :development
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
75
89
|
description: This gem is a Logstash plugin required to be installed on top of the
|
76
90
|
Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
|
77
91
|
gem is not a stand-alone program
|
@@ -112,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
126
|
version: '0'
|
113
127
|
requirements: []
|
114
128
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.6.
|
129
|
+
rubygems_version: 2.6.13
|
116
130
|
signing_key:
|
117
131
|
specification_version: 4
|
118
132
|
summary: Writes events over a TCP socket
|