logstash-input-tcp 5.2.2-java → 5.2.3-java

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: 147048d4bbe35f7c640da0c8cf9b54dc54bf15ebc3fe9141615c2168dbc0ab31
4
- data.tar.gz: 53271ca6cf4aa13ae1621040c256aa0e78bb4455464e07073aece8212ab27f77
3
+ metadata.gz: 4e3fbae31c34a11ab25dfd0134c2851f7a84c4d186b32c2b282ac60116be031b
4
+ data.tar.gz: 9f72b2cbe4d3703719012bd897d70b92d9bf0e95a961240e7c73a7ee7235577a
5
5
  SHA512:
6
- metadata.gz: f391dcd37cc06060b0fe0ee7d2525b164f5036a3c959d8c8df9b05e294587ef396314206ca782b115708deebe4a398aa0dc57a4018240d6a7f95b887911665f3
7
- data.tar.gz: 91d4f5a4861601a181a07e029ee9caea9f07c5dd8028e7128a6c9e8a8c0a7c9c0d7a76ac4f930176919c46f0f3e125049af6e82aaa190064284b455ec8270c7f
6
+ metadata.gz: cabaaa5d5b41294f0a70dc62a63a1a820b20d7a2243f73532465da33ac975f7ae5c5168365652f94fb8dc897e10e2aebcb49816f61b1f7e7c4f0704b99b46abb
7
+ data.tar.gz: 84ce8e542f13d9945ae0c9d08506b8b512068026d4290246f6a1fde541b50423777870cdc2aea5dd97d469b3ee7123194efaaf6b0aa77d001de5b12ff95ab1a8
@@ -1,3 +1,6 @@
1
+ ## 5.2.3
2
+ - Skip empty lines while reading certificate files [#144](https://github.com/logstash-plugins/logstash-input-tcp/issues/144)
3
+
1
4
  ## 5.2.2
2
5
  - Fixed race condition where data would be accepted before queue was configured [#142](https://github.com/logstash-plugins/logstash-input-tcp/pull/142)
3
6
 
@@ -127,12 +127,19 @@ class SslOptions
127
127
 
128
128
  private
129
129
  def fetch_certificates_from_file(file, cf)
130
- fis = FileInputStream.new(file)
130
+ fis = java.io.FileInputStream.new(file)
131
131
 
132
132
  while (fis.available > 0) do
133
- yield cf.generateCertificate(fis)
133
+ cert = generate_certificate(cf, fis)
134
+ yield cert if cert
134
135
  end
135
136
  ensure
136
137
  fis.close if fis
137
138
  end
139
+
140
+ def generate_certificate(cf, fis)
141
+ cf.generateCertificate(fis)
142
+ rescue Java::JavaSecurityCert::CertificateException => e
143
+ raise e unless e.cause.message == "Empty input"
144
+ end
138
145
  end
@@ -382,6 +382,35 @@ describe LogStash::Inputs::Tcp do
382
382
  ssc.delete
383
383
  end
384
384
  end
385
+
386
+ context "with multiple certificates with empty spaces in them" do
387
+ let(:ssc) { SelfSignedCertificate.new }
388
+ let(:certificate_file) { ssc.certificate }
389
+ let(:key_file) { ssc.private_key}
390
+ let(:ssc_2) { SelfSignedCertificate.new }
391
+ let(:certificate_file_2) { ssc.certificate }
392
+ let(:config) do
393
+ {
394
+ "host" => "127.0.0.1",
395
+ "port" => port,
396
+ "ssl_enable" => true,
397
+ "ssl_cert" => certificate_file.path,
398
+ "ssl_key" => key_file.path
399
+ }
400
+ end
401
+ before(:each) do
402
+ File.open(certificate_file.path, "a") do |file|
403
+ path = ssc_2.certificate.path
404
+ file.puts("\n")
405
+ file.puts(IO.read(path))
406
+ file.puts("\n")
407
+ end
408
+ end
409
+
410
+ it "should register without errors" do
411
+ expect { subject.register }.to_not raise_error
412
+ end
413
+ end
385
414
  end
386
415
  end
387
416
 
data/version CHANGED
@@ -1 +1 @@
1
- 5.2.2
1
+ 5.2.3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-tcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.2
4
+ version: 5.2.3
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-09 00:00:00.000000000 Z
11
+ date: 2019-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -164,7 +164,7 @@ files:
164
164
  - logstash-input-tcp.gemspec
165
165
  - spec/inputs/tcp_spec.rb
166
166
  - spec/spec_helper.rb
167
- - vendor/jar-dependencies/org/logstash/inputs/logstash-input-tcp/5.2.2/logstash-input-tcp-5.2.2.jar
167
+ - vendor/jar-dependencies/org/logstash/inputs/logstash-input-tcp/5.2.3/logstash-input-tcp-5.2.3.jar
168
168
  - version
169
169
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
170
170
  licenses: